@@ -266,8 +266,7 @@ def test_search_batch_times(caplog, X_y_binary, AutoMLTestEnv):
266266
267267 assert len (batch_times ) == 3
268268 assert len (batch_times [1 ]) == 2
269- assert len (batch_times [2 ]) == 2
270- assert len (batch_times [3 ]) == 6
269+ assert len (batch_times [2 ]) == 6
271270
272271 assert "Batch Time Stats" in out
273272 assert "Batch 1 time stats" in out
@@ -363,11 +362,11 @@ def test_pipeline_limits(
363362 automl .search ()
364363 out = caplog .text
365364 if verbose :
366- assert "Using default limit of max_batches=3 ." in out
367- assert "Searching up to 3 batches for a total of" in out
365+ assert "Using default limit of max_batches=2 ." in out
366+ assert "Searching up to 2 batches for a total of" in out
368367 else :
369- assert "Using default limit of max_batches=3 ." not in out
370- assert "Searching up to 3 batches for a total of" not in out
368+ assert "Using default limit of max_batches=2 ." not in out
369+ assert "Searching up to 2 batches for a total of" not in out
371370 assert len (automl .results ["pipeline_results" ]) > 0
372371
373372 caplog .clear ()
@@ -1806,6 +1805,7 @@ def test_pipelines_in_batch_return_nan(
18061805 y_train = y ,
18071806 problem_type = "binary" ,
18081807 max_batches = 3 ,
1808+ automl_algorithm = "iterative" ,
18091809 allowed_component_graphs = {"Name" : [dummy_classifier_estimator_class ]},
18101810 n_jobs = 1 ,
18111811 )
@@ -1819,7 +1819,10 @@ def test_pipelines_in_batch_return_nan(
18191819 automl .search ()
18201820 assert len (automl .errors ) > 0
18211821 for pipeline_name , pipeline_error in automl .errors .items ():
1822- assert "Label Encoder" in pipeline_error ["Parameters" ]
1822+ assert (
1823+ "Label Encoder" in pipeline_error ["Parameters" ]
1824+ or "Mock Classifier" in pipeline_error ["Parameters" ]
1825+ )
18231826 assert isinstance (pipeline_error ["Exception" ], TypeError )
18241827 assert "line" in pipeline_error ["Traceback" ]
18251828
@@ -1858,7 +1861,8 @@ def test_pipelines_in_batch_return_none(
18581861 X_train = X ,
18591862 y_train = y ,
18601863 problem_type = "binary" ,
1861- max_batches = 3 ,
1864+ max_batches = 2 ,
1865+ automl_algorithm = "iterative" ,
18621866 allowed_component_graphs = {"Name" : [dummy_classifier_estimator_class ]},
18631867 n_jobs = 1 ,
18641868 )
@@ -2295,7 +2299,7 @@ def test_time_series_regression_with_parameters(ts_data):
22952299 allowed_component_graphs = {"Name_0" : ["Imputer" , "Linear Regressor" ]},
22962300 objective = "auto" ,
22972301 problem_configuration = problem_configuration ,
2298- max_batches = 3 ,
2302+ max_batches = 2 ,
22992303 )
23002304 assert (
23012305 automl .automl_algorithm .search_parameters ["pipeline" ] == problem_configuration
@@ -2340,7 +2344,7 @@ def test_automl_accepts_component_graphs(graph_type, X_y_binary):
23402344 problem_type = "binary" ,
23412345 allowed_component_graphs = {"Dummy_Name" : component_graph },
23422346 objective = "auto" ,
2343- max_batches = 3 ,
2347+ max_batches = 2 ,
23442348 )
23452349 for pipeline_ in automl .allowed_pipelines :
23462350 assert isinstance (pipeline_ , BinaryClassificationPipeline )
@@ -4154,7 +4158,7 @@ def test_automl_drop_unknown_columns(columns, AutoMLTestEnv, X_y_binary, caplog)
41544158 y_train = y ,
41554159 problem_type = "binary" ,
41564160 optimize_thresholds = False ,
4157- max_batches = 3 ,
4161+ max_batches = 2 ,
41584162 verbose = True ,
41594163 )
41604164 env = AutoMLTestEnv ("binary" )
@@ -4296,7 +4300,7 @@ def dummy_mock_get_preprocessing_components(*args, **kwargs):
42964300 max_batches = 1 ,
42974301 verbose = verbose ,
42984302 )
4299- env = AutoMLTestEnv ("binary " )
4303+ env = AutoMLTestEnv ("regression " )
43004304 with env .test_context (score_return_value = {automl .objective .name : 1.0 }):
43014305 automl .search ()
43024306
@@ -4466,7 +4470,7 @@ def test_automl_ensembler_allowed_component_graphs(
44664470 problem_type = "regression" ,
44674471 allowed_component_graphs = component_graphs ,
44684472 ensembling = True ,
4469- max_batches = 4 ,
4473+ max_batches = 3 ,
44704474 verbose = True ,
44714475 )
44724476 automl .search ()
@@ -4569,7 +4573,7 @@ def test_automl_passes_known_in_advance_pipeline_parameters_to_all_pipelines(
45694573 X_train = X ,
45704574 y_train = y ,
45714575 problem_type = problem_type ,
4572- max_batches = 3 ,
4576+ max_batches = 2 ,
45734577 problem_configuration = {
45744578 "time_index" : "date" ,
45754579 "max_delay" : 3 ,
@@ -4620,7 +4624,7 @@ def test_cv_ranking_scores(
46204624 X_train = X ,
46214625 y_train = y ,
46224626 problem_type = "binary" ,
4623- max_batches = 3 ,
4627+ max_batches = 2 ,
46244628 data_splitter = data_splitter ,
46254629 allowed_component_graphs = {"Name" : [dummy_classifier_estimator_class ]},
46264630 n_jobs = 1 ,
@@ -4724,7 +4728,7 @@ def test_search_parameters_held_automl(
47244728 ],
47254729 },
47264730 }
4727- batches = 2 if algorithm == "default" else batches
4731+ batches = 2 if algorithm == "default" else batches
47284732
47294733 search_parameters = {
47304734 "Imputer" : {"numeric_impute_strategy" : parameter },
@@ -4814,7 +4818,7 @@ def test_automl_accepts_features(
48144818 y_train = y ,
48154819 problem_type = "binary" ,
48164820 optimize_thresholds = False ,
4817- max_batches = 3 ,
4821+ max_batches = 2 ,
48184822 features = features ,
48194823 automl_algorithm = automl_algorithm ,
48204824 )
@@ -4858,7 +4862,7 @@ def test_automl_with_empty_features_list(
48584862 y_train = y ,
48594863 problem_type = "binary" ,
48604864 optimize_thresholds = False ,
4861- max_batches = 3 ,
4865+ max_batches = 2 ,
48624866 features = [],
48634867 automl_algorithm = automl_algorithm ,
48644868 )
@@ -5071,7 +5075,7 @@ def test_default_algorithm_uses_n_jobs(X_y_binary, AutoMLTestEnv):
50715075 X_train = X ,
50725076 y_train = y ,
50735077 problem_type = "binary" ,
5074- max_batches = 3 ,
5078+ max_batches = 2 ,
50755079 automl_algorithm = "default" ,
50765080 n_jobs = 2 ,
50775081 )
@@ -5521,7 +5525,7 @@ def test_holdout_set_results_and_rankings(caplog, AutoMLTestEnv):
55215525 X_train = X ,
55225526 y_train = y ,
55235527 problem_type = "binary" ,
5524- max_batches = 3 ,
5528+ max_batches = 2 ,
55255529 automl_algorithm = "default" ,
55265530 verbose = True ,
55275531 holdout_set_size = 0.1 ,
0 commit comments