Remove positive/negative-edge zero-fanout workaround in k-hop sampler#676
Merged
kmontemayor2-sc merged 3 commits intoJun 25, 2026
Merged
Conversation
DistNeighborSampler now skips label (positive/negative supervision) edges directly in its k-hop loop, mirroring DistPPRNeighborSampler. As a result patch_fanout_for_sampling no longer injects zero fanout for label edges; it excludes them from num_neighbors instead, resolving the long-standing TODO at neighborloader.py. Behavior-preserving (zero fanout and skipping produce identical subgraphs) and covers both colocated and graph-store modes. - dist_neighbor_sampler.py: skip is_label_edge_type edges before indexing num_neighbors - neighborloader.py: patch_fanout_for_sampling excludes label edges; add empty-edges guard - base_dist_loader.py: fix stale create_sampling_config docstring - neighborloader_test.py: update expectations (labels excluded, not zeroed) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
/all_test |
Contributor
GiGL Automation@ 18:43:02UTC : 🔄 @ 20:06:55UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 18:43:02UTC : 🔄 @ 18:52:20UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 18:43:04UTC : 🔄 @ 18:50:54UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 18:43:06UTC : 🔄 @ 20:04:25UTC : ❌ Workflow failed. |
Contributor
GiGL Automation@ 18:43:06UTC : 🔄 @ 19:47:48UTC : ✅ Workflow completed successfully. |
Contributor
GiGL Automation@ 18:43:07UTC : 🔄 @ 18:45:01UTC : ✅ Workflow completed successfully. |
mkolodner-sc
approved these changes
Jun 22, 2026
patch_fanout_for_sampling now raises ValueError if a caller passes any label (positive/negative supervision) edge type in num_neighbors — previously these were silently dropped. The existing guard that raises when there are no message-passing edge types to fan out around is retained. Fail fast on invalid fanout input rather than silently correcting it. - neighborloader.py: dict branch rejects caller-provided label edge types - base_dist_loader.py: update create_sampling_config docstring - neighborloader_test.py: label-edge and no-message-passing-edges cases now assert raises - dist_ablp_neighborloader_test.py: build num_neighbors over message-passing edges only Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
yliu2-sc
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DistNeighborSampler now skips label (positive/negative supervision) edges directly in its k-hop loop, mirroring DistPPRNeighborSampler. As a result patch_fanout_for_sampling no longer injects zero fanout for label edges; it excludes them from num_neighbors instead, resolving the long-standing TODO at neighborloader.py. Behavior-preserving (zero fanout and skipping produce identical subgraphs) and covers both colocated and graph-store modes.
Scope of work done
Where is the documentation for this feature?: N/A
Did you add automated tests or write a test plan?
Updated Changelog.md? NO
Ready for code review?: NO