-
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
Add missing val/test hooks in LightningModule #5467
Conversation
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.
Thanks @rohitgr7 , awesome!
'on_validation_model_train', | ||
'on_epoch_end', | ||
'on_train_epoch_end', | ||
'on_train_end', | ||
'on_fit_end', | ||
'teardown', | ||
] | ||
|
||
assert model.called == expected |
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.
shall this be updated the way it's done with callback using mock?
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.
that would be great (in a follow up pr). let me know if you need help
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.
sure 👍
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
Codecov Report
@@ Coverage Diff @@
## release/1.2-dev #5467 +/- ##
===============================================
- Coverage 93% 93% -0%
===============================================
Files 151 151
Lines 10641 10645 +4
===============================================
- Hits 9860 9858 -2
- Misses 781 787 +6 |
* add missing val/test hooks * chlog * None Co-authored-by: Roger Shieh <[email protected]>
What does this PR do?
Fixes #5442
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 🙃