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
I get some sort of dimensionality error (I don't remember the exact message) because Metric._reduce_states(...) tries to add the states instead of concatenating.
Expected behavior
When passing dist_reduce_fx='cat' metric states are supposed to be concatenated when updated, not added.
Environment
I encountered the bug in torchmetrics v1.2.0 installed via pip, but it can also be found in the current master branch
Additional context
How to fix
In src/torchmetrics/metric.py method Meric._reduce_states(...), it currently says
I created a pull request with my fix. I don't know if I followed the guidelines correctly though (i requested a pull into the master branch if that's okay).
🐛 Bug
The function Metric._reduce_states(...) is supposed to concat states when told to use "cat", but instead tries to add.
To Reproduce
Try to update metric states initialized with
dist_reduce_fx='cat'
First define the metric states in the Metric class init function
And then, when trying to update the metric with
I get some sort of dimensionality error (I don't remember the exact message) because
Metric._reduce_states(...)
tries to add the states instead of concatenating.Expected behavior
When passing
dist_reduce_fx='cat'
metric states are supposed to be concatenated when updated, not added.Environment
I encountered the bug in torchmetrics v1.2.0 installed via pip, but it can also be found in the current master branch
Additional context
How to fix
In
src/torchmetrics/metric.py
methodMeric._reduce_states(...)
, it currently saysinstead it should say something like
The text was updated successfully, but these errors were encountered: