fix device mismatch#3316
Merged
justusschock merged 3 commits intoFeb 26, 2026
Merged
Conversation
GdoongMathew
requested review from
SkafteNicki,
justusschock and
lantiga
as code owners
January 15, 2026 06:26
Borda
approved these changes
Jan 15, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3316 +/- ##
=======================================
- Coverage 37% 37% -1%
=======================================
Files 364 349 -15
Lines 20098 19904 -194
=======================================
- Hits 7520 7327 -193
+ Misses 12578 12577 -1 🚀 New features to boost your workflow:
|
rittik9
force-pushed
the
fix/metric_device
branch
from
January 26, 2026 16:06
b3e7e70 to
ea248ed
Compare
rittik9
force-pushed
the
fix/metric_device
branch
from
January 28, 2026 16:52
0449059 to
63de528
Compare
bhimrazy
approved these changes
Feb 26, 2026
justusschock
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #<issue_number>
Bring fix from Lightning-AI/pytorch-lightning#21164 to the
Metricbase class. The default device property should align with the device context from torch.Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃
📚 Documentation preview 📚: https://torchmetrics--3316.org.readthedocs.build/en/3316/