Skip to content

Return the NNConv state with the nn wrapper in GNNLux - #728

Merged
CarloLucibello merged 1 commit into
JuliaGraphs:masterfrom
parth-patel010:fix/lux-nnconv-state
Nov 7, 2026
Merged

CarloLucibello merged 1 commit into
JuliaGraphs:masterfrom
parth-patel010:fix/lux-nnconv-state

Conversation

@parth-patel010

@parth-patel010 parth-patel010 commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #727

NNConv in GNNLux returned _getstate(nn) directly, so the state it handed back was the inner network's state instead of (; nn = ...). Since the forward pass reads st.nn, passing that returned state back into the layer failed with a FieldError, e.g. on the second step of Lux.Training.single_train_step!.

This wraps the returned state as (; nn = _getstate(nn)), the same as EdgeConv and GINConv do.

I added a test with a BatchNorm inside the edge network that checks the returned state has the same type as the input, that the running stats actually get updated, and that the state can be fed back in. It fails on master with the FieldError and passes with the fix. The full GNNLux test suite passes locally (Julia 1.13.3; 180 pass, 34 broken, the broken ones are the existing skipped AD backends).

Also added a CHANGELOG entry under GNNLux Unreleased.

@CarloLucibello
CarloLucibello merged commit 8451a01 into JuliaGraphs:master Nov 7, 2026
12 checks passed
@CarloLucibello CarloLucibello added github_actions Pull requests that update GitHub Actions code lux and removed github_actions Pull requests that update GitHub Actions code labels Nov 7, 2026
CarloLucibello added a commit that referenced this pull request Nov 11, 2026
…735)

* Remove local setup files and notes committed in #729

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix changelog inconsistencies

Move #717 and #728 out of the already tagged releases, link the PRs that
introduced each fix, sort the link references and use one date separator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep changelog edits out of PRs in AGENTS.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GNNLux NNConv returns its state without the nn wrapper, so the state can't be fed back in

2 participants