Skip to content

Conversation

@fegin
Copy link
Contributor

@fegin fegin commented Jan 13, 2023

Stack from ghstack (oldest at bottom):

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: D42488022

…dict_to_load public

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Jan 13, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/92118

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 5dd0379:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: distributed (fsdp) release notes category label Jan 13, 2023
fegin added a commit that referenced this pull request Jan 13, 2023
…dict_to_load public

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

ghstack-source-id: 177584342
Pull Request resolved: #92118
@fegin fegin closed this Jan 13, 2023
@fegin fegin reopened this Jan 17, 2023
…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
fegin added a commit that referenced this pull request Jan 17, 2023
…dict_to_load public

Pull Request resolved: #92118

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.
ghstack-source-id: 177753434

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)
@fegin fegin added the ciflow/trunk Trigger trunk jobs on your pull request label Jan 17, 2023
…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
fegin added a commit that referenced this pull request Jan 18, 2023
…dict_to_load public

Pull Request resolved: #92118

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.
ghstack-source-id: 177918763

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)
…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
fegin added a commit that referenced this pull request Jan 19, 2023
…dict_to_load public

Pull Request resolved: #92118

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.
ghstack-source-id: 177990998

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)
…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
fegin added a commit that referenced this pull request Jan 24, 2023
…dict_to_load public

Pull Request resolved: #92118

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.
ghstack-source-id: 178293084

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)
…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
fegin added a commit that referenced this pull request Jan 24, 2023
…dict_to_load public

Pull Request resolved: #92118

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.
ghstack-source-id: 178328384

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)
Copy link
Contributor

@rohan-varma rohan-varma left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!


@dataclass
class LocalOptimStateDictConfig(OptimStateDictConfig):
offload_to_cpu: bool = False
Copy link
Contributor

Choose a reason for hiding this comment

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

why is the default overriden to false for local, but not sharded?

…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
fegin added a commit that referenced this pull request Jan 26, 2023
…dict_to_load public

Pull Request resolved: #92118

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.
ghstack-source-id: 178572798

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)
@fegin
Copy link
Contributor Author

fegin commented Jan 30, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR is too stale; the last push date was more than 3 days ago. Please rebase and try again. You can rebase by leaving the following comment on this PR:
@pytorchbot rebase

Details for Dev Infra team Raised by workflow job

…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
fegin added a commit that referenced this pull request Jan 30, 2023
…dict_to_load public

Pull Request resolved: #92118

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.
ghstack-source-id: 178828472

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)
@fegin
Copy link
Contributor Author

fegin commented Jan 31, 2023

@pytorchbot merge -f "The failing test is not related."

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: Command git -C /home/runner/work/pytorch/pytorch cherry-pick -x aebd6d62c8818a388682864d1d6ae979a7eedd5c returned non-zero exit code 1

Auto-merging test/distributed/fsdp/test_fsdp_optim_state.py
CONFLICT (content): Merge conflict in test/distributed/fsdp/test_fsdp_optim_state.py
Auto-merging torch/distributed/fsdp/fully_sharded_data_parallel.py
error: could not apply aebd6d62c8... [FSDP][optim_state_dict][10/N] Make optim_state_dict and optim_state_dict_to_load public
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
Details for Dev Infra team Raised by workflow job

…ptim_state_dict_to_load public"

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)

[ghstack-poisoned]
fegin added a commit that referenced this pull request Jan 31, 2023
…dict_to_load public

Pull Request resolved: #92118

Make optim_state_dict and optim_state_dict_to_load public APIs and consolidate them with state_dict by using the same state_dict_type to decide how to perform the optimizer state_dict save and load.
ghstack-source-id: 178869730

Differential Revision: [D42488022](https://our.internmc.facebook.com/intern/diff/D42488022/)
@fegin
Copy link
Contributor Author

fegin commented Feb 2, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@facebook-github-bot facebook-github-bot deleted the gh/fegin/60/head branch June 8, 2023 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: distributed (fsdp) release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants