-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
torchmetrics 0.4+ broke high-precision metric states #484
Comments
Hi! thanks for your contribution!, great first issue! |
Hi @leezu, This is definitely something we need to include in the API redesign going on in PR #479 |
Thank you @SkafteNicki. I'd agree with you on "feature request" if this would have never worked. But it's a bug in that cda5dbd enabled overwriting of user defaults if a
As the Metric is a Module and it's an attribute of the the actual model, I'm looking forward to the redesign in #479 Please ping me if I can help test any changes. Thank you! |
@leezu mind check today RC v0.5.1 |
The issue persists on v0.5.1rc0 @Borda. The reason is that deepspeed calls |
🐛 Bug
Metric states with custom dtype are no longer handled correctly in torchmetrics 0.4 and 0.5.
Consider the following metric, which works fine in 0.3
Code sample to reproduce
Actual behavior
This is the behavior with pytorch-lightning 1.3 or higher + torchmetrics 0.4 or higher.
Note the state is cast to fp16 by deepspeed automatically Lightning-AI/pytorch-lightning#7476.
Expected behavior
This is the behavior with pytorch-lightning 1.3 + torchmetrics 0.3 or higher.
Note the state remains fp64.
Additional context
Reverting
from cda5dbd fixes the issue.
cc @SkafteNicki
The text was updated successfully, but these errors were encountered: