-
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
Fix save_last
type annotation for ModelCheckpoint
#19808
Fix save_last
type annotation for ModelCheckpoint
#19808
Conversation
… jsonargparse can correctly parse inputs such as true, false, etc... before this change jsonargparse gave errors complaining that strings like 'true' or 'false' were given when the annotation expected Optional[Literal[True, False, 'link']]; this is in contrast to most other bool parameters in the ModelCheckpoint callback's constructor. I also added a test in tests/test_pytorch/checkpointing/test_model_checkpoint.py::test_save_last_cli
The PR is pretty compact - few modifications in 2 files. The PR has been ready to review for the last 3 weeks. It passes all available tests. Please someone review it, so I can close the issue and the PR. |
save_last
type annotation for ModelCheckpoint
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.
@mariovas3 That's a great fix, thanks for sending the PR and including a test as well!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #19808 +/- ##
==========================================
- Coverage 84% 53% -31%
==========================================
Files 426 418 -8
Lines 35264 35111 -153
==========================================
- Hits 29553 18703 -10850
- Misses 5711 16408 +10697 |
What does this PR do?
Fixes #19799
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
Reviewer checklist
📚 Documentation preview 📚: https://pytorch-lightning--19808.org.readthedocs.build/en/19808/