Skip to content

Remove positive/negative-edge zero-fanout workaround in k-hop sampler#676

Merged
kmontemayor2-sc merged 3 commits into
mainfrom
kmonte/remove_label_edge_fanout_workaround
Jun 25, 2026
Merged

Remove positive/negative-edge zero-fanout workaround in k-hop sampler#676
kmontemayor2-sc merged 3 commits into
mainfrom
kmonte/remove_label_edge_fanout_workaround

Conversation

@kmontemayor2-sc

Copy link
Copy Markdown
Collaborator

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)

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

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>
@kmontemayor2-sc

Copy link
Copy Markdown
Collaborator Author

/all_test

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

GiGL Automation

@ 18:43:02UTC : 🔄 E2E Test started.

@ 20:06:55UTC : ✅ Workflow completed successfully.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

GiGL Automation

@ 18:43:02UTC : 🔄 Scala Unit Test started.

@ 18:52:20UTC : ✅ Workflow completed successfully.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

GiGL Automation

@ 18:43:04UTC : 🔄 Lint Test started.

@ 18:50:54UTC : ✅ Workflow completed successfully.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

GiGL Automation

@ 18:43:06UTC : 🔄 Integration Test started.

@ 20:04:25UTC : ❌ Workflow failed.
Please check the logs for more details.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

GiGL Automation

@ 18:43:06UTC : 🔄 Python Unit Test started.

@ 19:47:48UTC : ✅ Workflow completed successfully.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

GiGL Automation

@ 18:43:07UTC : 🔄 C++ Unit Test started.

@ 18:45:01UTC : ✅ Workflow completed successfully.

@mkolodner-sc mkolodner-sc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks Kyle!

Comment thread gigl/distributed/utils/neighborloader.py
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>
@kmontemayor2-sc kmontemayor2-sc marked this pull request as ready for review June 25, 2026 18:42
@kmontemayor2-sc kmontemayor2-sc added this pull request to the merge queue Jun 25, 2026
Merged via the queue into main with commit b86e787 Jun 25, 2026
7 checks passed
@kmontemayor2-sc kmontemayor2-sc deleted the kmonte/remove_label_edge_fanout_workaround branch June 25, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants