-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[2/2] Remove outputs from evaluation epoch end hooks #7338
[2/2] Remove outputs from evaluation epoch end hooks #7338
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7338 +/- ##
======================================
- Coverage 88% 87% -0%
======================================
Files 200 200
Lines 12985 12982 -3
======================================
- Hits 11400 11357 -43
- Misses 1585 1625 +40 |
48dfcd3
to
f694c31
Compare
Hello @ananthsub! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-05-05 15:29:06 UTC |
f694c31
to
38a572d
Compare
58450ba
to
446b731
Compare
62a4327
to
d3ef271
Compare
If you are doing deprecation anyway, would it make sense to also consolidate naming? Right now we have Would be nice if *_step and _epoch_end would match up? |
@maximsch2 I'd prefer to tackle naming separately: #6094 lays out a number of inconsistencies which we need to address |
876079e
to
90db4c6
Compare
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. Just fix failing test
@awaelchli the faiilng test is related to the worker init fn check. I'm seeing if this was fixed in pytorch 1.9 |
we added 1.9 just today. I'm sure it's not related to your PR. |
@ananthsub shall we add the docs about cache here? |
Sent out #7389 for this |
What does this PR do?
This addresses part of #6865 and undoes #6120.
This is inclusive of changes in #7339 .
Because
outputs
as part of the evaluation epoch end hooks were never part of a stable release, we can safely change the signature and remove the arguments without worrying about backwards compatibility or breaking changes.We do so because we no longer have a mechanism to not store step outputs during training if any callback or module needs to run something at the end of the epoch which doesn't rely on the outputs. Traditionally, this was the differentiator between
validation_epoch_end
defined as a method on the LightningModule vson_validation_epoch_end
which takes no arguments and is available in both the callbacks and lightning module via hooks.As a result, we see increased memory pressure which both slows down training and puts us at greater risk of OOMs, especially for large scale training.
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃