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.
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
change Checkpoint callback's
save_best_only
tosave_top_k
#128change Checkpoint callback's
save_best_only
tosave_top_k
#128Changes from 44 commits
6b54c1e
49e35b1
08f57b6
4855bf8
2f6f784
daae566
a7da269
373cd1d
49f78d6
a34811a
fbc8a4e
52bfcb7
38afd66
ab92212
7e8767f
3079b71
3bb6e3e
4626e1a
6a47d55
4b3d5bf
d29eff7
22cfeb5
d15b03b
58a8410
b9a855d
e1f7a48
2dd65e9
634ad80
1861f7d
b66b33c
aed9ad9
abb9629
a0c2269
4490466
0e98423
2eab575
27ebd1c
37cfedf
3f49122
585fff0
94a6c49
b983860
c3f56dd
13803ff
7c58669
235e5f1
8635612
e59d5bd
3f05419
b000db9
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
you should only remove files this callback saved. For instance this would remove other checkpoints the user drags in manually or the ones saved by slurm
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.
I'm not sure what del_model and save_model is intended to be. Through my experiments I noticed that the original implementation simply delete all the models in the corresponding folder. I modified the functions so that they delete only the
filepath
model. AFAIK, these two functions are called with the exact model filepath.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.
shutil.rmtree
has a parameterignore_errors
so there is no need for this try/except...https://docs.python.org/2/library/shutil.html
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.
you have a method
_del_model
which is quite empty, so move this logic about removing k-th model thereThere 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.
I dont think so :)
_save_model
handles a filename to save, and_del_model
should do the same, and handles a filename to delete.