Skip to content

Commit 828679e

Browse files
committed
adjusted prediction check
1 parent 10da40d commit 828679e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

openml/runs/run.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,10 @@ def get_metric_fn(self, sklearn_fn, kwargs={}):
134134
else:
135135
raise ValueError('Run should have been locally executed.')
136136

137-
if 'correct' not in predictions_arff['attributes']:
137+
attribute_names = [att[0] for att in predictions_arff['attributes']]
138+
if 'correct' not in attribute_names:
138139
raise ValueError('Attribute "correct" should be set')
139-
if 'predict' not in predictions_arff['attributes']:
140+
if 'prediction' not in attribute_names:
140141
raise ValueError('Attribute "predict" should be set')
141142

142143
def _attribute_list_to_dict(attribute_list):

0 commit comments

Comments
 (0)