Fix backward_step node removal to clean up incident edges#500
Draft
josephdviviano wants to merge 1 commit intomasterfrom
Draft
Fix backward_step node removal to clean up incident edges#500josephdviviano wants to merge 1 commit intomasterfrom
josephdviviano wants to merge 1 commit intomasterfrom
Conversation
When backward-stepping a node removal, edges incident to the deleted node must be removed before re-indexing. Previously the code asserted no such edges existed, which would crash if the graph had edges touching the removed node. Now edges are properly filtered out and edge_attr is cleaned up alongside edge_index. Also makes test_graph_env node class assignment deterministic. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #500 +/- ##
==========================================
- Coverage 72.48% 72.48% -0.01%
==========================================
Files 55 55
Lines 8519 8522 +3
Branches 1090 1091 +1
==========================================
+ Hits 6175 6177 +2
Misses 1957 1957
- Partials 387 388 +1
🚀 New features to boost your workflow:
|
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.
Summary
GraphBuilding, edges incident to the deleted node must be removed before re-indexingassert torch.all(graph.edge_index != node_idx)), crashing if the graph had edges touching the removed nodeedge_attris cleaned up alongsideedge_indexfix-graph2branch with an additionaledge_attrfixTest plan
test_graph_envpasses🤖 Generated with Claude Code