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 SubgraphType with bidirectional sampling support (2/2) #7200

Merged
merged 6 commits into from
Apr 18, 2023

Conversation

rusty1s
Copy link
Member

@rusty1s rusty1s commented Apr 18, 2023

No description provided.

@rusty1s rusty1s self-assigned this Apr 18, 2023
@codecov
Copy link

codecov bot commented Apr 18, 2023

Codecov Report

Merging #7200 (766f566) into master (65bca8b) will increase coverage by 0.00%.
The diff coverage is 87.50%.

@@           Coverage Diff           @@
##           master    #7200   +/-   ##
=======================================
  Coverage   91.68%   91.68%           
=======================================
  Files         436      436           
  Lines       23980    24010   +30     
=======================================
+ Hits        21985    22014   +29     
- Misses       1995     1996    +1     
Impacted Files Coverage Δ
torch_geometric/loader/utils.py 81.39% <42.85%> (-0.65%) ⬇️
torch_geometric/sampler/neighbor_sampler.py 91.07% <91.66%> (-0.11%) ⬇️
torch_geometric/loader/link_neighbor_loader.py 100.00% <100.00%> (ø)
torch_geometric/loader/neighbor_loader.py 100.00% <100.00%> (ø)
torch_geometric/sampler/base.py 98.46% <100.00%> (+0.12%) ⬆️

... and 1 file with indirect coverage changes

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

@rusty1s rusty1s merged commit 23adffa into master Apr 18, 2023
@rusty1s rusty1s deleted the to_bidirectional2 branch April 18, 2023 10:02
rusty1s added a commit that referenced this pull request May 24, 2023
Simple addition to enable bidirectional neighbor loader benchmarking.
Results show a relative drop in performance moving from directional to
bidirectional (example below) maybe due to the fact that, currently,
bidirectional sampling is implemented as a post-processing of regular
sampling
[#7200](https://github.com/pyg-team/pytorch_geometric/pull/7200/files#)

With directional sampling:
Dataset: products
Training sampling with [10, 5] neighbors
100%|█████████████████████████████████193/193 [00:03<00:00, 48.96it/s]
100%|█████████████████████████████████ 193/193 [00:03<00:00, 49.59it/s]
100%|█████████████████████████████████ 193/193 [00:03<00:00, 49.01it/s]
batch size=1024, iterations=579, runtimes=[3.943, 3.892, 3.939], average
runtime=3.925

while with bidirectional sampling:
Dataset: products
Training sampling with [10, 5] neighbors
100%|██████████████████████████████████ 193/193 [00:04<00:00, 42.22it/s]
100%|██████████████████████████████████193/193 [00:04<00:00, 43.18it/s]
100%|██████████████████████████████████193/193 [00:04<00:00, 42.56it/s]
batch size=1024, iterations=579, runtimes=[4.572, 4.47, 4.535], average
runtime=4.526

---------

Co-authored-by: rusty1s <matthias.fey@tu-dortmund.de>
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.

1 participant