Skip to content
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

Merged
merged 1 commit into from
Oct 9, 2020
Merged

Conversation

ydcjeff
Copy link
Contributor

@ydcjeff ydcjeff commented Oct 9, 2020

What does this PR do?

Follow up of #3980

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • If you made a notable change (that affects users), did you update the CHANGELOG?

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 🙃

@mergify mergify bot requested a review from a team October 9, 2020 10:12
@codecov
Copy link

codecov bot commented Oct 9, 2020

Codecov Report

Merging #4023 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master   #4023   +/-   ##
======================================
  Coverage      87%     87%           
======================================
  Files         214     214           
  Lines       15602   15602           
======================================
  Hits        13637   13637           
  Misses       1965    1965           

@Borda Borda added the docs Documentation related label Oct 9, 2020
@Borda Borda added the ready PRs ready to be merged label Oct 9, 2020
@mergify mergify bot requested a review from a team October 9, 2020 11:44
@mergify mergify bot requested a review from a team October 9, 2020 12:14
@Borda Borda removed the ready PRs ready to be merged label Oct 9, 2020
@edenlightning edenlightning added this to the 1.0 milestone Oct 9, 2020
- :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`
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true. mind removing those?

@Borda

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah sure.

Copy link
Contributor

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_*??

@Borda

@williamFalcon williamFalcon merged commit d41ffaf into Lightning-AI:master Oct 9, 2020
@ydcjeff ydcjeff deleted the hooks branch October 10, 2020 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants