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

Implementation of saving and loading custom states #270

Merged
merged 18 commits into from
Mar 8, 2022
Merged

Conversation

muellerzr
Copy link
Collaborator

Introduces a register_for_checkpointing function, as well as two save/loading functions for those registered objects.

Would like an initial review for if I'm on the right track 😄

@muellerzr muellerzr requested a review from sgugger March 7, 2022 19:01
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good for now!

src/accelerate/accelerator.py Outdated Show resolved Hide resolved
src/accelerate/accelerator.py Outdated Show resolved Hide resolved
src/accelerate/checkpointing.py Outdated Show resolved Hide resolved
src/accelerate/checkpointing.py Outdated Show resolved Hide resolved
@muellerzr muellerzr marked this pull request as ready for review March 8, 2022 20:20
@muellerzr muellerzr requested a review from sgugger March 8, 2022 20:20
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

src/accelerate/accelerator.py Outdated Show resolved Hide resolved
src/accelerate/accelerator.py Show resolved Hide resolved
src/accelerate/checkpointing.py Outdated Show resolved Hide resolved
tests/test_state_checkpointing.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great warning!

@muellerzr muellerzr merged commit 6ffab17 into main Mar 8, 2022
@muellerzr muellerzr deleted the custom-saving branch March 8, 2022 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants