Skip to content

fix device mismatch#3316

Merged
justusschock merged 3 commits into
Lightning-AI:masterfrom
GdoongMathew:fix/metric_device
Feb 26, 2026
Merged

fix device mismatch#3316
justusschock merged 3 commits into
Lightning-AI:masterfrom
GdoongMathew:fix/metric_device

Conversation

@GdoongMathew

@GdoongMathew GdoongMathew commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes #<issue_number>

Bring fix from Lightning-AI/pytorch-lightning#21164 to the Metric base class. The default device property should align with the device context from torch.

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?
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/

@codecov

codecov Bot commented Jan 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 37%. Comparing base (41506c3) to head (caeea57).
⚠️ Report is 1 commits behind head on master.

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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mergify mergify Bot added the ready label Jan 15, 2026
@mergify mergify Bot added ready and removed ready labels Feb 26, 2026
@justusschock
justusschock merged commit 4d52812 into Lightning-AI:master Feb 26, 2026
75 of 80 checks passed
@GdoongMathew
GdoongMathew deleted the fix/metric_device branch March 9, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants