You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Conda environment with Python 3.10 and torchmetrics 1.3.1 installed into it using pip.
See additional context why further details about environment are not actually important.
Hi! thanks for your contribution!, great first issue!
Borda
changed the title
Mean Average Detection ignores warn_on_many_detections set to False
Mean Average Detection ignores warn_on_many_detections set to False
Apr 5, 2024
🐛 Bug
MeanAverageDetection still outputs warning about too many detections even if warn_on_many_detections set to False.
To Reproduce
The existing unit test could be used for reproduction, just try to set field to False before running it:
https://github.com/Lightning-AI/torchmetrics/blob/master/tests/unittests/detection/test_map.py#L715
The test will detect that warning is still outputted and therefore test passes.
Expected behavior
Warnings are not outputted at all.
Environment
Conda environment with Python 3.10 and torchmetrics 1.3.1 installed into it using pip.
See additional context why further details about environment are not actually important.
Additional context
I looked through sources and already identified the issue: https://github.com/Lightning-AI/torchmetrics/blob/master/src/torchmetrics/detection/mean_ap.py#L803
Basically, warn parameter is never used inside function. Instead it should be a condition for triggering warning.
Also another unit test case for the flag being set to False could be useful.
The text was updated successfully, but these errors were encountered: