-
Notifications
You must be signed in to change notification settings - Fork 415
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
Investigate potential memory bug #902
Merged
Merged
Conversation
This file contains 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
SkafteNicki
requested review from
Borda,
justusschock,
tchaton,
ethanwharris and
SeanNaren
as code owners
March 22, 2022 12:57
Codecov Report
@@ Coverage Diff @@
## master #902 +/- ##
=====================================
Coverage 95% 95%
=====================================
Files 173 173
Lines 7254 7257 +3
=====================================
+ Hits 6868 6898 +30
+ Misses 386 359 -27 |
fixed the missing package in tests :) |
SkafteNicki
commented
Mar 23, 2022
SkafteNicki
changed the title
[WIP] Investigate potential memory bug
Investigate potential memory bug
Mar 23, 2022
Borda
reviewed
Mar 23, 2022
Borda
approved these changes
Mar 23, 2022
justusschock
approved these changes
Mar 23, 2022
tchaton
approved these changes
Mar 23, 2022
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.
LGTM !
rohitgr7
approved these changes
Mar 23, 2022
Borda
pushed a commit
that referenced
this pull request
Mar 23, 2022
* test psutil * fix skipping * fix test * remove no_grad * memory Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> (cherry picked from commit 8c052e7)
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 #890
We have a memory leak in
metric.update
as the current code does not disable gradients, meaning that if users pass input withrequires_grad=True
tometric.update
we will accumulate gradient information over time which is not wanted (will lead to memory errors). We have already disabled this for the global accumulation that is done duringforward
and this PR just extends to also be during direct calls toupdate
.We will still allow gradient information to pass through for the batch computation in
forward
.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 🙃