-
Notifications
You must be signed in to change notification settings - Fork 430
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
[torch2.4] Fix sharded checkpointing backward compatibility issue #3565
Conversation
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! A few minor style notes before approval.
Can you also please list here: https://docs.google.com/document/d/1m-qWWN3mMTmQOePx0ip5dge1I71_RKXa5QmJm2eFwh4/edit#heading=h.aoxj18348987 under monkeypatches and link github issue?
added to the doc |
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! Will merge as this unblocks main
torch 2.4 breaks the sharded checkpointing backward compatibility. It changed how the save_planner and load_planner flatten the state dict keys. Torch issue: pytorch/pytorch#133923 . So the new load planner can't load the checkpointing saved with old save_planner.
This PR monkey patches the load_planner if it failed to load an old checkpoint, then it removes the patch after loading the checkpointing.
test
daily test: https://github.com/mosaicml/composer/actions/runs/10480275642