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 predict hook test #7973

Merged
merged 3 commits into from
Jun 16, 2021
Merged

Add predict hook test #7973

merged 3 commits into from
Jun 16, 2021

Conversation

carmocca
Copy link
Contributor

@carmocca carmocca commented Jun 14, 2021

What does this PR do?

  • Create HookedCallback to append the called hooks. This way we can test the order between the LightningModule and Callback. This also has the benefit that inconsistencies are easier to notice.

A small fix is included to call the stage argument in the Callback setup/teardown by keyword argument. The hook was called by keyword for the LightningModule but positionally for the Callback.

Related to the Lightning hooks review: #7740

Notes

Added TODOs for all the inconsistencies that surfaced. Do not plan to fix them here.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • 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?
  • [n/a] Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

@carmocca carmocca added the ci Continuous Integration label Jun 14, 2021
@carmocca carmocca added this to the v1.4 milestone Jun 14, 2021
@carmocca carmocca self-assigned this Jun 14, 2021
@codecov
Copy link

codecov bot commented Jun 14, 2021

Codecov Report

Merging #7973 (7dc8525) into master (03e7bdf) will decrease coverage by 0%.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #7973   +/-   ##
======================================
- Coverage      92%     91%   -0%     
======================================
  Files         203     203           
  Lines       13137   13157   +20     
======================================
- Hits        12023   12005   -18     
- Misses       1114    1152   +38     

@carmocca carmocca added the ready PRs ready to be merged label Jun 15, 2021
@carmocca carmocca enabled auto-merge (squash) June 15, 2021 11:24
Copy link
Contributor

@tchaton tchaton left a comment

Choose a reason for hiding this comment

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

LGMT !

@carmocca carmocca merged commit 4ffba60 into master Jun 16, 2021
@carmocca carmocca deleted the tests/hooks-predict branch June 16, 2021 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous Integration ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants