-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 reset_train_val_dataloaders
from Trainer and move data reloading logic to loop
#9671
remove reset_train_val_dataloaders
from Trainer and move data reloading logic to loop
#9671
Conversation
reset_train_val_dataloaders
from Trainer and move data reloading logic to loop
Codecov Report
@@ Coverage Diff @@
## master #9671 +/- ##
=======================================
- Coverage 93% 89% -4%
=======================================
Files 179 180 +1
Lines 15810 15869 +59
=======================================
- Hits 14635 14071 -564
- Misses 1175 1798 +623 |
Marking this as a draft as a merge seems to have gone wrong, mark it as ready when it's ready again! |
ffd2fdb
to
f65bd5e
Compare
Hi, @carmocca The value of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
Co-authored-by: ananthsub <[email protected]>
a lot of test failures due to commit 720288e Let me update them |
What does this PR do?
Fixes #9502
This PR aims to fix the bug mentioned in issue #9502.
During fit loop, train_dataloader is loaded twice when resuming from checkpoint. This underlying behavior does not meet user's expectation.
As discussed in an closed PR #9614, we will follow the second option to fix this issue:
self.reset_train_val_dataloaders(model)
inTrainer._run_train()
and set the reload logics in corresponding loops. Additionally,self.num_training_batches = 0
intrainer._setup_on_init()
. This value is initialized asself.num_training_batches = float('inf')
,fit_loop.done
andfit_loop.skip
has been updated.Does your PR introduce any breaking changes? If yes, please list them.
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃