GNNLux NNConv returns its state without the nn wrapper, so the state can't be fed back in
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- julia
- Área
- machine-learning
Línea de trabajo
Start with GNNLux/src/layers/conv.jl at the reported NNConv state return around line 1673, then compare the state handling in EdgeConv and GINConv. Reproduce the failure by calling NNConv twice with the returned state or by running Lux.Training.single_train_step! twice; done means the returned state keeps the nn wrapper and the second call succeeds. The author says they plan to open a PR shortly, so check for work already underway.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
In GNNLux, NNConv returns the inner network's state directly instead of wrapping it as (; nn = ...). Its input state is (; nn = ...) (from initialstates, and the forward pass reads st.nn), so the returned state has a different structure than the one it expects. Feeding it back into the layer then fails, which is what a training loop does on its second step.
Minimal example:
using GNNLux, Lux, Random
rng = Random.Xoshiro(0)
g = GNNGraph([1, 1, 2, 3], [2, 3, 1, 1])
x = randn(rng, Float32, 3, g.num_nodes)
e = randn(rng, Float32, 10, g.num_edges)
l = NNConv(3 => 5, Dense(10 => 15), tanh)
ps, st = Lux.setup(rng, l) # st == (nn = NamedTuple(),)
y, st2 = l(g, x, e, ps, st) # st2 == NamedTuple() <- `nn` wrapper is gone
l(g, x, e, ps, st2)
# ERROR: FieldError: type NamedTuple has no field `nn`; NamedTuple has no fields at all.
With a stateful inner network, e.g. Chain(Dense(10 => 15), BatchNorm(15)), the returned state is (layer_1 = ..., layer_2 = ...) and the second call fails the same way (type NamedTuple has no field nn, available fields: layer_1, layer_2).
The same thing happens with Lux.Training.single_train_step!: the first step works, the second one throws the FieldError, so an NNConv model can't be trained with the standard Lux training loop.
Expected: the returned state has the same structure as the input, (; nn = <updated nn state>), like EdgeConv and GINConv already do.
Actual: NNConv returns _getstate(nn) without the nn key (GNNLux/src/layers/conv.jl#L1673).
This is the same kind of problem that #715 fixed for GNNChain. The current tests don't catch it because test_lux_layer never passes the returned state back in.
Versions: Julia 1.13.3, GNNLux 0.3.0-DEV (master at aa2926c), Lux 1.31.5.
I'd like to fix this, will open a PR shortly.
- Lenguaje dominante
- Julia
- Estrellas
- 310
- Forks
- 75
- Merge medio
- 2 d 15 h
- PR fusionados (30 d)
- 10
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de JuliaGraphs/GraphNeuralNetworks.jl
-
lux
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
JuliaGraphs/GraphNeuralNetworks.jl#732 ·
Los mantenedores suelen responder en 2 días
-
gnngraphs
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
JuliaGraphs/GraphNeuralNetworks.jl#733 ·
Los mantenedores suelen responder en 2 días
-
Unused output of node type leads to index error in ZygotePosiblemente ocupada @lenianiva la tomó hace 1 día. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
JuliaGraphs/GraphNeuralNetworks.jl#731 ·
Los mantenedores suelen responder en 2 días
-
maintainance
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
JuliaGraphs/GraphNeuralNetworks.jl#725 ·
Los mantenedores suelen responder en 2 días
-
GCNConv fails to compile with Reactant - MethodErrorPosiblemente ocupada @DHAKED440 la tomó hace 4 días. Abiertognnlib lux
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
JuliaGraphs/GraphNeuralNetworks.jl#710 ·
Los mantenedores suelen responder en 2 días
Todos los issues de JuliaGraphs/GraphNeuralNetworks.jl
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
erfinv(::Float16) and erfcinv(::Float16) are wrong for abs(x) <= 0.75 (erfinv(Float16(0)) == 0.2201)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
JuliaMath/SpecialFunctions.jl#571 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100