Skip to content
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

Fix child device #542

Merged
merged 10 commits into from
Sep 24, 2021
Merged

Fix child device #542

merged 10 commits into from
Sep 24, 2021

Conversation

SkafteNicki
Copy link
Member

@SkafteNicki SkafteNicki commented Sep 21, 2021

Before submitting

  • Was this discussed/approved 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?

What does this PR do?

Fixes #531
Currently if a metric is a child of a module, the device property (only the property, the metric states are still correctly updated) of the metric will not get properly update (only if .cuda(), .cpu(), to() is directly called on the metric) when calling .cuda() on the module. This PR fixes it.

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 🙃

@an1lam an1lam mentioned this pull request Sep 21, 2021
4 tasks
@codecov
Copy link

codecov bot commented Sep 21, 2021

Codecov Report

Merging #542 (80de7c2) into master (f9d7d5f) will increase coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #542   +/-   ##
=====================================
  Coverage      95%    95%           
=====================================
  Files         132    132           
  Lines        4680   4660   -20     
=====================================
- Hits         4461   4444   -17     
+ Misses        219    216    -3     

@mergify mergify bot removed the has conflicts label Sep 21, 2021
@SkafteNicki SkafteNicki added the Priority Critical task/issue label Sep 21, 2021
@cowwoc
Copy link

cowwoc commented Sep 21, 2021

@SkafteNicki Thank you for working on this fix!

@SkafteNicki
Copy link
Member Author

@cowwoc if you have the time, please confirm that this fixes your original issue :]

@an1lam
Copy link
Contributor

an1lam commented Sep 22, 2021

Thanks @SkafteNicki!

@SkafteNicki SkafteNicki enabled auto-merge (squash) September 24, 2021 07:36
@SkafteNicki SkafteNicki merged commit 9ef98b4 into master Sep 24, 2021
@mergify mergify bot added ready and removed ready labels Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix Something isn't working Priority Critical task/issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metric not moved to device
5 participants