-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Updated ModelCheckpoint callback documentation #6873
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
Updated ModelCheckpoint callback documentation #6873
Conversation
Signed-off-by: gca <[email protected]>
| Save the model after every epoch by monitoring a quantity. Every metric logged with | ||
| :meth:`~pytorch_lightning.core.lightning.log` or :meth:`~pytorch_lightning.core.lightning.log_dict` in | ||
| LightningModule is a candidate for the monitor key. For more information, see | ||
| :ref:`common/weights_loading:Checkpoint saving`. |
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.
not 100% sure, but I think we can only reference sections by title within the same document.
You probably have to refer to just :ref:_weights_loading
| class ModelCheckpoint(Callback): | ||
| r""" | ||
| Save the model after every epoch by monitoring a quantity. | ||
| Save the model after every epoch by monitoring a quantity. Every metric logged with |
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.
Is this an old version of Lightning? the "after every epoch" isn't true - there are more options being added for greater flexibility. See https://github.com/PyTorchLightning/pytorch-lightning/blob/19e67d18c472c3a03dec4dd9bfcef031e9ca8719/pytorch_lightning/callbacks/model_checkpoint.py#L96-L107
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.
Actually it was like that in the documentation, that's why I didn't change the after every epoch part. But you are right. What do you think about this before the part that I added:
Save the model after every every_n_train_steps training steps or every every_n_val_epochs validation epochs by monitoring a quantity. These options are mutually exclusive.
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 would not mention the arguments before they are introduced later on.
How about:
Save the model periodically by monitoring a quantity. ...
Codecov Report
@@ Coverage Diff @@
## master #6873 +/- ##
=======================================
- Coverage 91% 87% -4%
=======================================
Files 199 199
Lines 12799 12799
=======================================
- Hits 11701 11168 -533
- Misses 1098 1631 +533 |
Signed-off-by: gca [email protected]
What does this PR do?
Fixes #6117. It tries to clarify the documentation regarding monitoring metric values.
Before submitting
PR review
Did you have fun?
Always :)