Skip to content

Commit d925655

Browse files
committed
if else around non guaranteed run element
1 parent e0f4585 commit d925655

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

openml/runs/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from .run import OpenMLRun
2-
from .functions import (run_task, get_run, list_runs)
2+
from .functions import (run_task, get_run, list_runs, get_runs)
33

4-
__all__ = ['OpenMLRun', 'run_task', 'get_run', 'list_runs']
4+
__all__ = ['OpenMLRun', 'run_task', 'get_run', 'list_runs', 'get_runs']

openml/runs/functions.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,11 @@ def _create_run_from_xml(xml):
200200
uploader_name = run['oml:uploader_name']
201201
task_id = int(run['oml:task_id'])
202202
task_type = run['oml:task_type']
203-
task_evaluation_measure = run['oml:task_evaluation_measure']
203+
if 'oml:task_evaluation_measure' in run:
204+
task_evaluation_measure = run['oml:task_evaluation_measure']
205+
else:
206+
task_evaluation_measure = None
207+
204208
flow_id = int(run['oml:flow_id'])
205209
flow_name = run['oml:flow_name']
206210
setup_id = int(run['oml:setup_id'])

0 commit comments

Comments
 (0)