From 5b977c645ace39a5fc2d8918a54a39c96c894b3b Mon Sep 17 00:00:00 2001 From: nickotto Date: Fri, 28 Jul 2023 10:50:54 -0700 Subject: [PATCH] update to estimator api changes for the unit tests --- tpot2/tests/test_estimators.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tpot2/tests/test_estimators.py b/tpot2/tests/test_estimators.py index 71539923..a60b867f 100644 --- a/tpot2/tests/test_estimators.py +++ b/tpot2/tests/test_estimators.py @@ -14,8 +14,8 @@ def tpot_estimator(): classification=True, n_jobs=1, early_stop=5, - other_objective_functions= [ tpot2.estimator_objective_functions.average_path_length_objective, tpot2.estimator_objective_functions.number_of_nodes_objective], - other_objective_functions_weights=[-1, -1], + other_objective_functions= [], + other_objective_functions_weights=[], verbose=1) @pytest.fixture @@ -81,15 +81,11 @@ def test_tpot_estimator_config_dict_type(): @pytest.fixture def tpot_classifier(): - return tpot2.tpot_estimator.templates.TPOTClassifier(population_size=5, - generations=2, - verbose=1) + return tpot2.tpot_estimator.templates.TPOTClassifier(max_time_seconds=10,verbose=1) @pytest.fixture def tpot_regressor(): - return tpot2.tpot_estimator.templates.TPOTRegressor(population_size=5, - generations=2, - verbose=1) + return tpot2.tpot_estimator.templates.TPOTRegressor(max_time_seconds=10,verbose=1) def test_tpot_classifier_fit(tpot_classifier,sample_dataset): #load iris dataset