Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and the packages adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Entries link to the pull request that introduced them.

## GNNLux.jl 0.3.1-DEV

**Fixed**
- `MEGNetConv` now returns the updated state from its edge and node update layers, so stateful sublayers retain their state across calls ([#734]).

## GNNGraphs.jl 1.6.0 - 2026-11-04

**Added**
Expand Down Expand Up @@ -251,4 +256,5 @@ Lux implementations of the graph convolutional, pooling, and temporal layers
[#722]: https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/pull/722
[#718]: https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/pull/718
[#728]: https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/pull/728
[#734]: https://github.com/JuliaGraphs/GraphNeuralNetworks.jl/pull/734
[FluxML/Zygote.jl#1662]: https://github.com/FluxML/Zygote.jl/issues/1662
2 changes: 1 addition & 1 deletion GNNLux/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "GNNLux"
uuid = "e8545f4d-a905-48ac-a8c4-ca114b98986d"
version = "0.3.0"
version = "0.3.1-DEV"
authors = ["Carlo Lucibello and contributors"]

[workspace]
Expand Down
6 changes: 4 additions & 2 deletions GNNLux/src/layers/conv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1541,9 +1541,11 @@ end

function (l::MEGNetConv)(g, x, e, ps, st)
ϕe = StatefulLuxLayer{true}(l.ϕe, ps.ϕe, _getstate(st, :ϕe))
ϕv = StatefulLuxLayer{true}(l.ϕv, ps.ϕv, _getstate(st, :ϕv))
ϕv = StatefulLuxLayer{true}(l.ϕv, ps.ϕv, _getstate(st, :ϕv))
m = (; ϕe, ϕv, aggr=l.aggr)
return GNNlib.megnet_conv(m, g, x, e), st
y = GNNlib.megnet_conv(m, g, x, e)
stnew = (; ϕe = _getstate(ϕe), ϕv = _getstate(ϕv))
return y, stnew
end


Expand Down
11 changes: 11 additions & 0 deletions GNNLux/test/layers/conv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,17 @@

@test size(x_new) == (out_dims, g.num_nodes)
@test size(e_new) == (out_dims, g.num_edges)

ϕe = Chain(Dense(3in_dims => out_dims), BatchNorm(out_dims))
ϕv = Chain(Dense(in_dims + out_dims => out_dims), Dense(out_dims => out_dims))
l = MEGNetConv(in_dims, out_dims, ϕe, ϕv)
ps, st = LuxCore.setup(rng, l)
_, st_new = l(g, x, e, ps, st)

@test typeof(st_new) == typeof(st)
@test st_new.ϕe.layer_2.running_mean != st.ϕe.layer_2.running_mean
_, st_newer = l(g, x, e, ps, st_new)
@test typeof(st_newer) == typeof(st)
end

@testset "NNConv" begin
Expand Down
Loading