Skip to content

Commit 0f83e32

Browse files
committed
Removing nested-if + Modifying error message
1 parent 05139c3 commit 0f83e32

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

openml/runs/functions.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,12 @@ def obtain_field(xml_obj, fieldname, from_server, cast=None):
665665

666666
if 'oml:input_data' in run:
667667
dataset_id = int(run['oml:input_data']['oml:dataset']['oml:did'])
668+
elif not from_server:
669+
dataset_id = None
668670
else:
669-
if not from_server:
670-
dataset_id = None
671-
else:
672-
raise ValueError('Uploaded run does not contain input_data.')
671+
raise ValueError('Uploaded run does not contain input_data for run_id={}.\n'
672+
'Kindly report this server-side issue at: '
673+
'https://github.com/openml/openml-python/issues'.format(run_id))
673674

674675
files = OrderedDict()
675676
evaluations = OrderedDict()

0 commit comments

Comments
 (0)