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
but in some cases a user want's to check the metric's state first to avoid running into issues.
Torchmetrics should offer the state as a public property to the users and callbacks.
Motivation
Running compute() before update() from lightning's ...epoch_ends callbacks is difficult to implement with multiple dataloaders and multiple metrics: its difficult to keep track of which metrics have been updated already.
Pitch
torchmetrics already has an api to check this, which is used by lightning internally.
🚀 Feature
running
compute
on a metric that hasn't been updated can lead to unforseen consequences. Currently a warning is raised inhttps://github.com/Lightning-AI/metrics/blob/ed2249d1e250dbfc4f2e654b455f43f3d29abfb1/src/torchmetrics/metric.py#L510-L516
but in some cases a user want's to check the metric's state first to avoid running into issues.
Torchmetrics should offer the state as a public property to the users and callbacks.
Motivation
Running
compute()
beforeupdate()
from lightning's...epoch_ends
callbacks is difficult to implement with multiple dataloaders and multiple metrics: its difficult to keep track of which metrics have been updated already.Pitch
torchmetrics already has an api to check this, which is used by lightning internally.
https://github.com/Lightning-AI/metrics/blob/7cab17c680a3970a49d8a765878e28263e6dc302/src/torchmetrics/metric.py#L142-L145
This api is indicated as private, so I would propose to make this public to maintain support.
The text was updated successfully, but these errors were encountered: