-
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
[feat] Add stronger validation for checkpoint_callback argument #7539
[feat] Add stronger validation for checkpoint_callback argument #7539
Conversation
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-17 17:59:38 UTC |
Codecov Report
@@ Coverage Diff @@
## master #7539 +/- ##
=======================================
- Coverage 92% 88% -4%
=======================================
Files 196 197 +1
Lines 12835 12884 +49
=======================================
- Hits 11832 11318 -514
- Misses 1003 1566 +563 |
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.
nice!
Co-authored-by: Adrian Wälchli <[email protected]>
Co-authored-by: Carlos Mocholí <[email protected]>
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.
LGMT !
What does this PR do?
This removes the option for passing a
ModelCheckpoint
instance to the checkpoint_callback argument and raises an error if the wrong type is provided.This argument is already typed as
bool
in the Trainer, but the callback connector was acceptingUnion[bool, ModelCheckpoint]
. This can be very confusing for users who pass model checkpoint callback instances to this argument, as their callback settings are silently ignored.This carries forward the deprecation initially landed in #4336
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 🙃