Skip to content

Commit

Permalink
Merge pull request #206 from openml/fix205
Browse files Browse the repository at this point in the history
if else around non guaranteed run element
  • Loading branch information
joaquinvanschoren committed Mar 3, 2017
2 parents 93badda + d925655 commit c1c59d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions openml/runs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .run import OpenMLRun
from .functions import (run_task, get_run, list_runs)
from .functions import (run_task, get_run, list_runs, get_runs)

__all__ = ['OpenMLRun', 'run_task', 'get_run', 'list_runs']
__all__ = ['OpenMLRun', 'run_task', 'get_run', 'list_runs', 'get_runs']
6 changes: 5 additions & 1 deletion openml/runs/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ def _create_run_from_xml(xml):
uploader_name = run['oml:uploader_name']
task_id = int(run['oml:task_id'])
task_type = run['oml:task_type']
task_evaluation_measure = run['oml:task_evaluation_measure']
if 'oml:task_evaluation_measure' in run:
task_evaluation_measure = run['oml:task_evaluation_measure']
else:
task_evaluation_measure = None

flow_id = int(run['oml:flow_id'])
flow_name = run['oml:flow_name']
setup_id = int(run['oml:setup_id'])
Expand Down

0 comments on commit c1c59d9

Please sign in to comment.