Skip to content

Commit f1876c1

Browse files
[Fix] test_evaluate
1 parent 1b56107 commit f1876c1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

test/test_pipeline/components/training/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import logging
22

33
from sklearn.datasets import make_classification, make_regression
4+
from sklearn.preprocessing import StandardScaler
45

56
import torch
67

@@ -32,9 +33,11 @@ def prepare_trainer(self,
3233
n_repeated=0,
3334
n_classes=2,
3435
n_clusters_per_class=2,
36+
class_sep=3.0,
3537
shuffle=True,
3638
random_state=0
3739
)
40+
X = StandardScaler().fit_transform(X)
3841
X = torch.tensor(X, dtype=torch.float)
3942
y = torch.tensor(y, dtype=torch.long)
4043
output_type = BINARY
@@ -50,6 +53,7 @@ def prepare_trainer(self,
5053
shuffle=True,
5154
random_state=0
5255
)
56+
X = StandardScaler().fit_transform(X)
5357
X = torch.tensor(X, dtype=torch.float)
5458
y = torch.tensor(y, dtype=torch.float)
5559
# normalize targets for regression since NNs are better when predicting small outputs

test/test_pipeline/test_traditional_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
import pytest
66

7+
from autoPyTorch.pipeline.components.setup.traditional_ml.classifier_models import _classifiers
78
from autoPyTorch.pipeline.traditional_tabular_classification import (
89
TraditionalTabularClassificationPipeline,
910
)
10-
from autoPyTorch.pipeline.components.setup.traditional_ml.classifier_models import _classifiers
1111

1212

1313
@pytest.mark.parametrize("fit_dictionary_tabular",

0 commit comments

Comments
 (0)