Skip to content

Commit e873568

Browse files
committed
make unit test work
1 parent 828679e commit e873568

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_runs/test_run_functions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ def test_run_and_upload(self):
329329
random_state_value=rsv)
330330

331331
# obtain accuracy scores using get_metric_score:
332-
accuracy_scores = run.get_metric_score(sklearn.metrics.accuracy_score)
332+
accuracy_scores = run.get_metric_fn(sklearn.metrics.accuracy_score)
333333
# compare with the scores in user defined measures
334334
accuracy_scores_provided = []
335335
for rep in run.fold_evaluations['predictive_accuracy'].keys():
@@ -425,7 +425,7 @@ def _test_local_evaluations(self, run):
425425

426426
# also check if we can obtain some other scores: # TODO: how to do AUC?
427427
tests = [(sklearn.metrics.cohen_kappa_score, {'weights': None}),
428-
(sklearn.metrics.auc, {}),
428+
(sklearn.metrics.auc, {'reorder': True}),
429429
(sklearn.metrics.average_precision_score, {}),
430430
(sklearn.metrics.jaccard_similarity_score, {}),
431431
(sklearn.metrics.precision_score, {'average': 'macro'}),
@@ -452,7 +452,7 @@ def test_local_run_metric_score(self):
452452

453453
def test_online_run_metric_score(self):
454454
openml.config.server = self.production_server
455-
run = openml.runs.get_run(5572567)
455+
run = openml.runs.get_run(5965513) # important to use binary classification task, due to assertions
456456
self._test_local_evaluations(run)
457457

458458

0 commit comments

Comments
 (0)