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

deprecate sharded_ddp training argument #24825

Merged
merged 4 commits into from
Jul 17, 2023

Conversation

ji-huazhong
Copy link
Contributor

@ji-huazhong ji-huazhong commented Jul 14, 2023

What does this PR do?

This PR deprecates the sharded_ddp training arguments, since ShardedDDP has been upstreamded to PyTorch, so users can use the fsdp traning parameter instead.


According to fairscale(see), PyTorch FSDP is the recommended method for scaling to large NN models. I think Sharded-DDP is dead and it's time to say goodbye to this library.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@ji-huazhong ji-huazhong marked this pull request as draft July 14, 2023 13:48
@ji-huazhong ji-huazhong changed the title 【wip】deprecate fairscale's ShardedDDP deprecate fairscale's ShardedDDP Jul 14, 2023
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.

That makes sense thanks! Note that while removing it entirely from the doc is fine, we can't abruptly remove it from the library like this. We will need to properly deprecate it first and in two-tree minor versions we can fully remove it.

@ji-huazhong ji-huazhong changed the title deprecate fairscale's ShardedDDP deprecate sharded_ddp for fsdp Jul 15, 2023
@ji-huazhong
Copy link
Contributor Author

That makes sense thanks! Note that while removing it entirely from the doc is fine, we can't abruptly remove it from the library like this. We will need to properly deprecate it first and in two-tree minor versions we can fully remove it.

@sgugger Thanks for pointing this out. I have rolled back the code changes and added a warning that sharded_ddp will be deprecated. Could you take a second look at this PR?

@ji-huazhong ji-huazhong marked this pull request as ready for review July 15, 2023 02:48
@ji-huazhong ji-huazhong requested a review from sgugger July 15, 2023 04:46
@ji-huazhong ji-huazhong changed the title deprecate sharded_ddp for fsdp deprecate sharded_ddp training argument Jul 15, 2023
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 iterating!

@sgugger sgugger merged commit 8ba26c1 into huggingface:main Jul 17, 2023
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@ji-huazhong ji-huazhong deleted the remove-sharded-ddp branch October 7, 2023 07:32
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.

3 participants