-
Notifications
You must be signed in to change notification settings - Fork 467
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
Fix the missing parameter error when running mp_imagenet with torchrun #5729
Conversation
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, thanks Xiongfei
@@ -375,6 +376,6 @@ def _mp_fn(index, flags): | |||
|
|||
if __name__ == '__main__': | |||
if dist.is_torchelastic_launched(): | |||
_mp_fn(FLAGS) | |||
_mp_fn(xu.getenv_as(xenv.LOCAL_RANK, int), FLAGS) |
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.
This is set by torchrun, right? Just confirming my understanding.
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
Thanks for the review! |
pytorch#5729) * Fix the missing parameter error when running mp_imagenet with torchrun * made it local rank
pytorch#5729) * Fix the missing parameter error when running mp_imagenet with torchrun * made it local rank
#5729) * Fix the missing parameter error when running mp_imagenet with torchrun * made it local rank
#5729) * Fix the missing parameter error when running mp_imagenet with torchrun * made it local rank
Currently the test (
PJRT_DEVICE=GPU torchrun --nproc_per_node=4 --nnodes=1 --node_rank=1 --rdzv_endpoint="10.164.0.13:12355" pytorch/xla/test/test_train_mp_imagenet.py --fake_data --pjrt_distributed --batch_size=128 --num_epochs=1
) fails with error:This PR fixes it.