Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions 7 openml/runs/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,10 +687,13 @@ def obtain_field(xml_obj, fieldname, from_server, cast=None):
'(OpenML server error?)')
else:
output_data = run['oml:output_data']
predictions_url = None
if 'oml:file' in output_data:
# multiple files, the normal case
for file_dict in output_data['oml:file']:
files[file_dict['oml:name']] = int(file_dict['oml:file_id'])
if file_dict['oml:name'] == 'predictions':
predictions_url = file_dict['oml:url']
if 'oml:evaluation' in output_data:
# in normal cases there should be evaluations, but in case there
# was an error these could be absent
Expand Down Expand Up @@ -757,8 +760,8 @@ def obtain_field(xml_obj, fieldname, from_server, cast=None):
dataset_id=dataset_id, output_files=files,
evaluations=evaluations,
fold_evaluations=fold_evaluations,
sample_evaluations=sample_evaluations,
tags=tags)
sample_evaluations=sample_evaluations, tags=tags,
predictions_url=predictions_url)


def _get_cached_run(run_id):
Expand Down
6 changes: 6 additions & 0 deletions 6 tests/test_runs/test_run_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,12 @@ def test_get_run(self):
self.assertEqual(run.fold_evaluations['f_measure'][0][i], value)
assert ('weka' in run.tags)
assert ('weka_3.7.12' in run.tags)
assert (
run.predictions_url == (
"https://www.openml.org/data/download/1667125/"
"weka_generated_predictions4575715871712251329.arff"
)
)

def _check_run(self, run):
self.assertIsInstance(run, dict)
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.