Skip to content

Commit 9a9917a

Browse files
committed
incorporate comments from Jan
1 parent 9d6bea1 commit 9a9917a

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

openml/flows/flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def _from_dict(cls, xml_dict):
324324
arguments['model'] = None
325325
flow = cls(**arguments)
326326

327-
if 'sklearn' in arguments['external_version']:
327+
if arguments['external_version'].startswith('sklearn'):
328328
from .sklearn_converter import flow_to_sklearn
329329
model = flow_to_sklearn(flow)
330330
else:

openml/runs/functions.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,12 @@ def run_flow_on_task(task, flow, avoid_duplicate_runs=True, flow_tags=None,
9999
run_environment = _get_version_information()
100100
tags = ['openml-python', run_environment[1]]
101101
# execute the run
102-
run = OpenMLRun(task_id=task.task_id, flow_id=None, dataset_id=dataset.dataset_id,
103-
model=flow.model, tags=tags)
102+
run = OpenMLRun(task_id=task.task_id, flow_id=flow.flow_id,
103+
dataset_id=dataset.dataset_id, model=flow.model, tags=tags)
104104
run.parameter_settings = OpenMLRun._parse_parameters(flow)
105105
res = _run_task_get_arffcontent(flow.model, task, class_labels)
106106
run.data_content, run.trace_content, run.trace_attributes, run.detailed_evaluations = res
107107

108-
run.flow_id = flow.flow_id
109108
config.logger.info('Executed Task %d with Flow id: %d' % (task.task_id, run.flow_id))
110109

111110
return run

0 commit comments

Comments
 (0)