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

docs: replace torch.distributed.run by torchrun #27528

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

panpan0000
Copy link
Contributor

@panpan0000 panpan0000 commented Nov 16, 2023

What does this PR do?

The old way will be deprecated , move to new torchrun.
FutureWarning: The module torch.distributed.launch is deprecated and will be removed in future. Use torchrun.

This PR only addresses the doc part, not touching the unit-test to limit the impact.

Fixes # (issue)

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.

@panpan0000
Copy link
Contributor Author

I just found an old PR which did the similar work https://github.com/huggingface/transformers/pull/21780/files but out of sync.
but my PR just focus on DOC

Copy link
Collaborator

@amyeroberts amyeroberts 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 adding this!

Just a few comments on removing the changes for the research examples.

For any future readers who stumble on this PR: the previously closed PR requested comments in the docs for older pytorch versions. We now officially support pytorch >= 1.10. The entrypoint torchrun is present from 1.10 onwards.

 `transformers` now officially support pytorch >= 1.10.
 The entrypoint `torchrun`` is present from 1.10 onwards.

Signed-off-by: Peter Pan <[email protected]>
@panpan0000
Copy link
Contributor Author

Thanks for adding this!

Just a few comments on removing the changes for the research examples.

For any future readers who stumble on this PR: the previously closed PR requested comments in the docs for older pytorch versions. We now officially support pytorch >= 1.10. The entrypoint torchrun is present from 1.10 onwards.

comments already addressed, now PR can be merged now.

src/transformers/trainer.py Outdated Show resolved Hide resolved
with @ArthurZucker's suggestion

Co-authored-by: Arthur <[email protected]>
@amyeroberts amyeroberts merged commit ce31508 into huggingface:main Nov 27, 2023
21 checks passed
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