-
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 on_train_batch_start/end, chpt hooks in hooks docs [ci skip] #4023
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4023 +/- ##
======================================
Coverage 87% 87%
======================================
Files 214 214
Lines 15602 15602
======================================
Hits 13637 13637
Misses 1965 1965 |
- :meth:`~pytorch_lightning.core.lightning.LightningModule.tbptt_split_batch` | ||
- :meth:`~pytorch_lightning.core.lightning.LightningModule.training_step` | ||
- :meth:`~pytorch_lightning.core.lightning.LightningModule.training_step_end` (optional) | ||
- :meth:`~pytorch_lightning.core.hooks.ModelHooks.on_before_zero_grad` | ||
- :meth:`~pytorch_lightning.core.hooks.ModelHooks.backward` | ||
- :meth:`~pytorch_lightning.core.hooks.ModelHooks.on_after_backward` | ||
- ``optimizer.step()`` | ||
- :meth:`~pytorch_lightning.core.hooks.ModelHooks.on_train_batch_end` | ||
- :meth:`~pytorch_lightning.core.lightning.LightningModule.training_epoch_end` | ||
- :meth:`~pytorch_lightning.core.hooks.ModelHooks.on_epoch_end` |
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.
Why keep on_epoch_end
if we have on_train_epoch_end
? They are basically doing the same thing right? Same with on_epoch_start
.
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.
true. mind removing those?
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.
yeah sure.
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 see no deprecation has been set in the docstrings yet for these ModelHooks, should I still remove them? Also, similar hooks are present in Callback as well on_batch_start
, on_batch_end
, on_epoch_start
, on_epoch_end
. Should we remove them all since all of them have their alternatives with prefix on_train_*
??
What does this PR do?
Follow up of #3980
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 🙃