-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Update DDP example #1364
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
base: main
Are you sure you want to change the base?
Update DDP example #1364
Conversation
✅ Deploy Preview for pytorch-examples-preview canceled.
|
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.
LGTM, @jafraustro : CC reviewers in PR description.
the CI is failing for Distributed examples because something cant find numpy |
Hi, I changed the torch version in requirements.txt file. × No solution found when resolving dependencies: |
- Replace deprecated launch utility with torchrun (see PyTorch docs: https://pytorch.org/docs/stable/distributed.html#launch-utility) - Update README to reflect torchrun usage - Remove main.py (no longer referenced in documentation) - Update CI to test example.py script instead Signed-off-by: jafraustro <[email protected]>
Signed-off-by: jafraustro <[email protected]>
Signed-off-by: jafraustro <[email protected]>
it's failing now with some new errors |
Signed-off-by: jafraustro <[email protected]>
Hello @soumith, The errors occurred because there were not enough GPUs available. To address this, I added a minimum GPU verification step, similar to the approach used in the tensor_parallel_example.py example. This ensures the script only runs when the required number of GPUs are present. |
Update DDP to use the accelerator API and switch to torchrun for distributed launches
CC: @dvrogozh , @msaroufim