@@ -80,7 +80,8 @@ def run_task(task, model, avoid_duplicate_runs=True, flow_tags=None, seed=None):
8080 tags = ['openml-python' , run_environment [1 ]]
8181 # execute the run
8282 run = OpenMLRun (task_id = task .task_id , flow_id = None , dataset_id = dataset .dataset_id , model = model , tags = tags )
83- run .data_content , run .trace_content , run .trace_attributes = _run_task_get_arffcontent (model , task , class_labels )
83+ res = _run_task_get_arffcontent (model , task , class_labels )
84+ run .data_content , run .trace_content , run .trace_attributes , run .detailed_evaluations = res
8485
8586 if flow_id == False :
8687 # means the flow did not exists. As we could run it, publish it now
@@ -274,6 +275,12 @@ def _prediction_to_row(rep_no, fold_no, row_id, correct_label, predicted_label,
274275 arff_line : list
275276 representation of the current prediction in OpenML format
276277 """
278+ if not isinstance (rep_no , (int , np .integer )): raise ValueError ('rep_no should be int' )
279+ if not isinstance (fold_no , (int , np .integer )): raise ValueError ('fold_no should be int' )
280+ if not isinstance (row_id , (int , np .integer )): raise ValueError ('row_id should be int' )
281+ if not len (predicted_probabilities ) == len (model_classes_mapping ):
282+ raise ValueError ('len(predicted_probabilities) != len(class_labels)' )
283+
277284 arff_line = [rep_no , fold_no , row_id ]
278285 for class_label_idx in range (len (class_labels )):
279286 if class_label_idx in model_classes_mapping :
@@ -366,7 +373,7 @@ def _run_task_get_arffcontent(model, task, class_labels):
366373 else :
367374 arff_tracecontent = None
368375 arff_trace_attributes = None
369- return arff_datacontent , arff_tracecontent , arff_trace_attributes
376+ return arff_datacontent , arff_tracecontent , arff_trace_attributes , user_defined_measures
370377
371378
372379def _extract_arfftrace (model , rep_no , fold_no ):
0 commit comments