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 DDP NeighborLoader examples #6307

Merged
merged 4 commits into from
Dec 28, 2022
Merged

Add DDP NeighborLoader examples #6307

merged 4 commits into from
Dec 28, 2022

Conversation

LukeLIN-web
Copy link
Contributor

@LukeLIN-web LukeLIN-web commented Dec 27, 2022

Since NeighborLoader is supported by pyg-lib. We could add an example in distributed_sampling_loader.py.
I refer #5340 (comment) to set kwargs = {'batch_size': 1024, 'num_workers': 0}

@rusty1s
Copy link
Member

rusty1s commented Dec 27, 2022

Thank you! Can we replace the existing example with NeighborLoader?

@LukeLIN-web
Copy link
Contributor Author

LukeLIN-web commented Dec 27, 2022

Thank you! Can we replace the existing example with NeighborLoader?

Yes, we could replace the existing pytorch_geometric/examples/multi_gpu/distributed_sampling.py.
Do you mean I shouldn't change too many lines; Only replace the necessary lines of distributed_sampling.py?

@rusty1s rusty1s changed the title add DDP neighborloader examples Add DDP NeighborLoader examples Dec 28, 2022
@rusty1s
Copy link
Member

rusty1s commented Dec 28, 2022

Yes, since we want to fully replace NeighborSampler with NeighborLoader, I think just replacing the example would be best.

@codecov
Copy link

codecov bot commented Dec 28, 2022

Codecov Report

Merging #6307 (3b24091) into master (cc2afb8) will not change coverage.
The diff coverage is n/a.

❗ Current head 3b24091 differs from pull request most recent head 0af00c8. Consider uploading reports for the commit 0af00c8 to get more accurate results

@@           Coverage Diff           @@
##           master    #6307   +/-   ##
=======================================
  Coverage   84.59%   84.59%           
=======================================
  Files         381      381           
  Lines       21266    21266           
=======================================
  Hits        17990    17990           
  Misses       3276     3276           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@LukeLIN-web LukeLIN-web reopened this Dec 28, 2022
@LukeLIN-web
Copy link
Contributor Author

LukeLIN-web commented Dec 28, 2022

Yes, since we want to fully replace NeighborSampler with NeighborLoader, I think just replacing the example would be best.

Thank you. I replaced the example and test epoch time, PyG2.2.0 spend half the epoch time than 2.1.0 so that I believe the code is correct.

@rusty1s rusty1s merged commit 31d8687 into pyg-team:master Dec 28, 2022
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.

2 participants