Skip to content

Commit

Permalink
Update MetricTracker's tests (Lightning-AI#1428)
Browse files Browse the repository at this point in the history
* Add test case to `test_raises_error_on_wrong_input` to check that the initialization of a MetricTracker with a single `metric` and a list `maximize` raises a ValueError
  • Loading branch information
ValerianRey committed Jan 6, 2023
1 parent e919d57 commit 03455bc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/unittests/wrappers/test_tracker.py
Expand Up @@ -41,6 +41,11 @@ def test_raises_error_on_wrong_input():
):
MetricTracker(MetricCollection([MeanAbsoluteError(), MeanSquaredError()]), maximize=[False, False, False])

with pytest.raises(
ValueError, match="Argument `maximize` should be a single bool when `metric` is a single Metric"
):
MetricTracker(MeanAbsoluteError(), maximize=[False])


@pytest.mark.parametrize(
"method, method_input",
Expand Down

0 comments on commit 03455bc

Please sign in to comment.