diff --git a/tests/test_utils/test_comparison.py b/tests/test_utils/test_comparison.py index 411f36be..0e05de21 100644 --- a/tests/test_utils/test_comparison.py +++ b/tests/test_utils/test_comparison.py @@ -19,7 +19,7 @@ def test_are_equal(self) -> None: get_standardization_pipeline, get_morgan_physchem_rf_pipeline, ] - for pipeline_method in pipline_method_list: + for pipeline_method in pipline_method_list: # type: Callable[[int], Pipeline] pipeline_a = pipeline_method() pipeline_b = pipeline_method() self.assertTrue(check_pipelines_equivalent(pipeline_a, pipeline_b)) diff --git a/tests/utils/default_models.py b/tests/utils/default_models.py index 4e864c75..c7c03cad 100644 --- a/tests/utils/default_models.py +++ b/tests/utils/default_models.py @@ -25,9 +25,14 @@ from molpipeline.post_prediction import PostPredictionWrapper -def get_morgan_physchem_rf_pipeline() -> Pipeline: +def get_morgan_physchem_rf_pipeline(n_jobs: int = 1) -> Pipeline: """Get a pipeline combining Morgan fingerprints and physicochemical properties with a RandomForestClassifier. + Parameters + ---------- + n_jobs: int, default=-1 + Number of parallel jobs to use. + Returns ------- Pipeline @@ -47,7 +52,7 @@ def get_morgan_physchem_rf_pipeline() -> Pipeline: ), ), ("error_filter", error_filter), - ("rf", RandomForestClassifier()), + ("rf", RandomForestClassifier(n_jobs=n_jobs)), ( "filter_reinserter", PostPredictionWrapper( @@ -55,12 +60,12 @@ def get_morgan_physchem_rf_pipeline() -> Pipeline: ), ), ], - n_jobs=1, + n_jobs=n_jobs, ) return pipeline -def get_standardization_pipeline(n_jobs: int = -1) -> Pipeline: +def get_standardization_pipeline(n_jobs: int = 1) -> Pipeline: """Get the standardization pipeline. Parameters