GNNLux NNConv returns its state without the nn wrapper, so the state can't be fed back in
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- julia
- Ambito
- machine-learning
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Julia
- Stelle
- 310
- Fork
- 75
- Merge medio
- 1g 13h
- PR unite (30g)
- 8
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di JuliaGraphs/GraphNeuralNetworks.jl
-
maintainance
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
JuliaGraphs/GraphNeuralNetworks.jl#725 ·
I maintainer di solito rispondono entro 1 giorno
-
remove_nodes doesn't update graph_indicator on batched graphsForse già presa @parth-patel010 l’ha presa 10 giorni fa. Apertagnngraphs
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
JuliaGraphs/GraphNeuralNetworks.jl#716 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
GCNConv fails to compile with Reactant - MethodErrorForse già presa @DHAKED440 l’ha presa 2 giorni fa. Apertagnnlib lux
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
JuliaGraphs/GraphNeuralNetworks.jl#710 ·
I maintainer di solito rispondono entro 1 giorno
-
flux gnngraphs gnnlib
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
JuliaGraphs/GraphNeuralNetworks.jl#702 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Differentiating across `add_edges` causes Zygote to segfaultForse già presa @DHAKED440 l’ha presa 1 giorno fa. Apertagnngraphs
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
JuliaGraphs/GraphNeuralNetworks.jl#671 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di JuliaGraphs/GraphNeuralNetworks.jl
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
backport 1.14 GC
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
`binary_focal_loss` throws a `DomainError` when a negative sample has `ŷ = 1`Forse già presa @parth-patel010 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
FluxML/Flux.jl#2818 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
JuliaDiff/TaylorSeries.jl#445 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
control-toolbox/CTActions#139 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno