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

remove deprecated model hooks #3980

Merged
merged 1 commit into from
Oct 8, 2020
Merged

Conversation

Borda
Copy link
Member

@Borda Borda commented Oct 8, 2020

What does this PR do?

remove deprecated model hooks

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 🙃

@Borda Borda added the refactor label Oct 8, 2020
@Borda Borda added this to the 1.0 milestone Oct 8, 2020
@mergify mergify bot requested a review from a team October 8, 2020 08:10
@codecov
Copy link

codecov bot commented Oct 8, 2020

Codecov Report

Merging #3980 into master will decrease coverage by 2%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #3980    +/-   ##
=======================================
- Coverage      89%     87%    -2%     
=======================================
  Files         216     216            
  Lines       15569   15557    -12     
=======================================
- Hits        13870   13580   -290     
- Misses       1699    1977   +278     

@@ -40,15 +40,13 @@ Training loop
^^^^^^^^^^^^^

- :meth:`~pytorch_lightning.core.hooks.ModelHooks.on_epoch_start`
- :meth:`~pytorch_lightning.core.hooks.ModelHooks.on_batch_start`
Copy link
Contributor

Choose a reason for hiding this comment

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

shall we add on_train_batch_start?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, mind make it as suggestion here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Github shows Applying suggestions on deleted line is not supported.

- :meth:`~pytorch_lightning.core.hooks.ModelHooks.on_train_batch_start`

- :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_batch_end`
Copy link
Contributor

Choose a reason for hiding this comment

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

here on_train_batch_end too?

Copy link
Contributor

Choose a reason for hiding this comment

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

- :meth:`~pytorch_lightning.core.hooks.ModelHooks.on_train_batch_end`

@williamFalcon williamFalcon merged commit 0719dd7 into master Oct 8, 2020
@williamFalcon
Copy link
Contributor

@Borda follow up on the next PR with adding those missing hooks

  • :meth:~pytorch_lightning.core.hooks.ModelHooks.on_train_batch_start etc

@rohitgr7 rohitgr7 deleted the refactor/rm-model-hooks branch October 8, 2020 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants