@@ -505,7 +505,6 @@ def _calculate_local_measure(sklearn_fn, openml_name):
505505 user_defined_measures_fold [openml_name ] = sklearn_fn (test_y , pred_y )
506506
507507 if isinstance (task , (OpenMLClassificationTask , OpenMLLearningCurveTask )):
508-
509508 for i , tst_idx in enumerate (test_indices ):
510509 if task .class_labels is not None :
511510 prediction = (
@@ -549,7 +548,6 @@ def _calculate_local_measure(sklearn_fn, openml_name):
549548 )
550549
551550 elif isinstance (task , OpenMLRegressionTask ):
552-
553551 for i , _ in enumerate (test_indices ):
554552 truth = test_y .iloc [i ] if isinstance (test_y , pd .Series ) else test_y [i ]
555553 arff_line = format_prediction (
@@ -570,7 +568,6 @@ def _calculate_local_measure(sklearn_fn, openml_name):
570568 )
571569
572570 elif isinstance (task , OpenMLClusteringTask ):
573-
574571 for i , _ in enumerate (test_indices ):
575572 arff_line = [test_indices [i ], pred_y [i ]] # row_id, cluster ID
576573 arff_datacontent .append (arff_line )
@@ -579,7 +576,6 @@ def _calculate_local_measure(sklearn_fn, openml_name):
579576 raise TypeError (type (task ))
580577
581578 for measure in user_defined_measures_fold :
582-
583579 if measure not in user_defined_measures_per_fold :
584580 user_defined_measures_per_fold [measure ] = OrderedDict ()
585581 if rep_no not in user_defined_measures_per_fold [measure ]:
@@ -674,7 +670,12 @@ def _run_task_get_arffcontent_parallel_helper(
674670 sample_no ,
675671 )
676672 )
677- pred_y , proba_y , user_defined_measures_fold , trace , = extension ._run_model_on_fold (
673+ (
674+ pred_y ,
675+ proba_y ,
676+ user_defined_measures_fold ,
677+ trace ,
678+ ) = extension ._run_model_on_fold (
678679 model = model ,
679680 task = task ,
680681 X_train = train_x ,
0 commit comments