-
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
split restore_training_state
into logical parts [2 / 2]
#7900
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7900 +/- ##
======================================
- Coverage 92% 92% -0%
======================================
Files 200 200
Lines 12837 12816 -21
======================================
- Hits 11857 11832 -25
- Misses 980 984 +4 |
CheckpointConnector.restore_training_state
into logical parts
CheckpointConnector.restore_training_state
into logical partsrestore_training_state
into logical parts
restore_training_state
into logical partsrestore_training_state
into logical parts [2 / 2]
80eaec9
to
ff8f9b7
Compare
for more information, see https://pre-commit.ci
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.
Neat !
if not checkpoint: | ||
return |
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.
when can this happen?
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.
when Trainer(resume_from_checkpoint=None)
(the default case)
then trainer calls restore() and we do a no-op
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.
shouldn't we skip calling restore at all in that case?
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.
no because it's actually an attempt to restore.
this is the sequence:
- attempt to restore from hpc_checkpoint file
- attempt to restore from resume_from_checkpoint path if provided
- do nothing
and could rename restore to attempt_restore if that's better?
What does this PR do?
Part of #7652 and
follow up to #7901 will be updated after #7901 merged!
Splits
restore_training_state
into the following pieces:Before submitting
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:
Did you have fun?
Make sure you had fun coding 🙃