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

fix partial state #1144

Merged
merged 2 commits into from
Mar 3, 2023
Merged

Conversation

pacman100
Copy link
Contributor

What does this PR do?

  1. FSDP and Megatron-LM integrations are broken since the introduction of PartialState Introduce PartialState #1055. In prepare_data_loader , state obj is created again via state = AcceleratorState() . Now, it causes everything to go haywire, self.__dict__.update(PartialState._shared_state) reverts FSDP in AcceleratorState to MULTI_GPU present in PartialState. This PR fixes it.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 3, 2023

The documentation is not available anymore as the PR was closed or merged.

@pacman100 pacman100 marked this pull request as ready for review March 3, 2023 11:12
Copy link
Collaborator

@muellerzr muellerzr 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 the catch, just to be sure is this why the nightlies are failing? (Aka they caught this?)

@pacman100
Copy link
Contributor Author

Hello, yes, here is the whole slack thread with a day's worth of debugging with respect to this: https://huggingface.slack.com/archives/C03SJ1ED7SM/p1677824690561359. In short, all FSDP integration tests were failing because the model, optimizer and lr_scheduler aren't prepared properly.

@muellerzr
Copy link
Collaborator

Thanks, sorry for the breaking change 🙃 should've also been checking the slow tests with such a large PR before merging

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.

LGTM!

@pacman100 pacman100 merged commit 77ae51a into huggingface:main Mar 3, 2023
@pacman100 pacman100 deleted the smangrul/fix-partial-state branch March 3, 2023 13:54
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.

None yet

4 participants