-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Bi-directional Sampling for NeighborSampler #10126
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
Bi-directional Sampling for NeighborSampler #10126
Conversation
37688a8 to
7ba87d5
Compare
|
looks good so far |
While working on [this PR](#10126), I noticed that there are no sanity tests for the default NeighborSampler. Although NeigborLoader effectively tests a lot of this functionality, having lower level tests helps with ensuring consistency for each `sample` call of the sampler, without the batching logic of `NeighborLoader` getting involved. --------- Co-authored-by: Zack Aristei <[email protected]> Co-authored-by: Rishi Puri <[email protected]>
fdf6450 to
c9eab32
Compare
d2506c8 to
9adc7b9
Compare
|
closing since matthias said theres an existing simple way to do this. please jsut put the fix into my branch: |
puririshi98
left a comment
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 but i will request that @akihironitta or @rusty1s review this
e288d28 to
d99fb71
Compare
|
#10200 should be merged first |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10126 +/- ##
==========================================
- Coverage 86.11% 85.90% -0.21%
==========================================
Files 496 501 +5
Lines 33655 34811 +1156
==========================================
+ Hits 28981 29906 +925
- Misses 4674 4905 +231 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…am#10139) While working on [this PR](pyg-team#10126), I noticed that there are no sanity tests for the default NeighborSampler. Although NeigborLoader effectively tests a lot of this functionality, having lower level tests helps with ensuring consistency for each `sample` call of the sampler, without the batching logic of `NeighborLoader` getting involved. --------- Co-authored-by: Zack Aristei <[email protected]> Co-authored-by: Rishi Puri <[email protected]>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
puririshi98
left a comment
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.
merging as per discussions with matthias, these are heavily tested through NVIDIA already
|
turns out this PR already included fixes from the other PR and so when they merged it duplicated them. reverting the merge just for that file seemed to fix things since the changes from his older pr still exist in main, should be good to merge once the unrelated onnx issue is fixed. |
This PR makes the following changes:
srctodstnode, and not just fromdsttosrcnode, which is the current default behavior.BidirectionalNeighborSampler, which samples nodes/edges in both upstream and downstream directions for a directed graph, as if it were an undirected graph.merge_withandcollatemethods to the SamplerOutput dataclass, allowing for different SamplerOutputs to be merged together. This also becomes useful in scenarios where the user may want to sample using multiple different unique sampling methods.This PR will remain in draft until
methods are also implemented on the corresponding Hetero graph classes, andunittests have been written to cover new behaviors.UPDATE: Hetero Bidirectional Sampler and SamplerOutput merge will be a separate PR.