-
-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests are failing due to ComponentArrays #2411
Comments
It appears that recent changes in ComponentArrays.jl have broken the parameter collection. On ComponentArrays v0.15.10 we had julia> using Flux, ComponentArrays
julia> w = ComponentArray(a=1.0, b=[2, 1, 4], c=(a=2, b=[1, 2]))
ComponentVector{Float64}(a = 1.0, b = [2.0, 1.0, 4.0], c = (a = 2.0, b = [1.0, 2.0]))
julia> ps = Flux.params(w)
Params([(a = 1.0, b = [2.0, 1.0, 4.0], c = (a = 2.0, b = [1.0, 2.0]))])
julia> ps[1]
ComponentVector{Float64}(a = 1.0, b = [2.0, 1.0, 4.0], c = (a = 2.0, b = [1.0, 2.0]))
julia> gs = gradient(() -> sum(w.a) + sum(w.c.b), ps)
Grads(...)
julia> gradient(() -> sum(w.a) + sum(w.c.b), ps)[ps[1]]
ComponentVector{Float64}(a = 1.0, b = [0.0, 0.0, 0.0], c = (a = 0.0, b = [1.0, 1.0])) On ComponentArrays v0.15.11 instead julia> w = ComponentArray(a=1.0, b=[2, 1, 4], c=(a=2, b=[1, 2]))
ComponentVector{Float64}(a = 1.0, b = [2.0, 1.0, 4.0], c = (a = 2.0, b = [1.0, 2.0]))
julia> ps = Flux.params(w)
Params([[2.0, 1.0, 4.0], [1.0, 2.0]])
julia> ps[1]
3-element Vector{Float64}:
2.0
1.0
4.0
julia> gs = gradient(() -> sum(w.a) + sum(w.c.b), ps)
Grads(...)
julia> gradient(() -> sum(w.a) + sum(w.c.b), ps)[ps[1]] # nothing Could jonniedie/ComponentArrays.jl#252 be the responsible? cc @avik-pal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
on a recent CI run
https://github.com/FluxML/Flux.jl/actions/runs/8411429678/job/23031003428?pr=2409#step:7:561
The text was updated successfully, but these errors were encountered: