Skip to content

Commit f5964ca

Browse files
authored
Fix: Make SimpleClassificationPipeline tests deterministic (#1366)
1 parent b01c732 commit f5964ca

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/test_pipeline/test_classification.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,10 @@ def test_default_configuration_multilabel(self):
193193
"""
194194
X_train, Y_train, X_test, Y_test = get_dataset(dataset='iris', make_multilabel=True)
195195

196-
classifier = SimpleClassificationPipeline(dataset_properties={'multilabel': True})
196+
classifier = SimpleClassificationPipeline(
197+
dataset_properties={'multilabel': True},
198+
random_state=0
199+
)
197200
cs = classifier.get_hyperparameter_search_space()
198201

199202
default = cs.get_default_configuration()
@@ -222,7 +225,8 @@ def test_default_configuration_iterative_fit(self):
222225
include={
223226
'classifier': ['random_forest'],
224227
'feature_preprocessor': ['no_preprocessing']
225-
}
228+
},
229+
random_state=0
226230
)
227231
classifier.fit_transformer(X_train, Y_train)
228232

0 commit comments

Comments
 (0)