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 inconsistent outputs in on_*_end
and *_end
#6969
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6969 +/- ##
======================================
- Coverage 92% 92% -0%
======================================
Files 194 194
Lines 12328 12329 +1
======================================
- Hits 11324 11322 -2
- Misses 1004 1007 +3 |
@ethanwharris n00b question: should the lightning module hook come before the callback hook runs? |
@ananthsub The docs certainly think it should, so it will following this PR 😃 |
on_*_end
and *_end
on_*_end
and *_end
on_*_end
and *_end
on_*_end
and *_end
on_*_end
and *_end
on_*_end
and *_end
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
…rchLightning/pytorch-lightning into bugfix/inconsistent_outputs
@carmocca Have added some tests for training_loop 😃 - one for call order, and one checking that they are called with the correct outputs objects. |
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 !
What does this PR do?
Fixes #6921
Several changes:
training_epoch_end
(which actual handles model epoch end) from logger connector totraining_loop.py
_prepare_outputs
) intraining_loop.py
to unpack allResult
object outputs from bothepoch_end
andbatch_end
on_train_epoch_end
andtraining_epoch_end
hooks (previously,training_epoch_end
behaved differently)trainer.py
so that bothevaluation_epoch_end
andon_evaluation_epoch_end
get the sameoutputs
argumenttraining_epoch_end
andon_train_epoch_end
to be consistent with the docsPreviously, running the code from the issue, the user saw this output:
Now sees this:
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 🙃