Skip to content

Commit eab1720

Browse files
committed
added runtime to publish (was not there yet .. )
1 parent bf8b009 commit eab1720

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

openml/runs/functions.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ def run_task(task, model, avoid_duplicate_runs=True, flow_tags=None, seed=None):
8282
tags = ['openml-python', run_environment[1]]
8383
# execute the run
8484
run = OpenMLRun(task_id=task.task_id, flow_id=None, dataset_id=dataset.dataset_id, model=model, tags=tags)
85-
run.data_content, run.trace_content, run.trace_attributes = _run_task_get_arffcontent(model, task, class_labels)
85+
res = _run_task_get_arffcontent(model, task, class_labels)
86+
run.data_content, run.trace_content, run.trace_attributes, run.detailed_evaluations = res
8687

8788
if flow_id == False:
8889
# means the flow did not exists. As we could run it, publish it now
@@ -372,7 +373,7 @@ def _run_task_get_arffcontent(model, task, class_labels):
372373
else:
373374
arff_tracecontent = None
374375
arff_trace_attributes = None
375-
return arff_datacontent, arff_tracecontent, arff_trace_attributes
376+
return arff_datacontent, arff_tracecontent, arff_trace_attributes, user_defined_measures
376377

377378

378379
def _extract_arfftrace(model, rep_no, fold_no):

tests/test_runs/test_run_functions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ def test_run_and_upload(self):
190190
self.assertEqual(len(run.trace_content), num_iterations * num_folds)
191191
check_res = self._check_serialized_optimized_run(run.run_id)
192192
self.assertTrue(check_res)
193+
194+
# todo: check if runtime is present
195+
pass
193196

194197

195198
def test_initialize_model_from_run(self):
@@ -375,7 +378,7 @@ def test__extract_arfftrace(self):
375378
self.assertIsInstance(trace_list[line_idx][att_idx], float)
376379

377380

378-
self.assertEqual(param_grid.keys(), optimized_params)
381+
self.assertEqual(set(param_grid.keys()), optimized_params)
379382

380383
def test__prediction_to_row(self):
381384
repeat_nr = 0

0 commit comments

Comments
 (0)