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_predict_{batch,epoch}_{start,end} and Callback.on_predict_{start,end} #7141

Merged
merged 9 commits into from
Apr 22, 2021

Conversation

carmocca
Copy link
Contributor

@carmocca carmocca commented Apr 21, 2021

What does this PR do?

Split out from #7042 and #7127

Notes:

  • self.log is not allowed in the predict hooks

cc: @justusschock @tchaton

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)
  • [n/a] 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 feature Is an improvement or enhancement refactor labels Apr 21, 2021
@carmocca carmocca added this to the v1.3 milestone Apr 21, 2021
@carmocca carmocca requested a review from williamFalcon as a code owner April 21, 2021 18:20
@codecov
Copy link

codecov bot commented Apr 21, 2021

Codecov Report

Merging #7141 (43a5475) into master (1477520) will decrease coverage by 6%.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #7141    +/-   ##
=======================================
- Coverage      92%     86%    -6%     
=======================================
  Files         197     197            
  Lines       12662   12796   +134     
=======================================
- Hits        11674   11059   -615     
- Misses        988    1737   +749     

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.

LGTM !
Need to add the calls on trainer callbacks too for the new ones.

@carmocca carmocca self-assigned this Apr 21, 2021
@carmocca carmocca mentioned this pull request Apr 21, 2021
11 tasks
@Borda Borda requested a review from tchaton April 21, 2021 23:34
@carmocca carmocca changed the title Update hooks typing and add some predict hooks Add on_predict_{batch,epoch}_{start,end} and Callback.on_predict_{start,end} Apr 22, 2021
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.

LGTM ! Thanks.

tests/trainer/logging_/test_logger_connector.py Outdated Show resolved Hide resolved
@carmocca carmocca added ready PRs ready to be merged admin Requires admin privileges to merge labels Apr 22, 2021
@carmocca carmocca added design Includes a design discussion and removed refactor labels Apr 22, 2021
@lexierule lexierule merged commit 33066f8 into master Apr 22, 2021
@lexierule lexierule deleted the typing-hooks branch April 22, 2021 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin Requires admin privileges to merge design Includes a design discussion feature Is an improvement or enhancement ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants