@@ -396,6 +396,7 @@ def _check_sample_evaluations(
396396 # Windows seems to get an eval-time of 0 sometimes.
397397 assert evaluation > 0
398398 assert evaluation < max_time_allowed
399+
399400 @pytest .mark .sklearn ()
400401 @pytest .mark .test_server ()
401402 def test_run_regression_on_classif_task (self ):
@@ -412,6 +413,7 @@ def test_run_regression_on_classif_task(self):
412413 model = clf ,
413414 task = task ,
414415 )
416+
415417 @pytest .mark .sklearn ()
416418 @pytest .mark .test_server ()
417419 def test_check_erronous_sklearn_flow_fails (self ):
@@ -624,6 +626,7 @@ def _run_and_upload_regression(
624626 task_type = task_type ,
625627 sentinel = sentinel ,
626628 )
629+
627630 @pytest .mark .sklearn ()
628631 @pytest .mark .test_server ()
629632 def test_run_and_upload_logistic_regression (self ):
@@ -632,6 +635,7 @@ def test_run_and_upload_logistic_regression(self):
632635 n_missing_vals = self .TEST_SERVER_TASK_SIMPLE ["n_missing_vals" ]
633636 n_test_obs = self .TEST_SERVER_TASK_SIMPLE ["n_test_obs" ]
634637 self ._run_and_upload_classification (lr , task_id , n_missing_vals , n_test_obs , "62501" )
638+
635639 @pytest .mark .sklearn ()
636640 @pytest .mark .test_server ()
637641 def test_run_and_upload_linear_regression (self ):
@@ -662,6 +666,7 @@ def test_run_and_upload_linear_regression(self):
662666 n_missing_vals = self .TEST_SERVER_TASK_REGRESSION ["n_missing_vals" ]
663667 n_test_obs = self .TEST_SERVER_TASK_REGRESSION ["n_test_obs" ]
664668 self ._run_and_upload_regression (lr , task_id , n_missing_vals , n_test_obs , "62501" )
669+
665670 @pytest .mark .sklearn ()
666671 @pytest .mark .test_server ()
667672 def test_run_and_upload_pipeline_dummy_pipeline (self ):
@@ -675,6 +680,7 @@ def test_run_and_upload_pipeline_dummy_pipeline(self):
675680 n_missing_vals = self .TEST_SERVER_TASK_SIMPLE ["n_missing_vals" ]
676681 n_test_obs = self .TEST_SERVER_TASK_SIMPLE ["n_test_obs" ]
677682 self ._run_and_upload_classification (pipeline1 , task_id , n_missing_vals , n_test_obs , "62501" )
683+
678684 @pytest .mark .sklearn ()
679685 @unittest .skipIf (
680686 Version (sklearn .__version__ ) < Version ("0.20" ),
@@ -791,6 +797,7 @@ def test_run_and_upload_knn_pipeline(self, warnings_mock):
791797 if _warnings [0 ][0 ] == warning_msg :
792798 call_count += 1
793799 assert call_count == 3
800+
794801 @pytest .mark .sklearn ()
795802 @pytest .mark .test_server ()
796803 def test_run_and_upload_gridsearch (self ):
@@ -813,6 +820,7 @@ def test_run_and_upload_gridsearch(self):
813820 flow_expected_rsv = "62501" ,
814821 )
815822 assert len (run .trace .trace_iterations ) == 9
823+
816824 @pytest .mark .sklearn ()
817825 @pytest .mark .test_server ()
818826 def test_run_and_upload_randomsearch (self ):
@@ -845,6 +853,7 @@ def test_run_and_upload_randomsearch(self):
845853 assert len (run .trace .trace_iterations ) == 5
846854 trace = openml .runs .get_run_trace (run .run_id )
847855 assert len (trace .trace_iterations ) == 5
856+
848857 @pytest .mark .sklearn ()
849858 @pytest .mark .test_server ()
850859 def test_run_and_upload_maskedarrays (self ):
@@ -872,6 +881,7 @@ def test_run_and_upload_maskedarrays(self):
872881 )
873882
874883 ##########################################################################
884+
875885 @pytest .mark .sklearn ()
876886 @pytest .mark .test_server ()
877887 def test_learning_curve_task_1 (self ):
@@ -896,6 +906,7 @@ def test_learning_curve_task_1(self):
896906 flow_expected_rsv = "62501" ,
897907 )
898908 self ._check_sample_evaluations (run .sample_evaluations , num_repeats , num_folds , num_samples )
909+
899910 @pytest .mark .sklearn ()
900911 @pytest .mark .test_server ()
901912 def test_learning_curve_task_2 (self ):
@@ -932,6 +943,7 @@ def test_learning_curve_task_2(self):
932943 flow_expected_rsv = "62501" ,
933944 )
934945 self ._check_sample_evaluations (run .sample_evaluations , num_repeats , num_folds , num_samples )
946+
935947 @pytest .mark .sklearn ()
936948 @unittest .skipIf (
937949 Version (sklearn .__version__ ) < Version ("0.21" ),
@@ -1010,6 +1022,7 @@ def _test_local_evaluations(self, run):
10101022 for idx in range (len (alt_scores )):
10111023 assert alt_scores [idx ] >= 0
10121024 assert alt_scores [idx ] <= 1
1025+
10131026 @pytest .mark .sklearn ()
10141027 @pytest .mark .test_server ()
10151028 def test_local_run_swapped_parameter_order_model (self ):
@@ -1025,6 +1038,7 @@ def test_local_run_swapped_parameter_order_model(self):
10251038 )
10261039
10271040 self ._test_local_evaluations (run )
1041+
10281042 @pytest .mark .sklearn ()
10291043 @unittest .skipIf (
10301044 Version (sklearn .__version__ ) < Version ("0.20" ),
@@ -1053,6 +1067,7 @@ def test_local_run_swapped_parameter_order_flow(self):
10531067 )
10541068
10551069 self ._test_local_evaluations (run )
1070+
10561071 @pytest .mark .sklearn ()
10571072 @unittest .skipIf (
10581073 Version (sklearn .__version__ ) < Version ("0.20" ),
@@ -1090,6 +1105,7 @@ def test_online_run_metric_score(self):
10901105 run = openml .runs .get_run (9864498 )
10911106
10921107 self ._test_local_evaluations (run )
1108+
10931109 @pytest .mark .sklearn ()
10941110 @unittest .skipIf (
10951111 Version (sklearn .__version__ ) < Version ("0.20" ),
@@ -1151,6 +1167,7 @@ def test_initialize_model_from_run(self):
11511167
11521168 assert flowS .components ["Imputer" ].parameters ["strategy" ] == '"most_frequent"'
11531169 assert flowS .components ["VarianceThreshold" ].parameters ["threshold" ] == "0.05"
1170+
11541171 @pytest .mark .sklearn ()
11551172 @unittest .skipIf (
11561173 Version (sklearn .__version__ ) < Version ("0.20" ),
@@ -1210,6 +1227,7 @@ def test__run_exists(self):
12101227 assert setup_exists > 0 , "Server says setup of run does not exist."
12111228 run_ids = run_exists (task .task_id , setup_exists )
12121229 assert run_ids , (run_ids , clf )
1230+
12131231 @pytest .mark .sklearn ()
12141232 @pytest .mark .test_server ()
12151233 def test_run_with_illegal_flow_id (self ):
@@ -1229,6 +1247,7 @@ def test_run_with_illegal_flow_id(self):
12291247 flow = flow ,
12301248 avoid_duplicate_runs = True ,
12311249 )
1250+
12321251 @pytest .mark .sklearn ()
12331252 @pytest .mark .test_server ()
12341253 def test_run_with_illegal_flow_id_after_load (self ):
@@ -1286,6 +1305,7 @@ def test_run_with_illegal_flow_id_1(self):
12861305 flow = flow_new ,
12871306 avoid_duplicate_runs = True ,
12881307 )
1308+
12891309 @pytest .mark .sklearn ()
12901310 @pytest .mark .test_server ()
12911311 def test_run_with_illegal_flow_id_1_after_load (self ):
@@ -1324,6 +1344,7 @@ def test_run_with_illegal_flow_id_1_after_load(self):
13241344 expected_message_regex ,
13251345 loaded_run .publish ,
13261346 )
1347+
13271348 @pytest .mark .sklearn ()
13281349 @unittest .skipIf (
13291350 Version (sklearn .__version__ ) < Version ("0.20" ),
@@ -1553,6 +1574,7 @@ def test_get_runs_list_by_tag(self):
15531574 # Don't remove the size restriction: this query is too expensive without
15541575 runs = openml .runs .list_runs (tag = "curves" , size = 2 )
15551576 assert len (runs ) >= 1
1577+
15561578 @pytest .mark .sklearn ()
15571579 @unittest .skipIf (
15581580 Version (sklearn .__version__ ) < Version ("0.20" ),
@@ -1589,6 +1611,7 @@ def test_run_on_dataset_with_missing_labels_dataframe(self):
15891611 for row in data_content :
15901612 # repeat, fold, row_id, 6 confidences, prediction and correct label
15911613 assert len (row ) == 12
1614+
15921615 @pytest .mark .sklearn ()
15931616 @unittest .skipIf (
15941617 Version (sklearn .__version__ ) < Version ("0.20" ),
@@ -1642,6 +1665,7 @@ def test_get_uncached_run(self):
16421665 openml .config .set_root_cache_directory (self .static_cache_dir )
16431666 with pytest .raises (openml .exceptions .OpenMLCacheException ):
16441667 openml .runs .functions ._get_cached_run (10 )
1668+
16451669 @pytest .mark .sklearn ()
16461670 @pytest .mark .test_server ()
16471671 def test_run_flow_on_task_downloaded_flow (self ):
@@ -1741,6 +1765,9 @@ def test_format_prediction_task_regression(self):
17411765 ignored_input = [0 ] * 5
17421766 res = format_prediction (regression , * ignored_input )
17431767 self .assertListEqual (res , [0 ] * 5 )
1768+
1769+
1770+
17441771 @unittest .skipIf (
17451772 Version (sklearn .__version__ ) < Version ("0.20" ),
17461773 reason = "SimpleImputer doesn't handle mixed type DataFrame as input" ,
@@ -1836,6 +1863,8 @@ def test_delete_unknown_run(mock_delete, test_files_directory, test_api_key):
18361863 run_url = f"{ openml .config .TEST_SERVER_URL } /api/v1/xml/run/9999999"
18371864 assert run_url == mock_delete .call_args .args [0 ]
18381865 assert test_api_key == mock_delete .call_args .kwargs .get ("params" , {}).get ("api_key" )
1866+
1867+
18391868@pytest .mark .sklearn ()
18401869@unittest .skipIf (
18411870 Version (sklearn .__version__ ) < Version ("0.21" ),
@@ -1916,6 +1945,8 @@ def test__run_task_get_arffcontent_2(parallel_mock):
19161945 decimal = 2 ,
19171946 err_msg = "Observed performance scores deviate from expected ones." ,
19181947 )
1948+
1949+
19191950@pytest .mark .sklearn ()
19201951@unittest .skipIf (
19211952 Version (sklearn .__version__ ) < Version ("0.21" ),
@@ -1985,7 +2016,6 @@ def test_joblib_backends(parallel_mock, n_jobs, backend, call_count):
19852016 n_jobs = n_jobs ,
19862017 )
19872018 from openml_sklearn import SklearnExtension
1988-
19892019 extension = SklearnExtension ()
19902020 with parallel_backend (backend , n_jobs = n_jobs ):
19912021 res = openml .runs .functions ._run_task_get_arffcontent (
@@ -2002,4 +2032,4 @@ def test_joblib_backends(parallel_mock, n_jobs, backend, call_count):
20022032 # *_time_millis_* not recorded when n_jobs = -1
20032033 assert len (res [2 ]["predictive_accuracy" ][0 ]) == 10
20042034 assert len (res [3 ]["predictive_accuracy" ][0 ]) == 10
2005- assert parallel_mock .call_count == call_count
2035+ assert parallel_mock .call_count == call_count
0 commit comments