-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Fix metric state reset #5273
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
Merged
Merged
Fix metric state reset #5273
Conversation
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
|
Hello @tadejsv! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-12-29 15:43:51 UTC |
Codecov Report
@@ Coverage Diff @@
## master #5273 +/- ##
======================================
- Coverage 93% 93% -0%
======================================
Files 134 134
Lines 9950 9950
======================================
- Hits 9261 9254 -7
- Misses 689 696 +7 |
teddykoker
approved these changes
Dec 27, 2020
Contributor
teddykoker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch! Thanks :)
s-rog
approved these changes
Dec 28, 2020
ananyahjha93
approved these changes
Dec 29, 2020
Borda
pushed a commit
that referenced
this pull request
Jan 6, 2021
* Fix metric state reset * Fix test * Improve formatting Co-authored-by: Ananya Harsh Jha <[email protected]> (cherry picked from commit 4913cbb)
asnorkin
pushed a commit
to asnorkin/pytorch-lightning
that referenced
this pull request
Jan 15, 2021
* Fix metric state reset * Fix test * Improve formatting Co-authored-by: Ananya Harsh Jha <[email protected]>
asnorkin
pushed a commit
to asnorkin/pytorch-lightning
that referenced
this pull request
Feb 8, 2021
* Fix metric state reset * Fix test * Improve formatting Co-authored-by: Ananya Harsh Jha <[email protected]>
asnorkin
pushed a commit
to asnorkin/pytorch-lightning
that referenced
this pull request
Feb 9, 2021
* Fix metric state reset * Fix test * Improve formatting Co-authored-by: Ananya Harsh Jha <[email protected]>
asnorkin
pushed a commit
to asnorkin/pytorch-lightning
that referenced
this pull request
Feb 16, 2021
* Fix metric state reset * Fix test * Improve formatting Co-authored-by: Ananya Harsh Jha <[email protected]>
asnorkin
pushed a commit
to asnorkin/pytorch-lightning
that referenced
this pull request
Feb 17, 2021
* Fix metric state reset * Fix test * Improve formatting Co-authored-by: Ananya Harsh Jha <[email protected]>
rohitgr7
added a commit
that referenced
this pull request
Feb 22, 2021
* Trainer.test should return only test metrics (#5214) * resolve bug * merge tests * Fix metric state reset (#5273) * Fix metric state reset * Fix test * Improve formatting Co-authored-by: Ananya Harsh Jha <[email protected]> * print() method added to ProgressBar * printing alongside progress bar added to LightningModule.print() * LightningModule.print() method documentation updated * ProgressBarBase.print() stub added * stub * add progress bar tests * fix isort * Progress Callback fixes * test_metric.py duplicate DummyList removed * PEP and isort fixes * CHANGELOG updated * test_progress_bar_print win linesep fix * test_progress_bar.py remove whitespaces * Update CHANGELOG.md Co-authored-by: chaton <[email protected]> Co-authored-by: Tadej Svetina <[email protected]> Co-authored-by: Ananya Harsh Jha <[email protected]> Co-authored-by: Alexander Snorkin <[email protected]> Co-authored-by: rohitgr7 <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]> Co-authored-by: Carlos Mocholí <[email protected]>
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.
This fixes an issue that occurs when the default value of a metric state was
list(), but the current value of the state was a tensor (this happens, for example, after syncing the state in ddp with reduction method"cat"). Onresetthis would attempt to move the empty list toself.deviceusing.to()- which would throw an error.I've also updated the docstring so that it is clear that
"cat"is to be used with list states.