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

Add distributed usage to ImageNet example's README #1001

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Quentin-Anthony
Copy link

Following the discussions in #995 and #862, This PR adds a small usage example into the ImageNet README.

One note, however, is that specifying --gpu will trigger the print in https://github.com/pytorch/examples/blob/main/imagenet/main.py#L95-L97, which is confusing to users. Should we either remove or clarify this print?

@netlify
Copy link

netlify bot commented Apr 30, 2022

Deploy Preview for pytorch-examples-preview ready!

Name Link
🔨 Latest commit 66d9566
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-examples-preview/deploys/626d2944ee570c0008dae0a5
😎 Deploy Preview https://deploy-preview-1001--pytorch-examples-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Comment on lines +53 to +54
python main.py ... --world-size 2 --rank 0 --gpu 0 [imagenet-folder with train and val folders] &
python main.py ... --world-size 2 --rank 1 --gpu 1 [imagenet-folder with train and val folders] &
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Quentin-Anthony noob question: why do you need the trailing "&"?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hudeven -- It launches the line in the background so that bash can run the next command immediately

@hudeven
Copy link
Contributor

hudeven commented Aug 9, 2022

I think the print for --gpu is useful. To reduce the confusion, we can add some clarification to the print message. Alternative: as DDP is recommended to replace DataParallel, we should probably remove the usage of DataParallel in examples and update the print message accordingly.

@Quentin-Anthony
Copy link
Author

I think the print for --gpu is useful. To reduce the confusion, we can add some clarification to the print message. Alternative: as DDP is recommended to replace DataParallel, we should probably remove the usage of DataParallel in examples and update the print message accordingly.

I'm confused. This PR is for updating the README. What's being printed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants