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

FSDP: fixing training with freezing weights #614

Merged
merged 4 commits into from
Apr 19, 2021
Merged

FSDP: fixing training with freezing weights #614

merged 4 commits into from
Apr 19, 2021

Conversation

min-xu-ai
Copy link
Contributor

  • an assert is changed to catch this case correctly
  • unit test added (based on Quentin's test code) for this case and
    compare DDP and FSDP

fixes: #610

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos, doc improvements)
  • Did you read the contributor guideline?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Fixes # (issue).

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

- an assert is changed to catch this case correctly
- unit test added (based on Quentin's test code) for this case and
  compare DDP and FSDP

fixes: #610
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 16, 2021
Copy link
Contributor

@myleott myleott left a comment

Choose a reason for hiding this comment

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

Nice fix!

fairscale/nn/data_parallel/fully_sharded_data_parallel.py Outdated Show resolved Hide resolved
tests/nn/data_parallel/test_fsdp_freezing_weights.py Outdated Show resolved Hide resolved
@min-xu-ai
Copy link
Contributor Author

will merge tonight or tomorrow morning and make a release.

@min-xu-ai min-xu-ai merged commit 24da3b1 into master Apr 19, 2021
@min-xu-ai min-xu-ai deleted the min/bug_610 branch April 19, 2021 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for frozen parameters (Linear classification benchmarks)
4 participants