2626
2727from openml .flows import OpenMLFlow , sklearn_to_flow , flow_to_sklearn
2828from openml .flows .sklearn_converter import _format_external_version , \
29- _check_dependencies , model_single_core
29+ _check_dependencies , _check_n_jobs
3030from openml .exceptions import PyOpenMLError
3131
3232this_directory = os .path .dirname (os .path .abspath (__file__ ))
@@ -558,9 +558,13 @@ def test_illegal_parameter_names_featureunion(self):
558558 self .assertRaises (ValueError , sklearn .pipeline .FeatureUnion , transformer_list = transformer_list )
559559
560560 def test_paralizable_check (self ):
561+ # using this model should pass the test (if param distribution is legal)
561562 singlecore_bagging = sklearn .ensemble .BaggingClassifier ()
563+ # using this model should return false (if param distribution is legal)
562564 multicore_bagging = sklearn .ensemble .BaggingClassifier (n_jobs = 5 )
565+ # using this param distribution should raise an exception
563566 illegal_param_dist = {"base__n_jobs" : [- 1 , 0 , 1 ] }
567+ # using this param distribution should not raise an exception
564568 legal_param_dist = {"base__max_depth" : [2 , 3 , 4 ]}
565569
566570 legal_models = [
@@ -581,7 +585,7 @@ def test_paralizable_check(self):
581585 answers = [True , False , False , True , False , False , True , False ]
582586
583587 for i in range (len (legal_models )):
584- self .assertTrue (model_single_core (legal_models [i ]) == answers [i ])
588+ self .assertTrue (_check_n_jobs (legal_models [i ]) == answers [i ])
585589
586590 for i in range (len (illegal_models )):
587- self .assertRaises (PyOpenMLError , model_single_core , illegal_models [i ])
591+ self .assertRaises (PyOpenMLError , _check_n_jobs , illegal_models [i ])
0 commit comments