Fix saved filename in ModelCheckpoint if it already exists#4861
Merged
Fix saved filename in ModelCheckpoint if it already exists#4861
Conversation
|
Hello @rohitgr7! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-12-14 17:27:54 UTC |
Codecov Report
@@ Coverage Diff @@
## master #4861 +/- ##
======================================
- Coverage 93% 93% -0%
======================================
Files 134 134
Lines 9907 9905 -2
======================================
- Hits 9206 9204 -2
Misses 701 701 |
11952d6 to
9464b16
Compare
carmocca
reviewed
Nov 26, 2020
carmocca
reviewed
Nov 26, 2020
carmocca
reviewed
Nov 26, 2020
carmocca
reviewed
Nov 26, 2020
carmocca
reviewed
Nov 26, 2020
carmocca
approved these changes
Nov 26, 2020
Contributor
Author
|
Thanks @carmocca for the review :) |
Contributor
|
Unrelated to the PR but, is there a reason for version starting at 0? instead of: |
Collaborator
there is no special reason :] |
8687939 to
7485092
Compare
Contributor
Author
|
@carmocca wanna give this a shot? #4861 (comment) |
Contributor
Sure, I will. Most likely this weekend |
awaelchli
approved these changes
Dec 3, 2020
carmocca
reviewed
Dec 11, 2020
s-rog
approved these changes
Dec 16, 2020
awaelchli
pushed a commit
that referenced
this pull request
Dec 18, 2020
* disable version if not required * disable version if not required * pep * chlog * improve test * improve test * parametrize test and update del_list * Update pytorch_lightning/callbacks/model_checkpoint.py Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> * try appending version to already saved ckpt_file * Revert "try appending version to already saved ckpt_file" This reverts commit 710e05e. * add more assertions * use BoringModel Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> Co-authored-by: chaton <thomas@grid.ai> Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Borda
pushed a commit
that referenced
this pull request
Dec 23, 2020
* disable version if not required * disable version if not required * pep * chlog * improve test * improve test * parametrize test and update del_list * Update pytorch_lightning/callbacks/model_checkpoint.py Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> * try appending version to already saved ckpt_file * Revert "try appending version to already saved ckpt_file" This reverts commit 710e05e. * add more assertions * use BoringModel Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> Co-authored-by: chaton <thomas@grid.ai> Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Borda
pushed a commit
that referenced
this pull request
Dec 29, 2020
* disable version if not required * disable version if not required * pep * chlog * improve test * improve test * parametrize test and update del_list * Update pytorch_lightning/callbacks/model_checkpoint.py Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> * try appending version to already saved ckpt_file * Revert "try appending version to already saved ckpt_file" This reverts commit 710e05e. * add more assertions * use BoringModel Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> Co-authored-by: chaton <thomas@grid.ai> Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Borda
pushed a commit
that referenced
this pull request
Jan 4, 2021
* disable version if not required * disable version if not required * pep * chlog * improve test * improve test * parametrize test and update del_list * Update pytorch_lightning/callbacks/model_checkpoint.py Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> * try appending version to already saved ckpt_file * Revert "try appending version to already saved ckpt_file" This reverts commit 710e05e. * add more assertions * use BoringModel Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> Co-authored-by: chaton <thomas@grid.ai> Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Borda
pushed a commit
that referenced
this pull request
Jan 4, 2021
* disable version if not required * disable version if not required * pep * chlog * improve test * improve test * parametrize test and update del_list * Update pytorch_lightning/callbacks/model_checkpoint.py Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> * try appending version to already saved ckpt_file * Revert "try appending version to already saved ckpt_file" This reverts commit 710e05e. * add more assertions * use BoringModel Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> Co-authored-by: chaton <thomas@grid.ai> Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Borda
pushed a commit
that referenced
this pull request
Jan 5, 2021
* disable version if not required * disable version if not required * pep * chlog * improve test * improve test * parametrize test and update del_list * Update pytorch_lightning/callbacks/model_checkpoint.py Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> * try appending version to already saved ckpt_file * Revert "try appending version to already saved ckpt_file" This reverts commit 710e05e. * add more assertions * use BoringModel Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> Co-authored-by: chaton <thomas@grid.ai> Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes the saved filename if it's already present. It will override the file if it's already going to be deleted. Previously if
save_top_k=1and filename is static for eg:some_file, it will create a file with the version for eg: filename=some_file-v2.ckptifmax_epoch > 1but it should besome_file.ckptonly.The test fails on master.
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 🙃