Skip to content

Prevent inconsistent indicators when growing batched graphs - #737

Open
DHAKED440 wants to merge 1 commit into
JuliaGraphs:masterfrom
DHAKED440:reproduce/issue-733-graph-indicator
Open

DHAKED440 wants to merge 1 commit into
JuliaGraphs:masterfrom
DHAKED440:reproduce/issue-733-graph-indicator

Conversation

@DHAKED440

Copy link
Copy Markdown
Contributor

Fixes #733

Problem

add_nodes and add_edges could increase num_nodes without extending graph_indicator, leaving batched graphs inconsistent and causing downstream operations to misbehave or fail.

Solution

Reject node growth on batched graphs until the API defines which component graph should own new nodes. Preserve unbatched behavior and extend an explicit indicator for single-graph inputs.

Changes

  • Guard ambiguous node growth in add_nodes and add_edges.
  • Update the function documentation and GNNGraphs development version.
  • Add regression coverage for batched growth, valid existing-node edge additions, single-graph indicators, unbatched graphs, and no-op cases.

Testing

  • Reproduced the original inconsistency before the fix.
  • Pkg.test("GNNGraphs"; coverage=false): 1,391 passed, 8 broken, 1,399 total; the test runner reported success.
  • git diff --check: passed.

This branch has not been deployed

No deployments
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.

add_nodes and add_edges leave graph_indicator inconsistent on batched graphs

1 participant