-
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 ModelCheckpoint.to_yaml method #3048
Conversation
Hello @mpariente! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-09-27 10:53:00 UTC |
This pull request is now in conflict... :( |
Actually I'd prefer not to use json for this. If we really want this (which still needs to be considered), I'd prefer to go with YAML instead of JSON here, since we use yaml for most other human readable serialization and IMO should not mix file formats to much. |
why not both or maybe more? |
I can make the required changes, but I'd like to know if you want it or not beforehand. |
personally I would prefer YAML as it is readable and it can be used as an architecture draft, but we can have both... |
I would strongly recommend not to do both, since this is really not necessary here. It's just so that you know which checkpoints to use and to consider. Doing both is a typical overkill and we still have to keep the effort to maintain in mind (probably not much here, but it increases with every little bit). |
YAML only would be ok. It's just to have a one-liner to dump the saved models history. I think there is a point to this feature because having this file is useful after training, for stochastic weight averaging or ensemble methods etc.. And if we don't dump this file, we have to open the checkpoint to have it's validation performance, which is not efficient. |
yeah, YAML sounds good. Let's do YAML then :). |
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
Sorry, I got absorbed by something else and forgot the PR. |
@mpariente seems that with the update to YAML the test is not correct, mind have look at it... |
This week end, I won't have time. |
This pull request is now in conflict... :( |
It seems you did it, thank you :] |
Co-authored-by: Justus Schock <[email protected]>
Yeah, finally ^^ |
good to go now @Borda |
What does this PR do
Add simple
to_json()
method toModelCheckpoint
.In the current code, it requires three lines, and it could be automated by lightning.
Fixes #3047 (disclaimer: my issue with no answer yet)
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃