Skip to content

Conversation

@awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Jun 24, 2021

What does this PR do?

We currently have the validation loop owned by the fit loop, i.e.,

trainer.fit_loop.val_loop: EvaluationLoop

It was introduced there in #8065.
However, the validation loop is never used in the fit loop. It is called only in the epoch loop, i.e.
trainer.fit_loop.epoch_loop calls the validation loop at the right interval. This PR moves the val loop
from

trainer.fit_loop.val_loop to
trainer.fit_loop.epoch_loop.val_loop

This does not require a changelog entry, since we are developing these loops on master only at the moment.

Discussed with @tchaton and @carmocca so far.

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?
  • 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

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • 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

Did you have fun?

Make sure you had fun coding 🙃

@awaelchli awaelchli added this to the v1.4 milestone Jun 24, 2021
@codecov
Copy link

codecov bot commented Jun 24, 2021

Codecov Report

Merging #8120 (2d04145) into master (b12a0d0) will decrease coverage by 5%.
The diff coverage is 88%.

@@           Coverage Diff           @@
##           master   #8120    +/-   ##
=======================================
- Coverage      93%     88%    -5%     
=======================================
  Files         212     212            
  Lines       13549   13541     -8     
=======================================
- Hits        12590   11897   -693     
- Misses        959    1644   +685     

@carmocca carmocca force-pushed the refactor/loops/move_val_loop branch from 7ab22e7 to a5327b5 Compare June 24, 2021 23:21
@awaelchli awaelchli marked this pull request as ready for review June 25, 2021 11:23
@carmocca carmocca added the ready PRs ready to be merged label Jun 25, 2021
@awaelchli awaelchli force-pushed the refactor/loops/move_val_loop branch from 838f5f2 to ca4664f Compare June 28, 2021 21:32
@mergify mergify bot removed the has conflicts label Jun 28, 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 !

@tchaton tchaton enabled auto-merge (squash) June 29, 2021 08:58
@tchaton tchaton merged commit 6db0fe3 into master Jun 29, 2021
@tchaton tchaton deleted the refactor/loops/move_val_loop branch June 29, 2021 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready PRs ready to be merged refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants