-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Changed world_size() to get_world_size() bugfix #22381
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
Changed world_size() to get_world_size() bugfix #22381
Conversation
…world_size() to dist.get_world_size() since world_size() doesn't exist in pytorch.dist.
|
The documentation is not available anymore as the PR was closed or merged. |
gante
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a sensible change, but I'm going to defer the review to someone more experience with dist :)
|
BTW, there is a CI error due to this branch being created from an older version of |
Funny, GitHub is telling me that "This branch is 1 commit ahead of huggingface:main." and also tells me the fork is already synced when I try syncing. Maybe I missed something, but it seems the only difference in codebase is the 1 line change. Maybe it's worth it to re-run the ci/circleci: tests_torch_and_tf? |
|
@Charlie-Bell my apologies, there is indeed a problem in |
sgugger
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's the correct fix. Thanks a lot!
Edited one line in src/transormers/generation/utils.py. Changed dist.world_size() to dist.get_world_size() since world_size() doesn't exist in pytorch.dist.
Edited one line in src/transormers/generation/utils.py. Changed dist.world_size() to dist.get_world_size() since world_size() doesn't exist in pytorch.dist.
Edited one line in src/transormers/generation/utils.py. Changed dist.….world_size() to dist.get_world_size() since world_size() doesn't exist in pytorch.dist.
What does this PR do?
Fixes # Pytorch 2 generation/utils.py , 'torch.distributed' has no attribute 'world_size' #22375
#22375
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
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.
Library: