Skip to content

Commit

Permalink
Fix test_best_metric_for_not_well_defined_metric_collection
Browse files Browse the repository at this point in the history
* Assign MetricTracker.best_metric return value to a tuple of the form (best, idx), instead of (idx, best).
  • Loading branch information
ValerianRey committed Jan 31, 2023
1 parent ae5dc4b commit 12209f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unittests/wrappers/test_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def test_best_metric_for_not_well_defined_metric_collection(base_metric):
assert best is None

with pytest.warns(UserWarning, match="Encountered the following error when trying to get the best metric.*"):
idx, best = tracker.best_metric(return_step=True)
best, idx = tracker.best_metric(return_step=True)

if isinstance(best, dict):
assert best["MulticlassAccuracy"] is not None
Expand Down

0 comments on commit 12209f7

Please sign in to comment.