-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix double iteration bug when resumed from a checkpoint. #20775
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
base: master
Are you sure you want to change the base?
Conversation
tests/tests_pytorch/loops/test_double_iter_in_iterable_dataset.py
Outdated
Show resolved
Hide resolved
@Borda Thanks for the review! Let me know if there's anything you'd like me to change. Otherwise, can we go ahead and merge this? |
tests/tests_pytorch/loops/test_double_iter_in_iterable_dataset.py
Outdated
Show resolved
Hide resolved
e451080
to
130102c
Compare
Hey, @Borda just wondering if anything is blocking this PR from merging? |
c03f7d0
to
9525a9a
Compare
9525a9a
to
df95a0c
Compare
@Borda, I noticed a few mypy checks are failing, but they don't seem related to the changes in this PR. Should we ignore them for now? Let me know the next steps. |
fcd9055
to
a9d56fd
Compare
Signed-off-by: sudipto baral <[email protected]>
Signed-off-by: sudipto baral <[email protected]>
Signed-off-by: sudipto baral <[email protected]>
Signed-off-by: sudipto baral <[email protected]>
a9d56fd
to
2f9cd44
Compare
@property | ||
def is_resuming(self) -> bool: | ||
"""Whether we're resuming training from a checkpoint.""" | ||
return self._resuming_from_checkpoint | ||
|
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.
This variable _resuming_from_checkpoint
seems a bit redundant. From the naming and context, it looks like _loaded_from_state_dict
might already be serving a similar purpose. wdyt @sudiptob2 ?
cc: @Borda
What does this PR do?
This PR fixes the double
iter()
bug discussed in #19427Fixes #19427
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
Reviewer checklist
📚 Documentation preview 📚: https://pytorch-lightning--20775.org.readthedocs.build/en/20775/