Skip to content
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

Zygote v0.6.56 breaks tests #355

Closed
simsurace opened this issue Mar 14, 2023 · 6 comments
Closed

Zygote v0.6.56 breaks tests #355

simsurace opened this issue Mar 14, 2023 · 6 comments

Comments

@simsurace
Copy link
Member

The newest Zygote release unfortunately seems to have broken AbstractGPs again:

[ Info: Ran util tests
rand (gradients): Error During Test at /home/simone_a/Documents/projects/julia/AbstractGPs.jl/test/finite_gp_projection.jl:105
  Got exception outside of a @test
  ArgumentError: cannot set index in the lower triangular part (2, 1) of an UpperTriangular matrix to a nonzero value (-0.0004172946851621449)
  Stacktrace:
    [1] setindex!
      @ ~/.julia/juliaup/julia-1.8.5+0.x64.linux.gnu/share/julia/stdlib/v1.8/LinearAlgebra/src/triangular.jl:233 [inlined]
    [2] _setindex!
      @ ./abstractarray.jl:1374 [inlined]
    [3] setindex!
      @ ./abstractarray.jl:1344 [inlined]
    [4] _reverse!(A::UpperTriangular{Float64, Matrix{Float64}}, dims::Tuple{Int64, Int64})
      @ Base ./arraymath.jl:89
    [5] _reverse!
      @ ./arraymath.jl:71 [inlined]
    [6] reverse!(A::UpperTriangular{Float64, Matrix{Float64}}; dims::Function)
      @ Base ./arraymath.jl:70
    [7] _reverse(A::UpperTriangular{Float64, Matrix{Float64}}, dims::Function)
      @ Base ./arraymath.jl:60
    [8] #reverse#247
      @ ./arraymath.jl:59 [inlined]
    [9] reverse
      @ ./arraymath.jl:59 [inlined]
   [10] _tryreverse
      @ ~/.julia/packages/Zygote/hLzJT/src/lib/array.jl:168 [inlined]
   [11] (::Zygote.var"#map_back#474"{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, 1, Tuple{Matrix{Float64}}, Tuple{Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}, Matrix{Tuple{Float64, Zygote.Pullback{Tuple{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, Float64}, Tuple{Zygote.Pullback{Tuple{typeof(KernelFunctions.kappa), SqExponentialKernel{Distances.Euclidean}, Float64}, Tuple{Zygote.ZBack{ChainRules.var"#exp_pullback#1319"{Float64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}, Zygote.ZBack{ChainRules.var"#/_pullback#1335"{Float64, Float64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}, Zygote.ZBack{ChainRules.var"#-_pullback#1343"{Int64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:κ, Zygote.Context{false}, KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, SqExponentialKernel{Distances.Euclidean}}}}}}}})(Δ::UpperTriangular{Float64, Matrix{Float64}})
      @ Zygote ~/.julia/packages/Zygote/hLzJT/src/lib/array.jl:202
   [12] #2645#back
      @ ~/.julia/packages/ZygoteRules/AIbCs/src/adjoint.jl:67 [inlined]
   [13] Pullback
      @ ~/.julia/packages/KernelFunctions/9ODCa/src/matrix/kernelmatrix.jl:150 [inlined]
   [14] Pullback
      @ ~/Documents/projects/julia/AbstractGPs.jl/src/base_gp.jl:70 [inlined]
   [15] Pullback
      @ ~/Documents/projects/julia/AbstractGPs.jl/src/abstract_gp.jl:56 [inlined]
   [16] (::Zygote.Pullback{Tuple{typeof(mean_and_cov), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.var"#1946#back#155"{typeof(identity)}, Zygote.Pullback{Tuple{typeof(cov), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(kernelmatrix), SqExponentialKernel{Distances.Euclidean}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(KernelFunctions.pairwise), Distances.SqEuclidean, Vector{Float64}}, Tuple{Zygote.var"#49#back#1057"{Zygote.var"#1058#1059"{Transpose{Float64, Matrix{Float64}}, typeof(transpose)}}, Zygote.Pullback{Tuple{Type{NamedTuple{(:dims,)}}, Tuple{Int64}}, Tuple{Zygote.Pullback{Tuple{Type{NamedTuple{(:dims,), Tuple{Int64}}}, Tuple{Int64}}, Tuple{Zygote.var"#2110#back#228"{Zygote.Jnew{NamedTuple{(:dims,), Tuple{Int64}}, Nothing, true}}}}}}, Zygote.var"#2584#back#435"{Zygote.var"#431#433"{Vector{Float64}, Tuple{Colon, Int64}}}, Zygote.var"#1946#back#155"{typeof(identity)}}}, Zygote.var"#2645#back#478"{Zygote.var"#map_back#474"{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, 1, Tuple{Matrix{Float64}}, Tuple{Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}, Matrix{Tuple{Float64, Zygote.Pullback{Tuple{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, Float64}, Tuple{Zygote.Pullback{Tuple{typeof(KernelFunctions.kappa), SqExponentialKernel{Distances.Euclidean}, Float64}, Tuple{Zygote.ZBack{ChainRules.var"#exp_pullback#1319"{Float64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}, Zygote.ZBack{ChainRules.var"#/_pullback#1335"{Float64, Float64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}, Zygote.ZBack{ChainRules.var"#-_pullback#1343"{Int64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:κ, Zygote.Context{false}, KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, SqExponentialKernel{Distances.Euclidean}}}}}}}}}, Zygote.Pullback{Tuple{typeof(KernelFunctions.metric), SqExponentialKernel{Distances.Euclidean}}, Tuple{Zygote.Pullback{Tuple{Type{Distances.SqEuclidean}}, Tuple{}}}}, Zygote.var"#2100#back#226"{Zygote.Jnew{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, Nothing, false}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:kernel, Zygote.Context{false}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, SqExponentialKernel{Distances.Euclidean}}}}}, Zygote.Pullback{Tuple{typeof(mean), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(AbstractGPs._map_meanfunction), CustomMean{typeof(sin)}, Vector{Float64}}, Tuple{Zygote.var"#2645#back#478"{Zygote.var"#map_back#474"{typeof(sin), 1, Tuple{Vector{Float64}}, Tuple{Tuple{Base.OneTo{Int64}}}, Vector{Tuple{Float64, Zygote.ZBack{ChainRules.var"#sin_pullback#1305"{Float64}}}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:f, Zygote.Context{false}, CustomMean{typeof(sin)}, typeof(sin)}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:mean, Zygote.Context{false}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, CustomMean{typeof(sin)}}}}}}})(Δ::Tuple{Vector{Float64}, UpperTriangular{Float64, Matrix{Float64}}})
      @ Zygote ~/.julia/packages/Zygote/hLzJT/src/compiler/interface2.jl:0
   [17] Pullback
      @ ~/Documents/projects/julia/AbstractGPs.jl/src/finite_gp_projection.jl:134 [inlined]
   [18] (::Zygote.Pullback{Tuple{typeof(mean_and_cov), AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}}, Tuple{Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:Σy, Zygote.Context{false}, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Int64}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:x, Zygote.Context{false}, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Vector{Float64}}}, Zygote.var"#1946#back#155"{typeof(identity)}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:f, Zygote.Context{false}, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}}}, Zygote.var"#back#178"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Matrix{Float64}}}, Zygote.var"#3193#back#700"{Zygote.var"#698#699"}, Zygote.var"#back#179"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Matrix{Float64}}}}, Zygote.Pullback{Tuple{typeof(mean_and_cov), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.var"#1946#back#155"{typeof(identity)}, Zygote.Pullback{Tuple{typeof(cov), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(kernelmatrix), SqExponentialKernel{Distances.Euclidean}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(KernelFunctions.pairwise), Distances.SqEuclidean, Vector{Float64}}, Tuple{Zygote.var"#49#back#1057"{Zygote.var"#1058#1059"{Transpose{Float64, Matrix{Float64}}, typeof(transpose)}}, Zygote.Pullback{Tuple{Type{NamedTuple{(:dims,)}}, Tuple{Int64}}, Tuple{Zygote.Pullback{Tuple{Type{NamedTuple{(:dims,), Tuple{Int64}}}, Tuple{Int64}}, Tuple{Zygote.var"#2110#back#228"{Zygote.Jnew{NamedTuple{(:dims,), Tuple{Int64}}, Nothing, true}}}}}}, Zygote.var"#2584#back#435"{Zygote.var"#431#433"{Vector{Float64}, Tuple{Colon, Int64}}}, Zygote.var"#1946#back#155"{typeof(identity)}}}, Zygote.var"#2645#back#478"{Zygote.var"#map_back#474"{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, 1, Tuple{Matrix{Float64}}, Tuple{Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}, Matrix{Tuple{Float64, Zygote.Pullback{Tuple{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, Float64}, Tuple{Zygote.Pullback{Tuple{typeof(KernelFunctions.kappa), SqExponentialKernel{Distances.Euclidean}, Float64}, Tuple{Zygote.ZBack{ChainRules.var"#exp_pullback#1319"{Float64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}, Zygote.ZBack{ChainRules.var"#/_pullback#1335"{Float64, Float64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}, Zygote.ZBack{ChainRules.var"#-_pullback#1343"{Int64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:κ, Zygote.Context{false}, KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, SqExponentialKernel{Distances.Euclidean}}}}}}}}}, Zygote.Pullback{Tuple{typeof(KernelFunctions.metric), SqExponentialKernel{Distances.Euclidean}}, Tuple{Zygote.Pullback{Tuple{Type{Distances.SqEuclidean}}, Tuple{}}}}, Zygote.var"#2100#back#226"{Zygote.Jnew{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, Nothing, false}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:kernel, Zygote.Context{false}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, SqExponentialKernel{Distances.Euclidean}}}}}, Zygote.Pullback{Tuple{typeof(mean), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(AbstractGPs._map_meanfunction), CustomMean{typeof(sin)}, Vector{Float64}}, Tuple{Zygote.var"#2645#back#478"{Zygote.var"#map_back#474"{typeof(sin), 1, Tuple{Vector{Float64}}, Tuple{Tuple{Base.OneTo{Int64}}}, Vector{Tuple{Float64, Zygote.ZBack{ChainRules.var"#sin_pullback#1305"{Float64}}}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:f, Zygote.Context{false}, CustomMean{typeof(sin)}, typeof(sin)}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:mean, Zygote.Context{false}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, CustomMean{typeof(sin)}}}}}}}}})(Δ::Tuple{Vector{Float64}, UpperTriangular{Float64, Matrix{Float64}}})
      @ Zygote ~/.julia/packages/Zygote/hLzJT/src/compiler/interface2.jl:0
   [19] Pullback
      @ ~/Documents/projects/julia/AbstractGPs.jl/src/finite_gp_projection.jl:234 [inlined]
   [20] (::Zygote.Pullback{Tuple{typeof(rand), MersenneTwister, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Int64}, Tuple{Zygote.ZBack{ChainRules.var"#length_pullback#746"}, Zygote.Pullback{Tuple{typeof(Base.Broadcast.materialize), Matrix{Float64}}, Tuple{}}, Zygote.ZBack{ChainRules.var"#promote_type_pullback#839"{Tuple{DataType, DataType}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Int64}}, Zygote.var"#back#178"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}}, Zygote.Pullback{Tuple{typeof(eltype), Cholesky{Float64, Matrix{Float64}}}, Tuple{Zygote.ZBack{ChainRules.var"#eltype_pullback#384"}, Zygote.ZBack{ChainRules.var"#typeof_pullback#45"}}}, Zygote.var"#3326#back#767"{Zygote.var"#763#765"{Tuple{Vector{Float64}, Matrix{Float64}}}}, Zygote.Pullback{Tuple{typeof(mean_and_cov), AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}}, Tuple{Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:Σy, Zygote.Context{false}, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Int64}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:x, Zygote.Context{false}, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Vector{Float64}}}, Zygote.var"#1946#back#155"{typeof(identity)}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:f, Zygote.Context{false}, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}}}, Zygote.var"#back#178"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Matrix{Float64}}}, Zygote.var"#3193#back#700"{Zygote.var"#698#699"}, Zygote.var"#back#179"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Matrix{Float64}}}}, Zygote.Pullback{Tuple{typeof(mean_and_cov), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.var"#1946#back#155"{typeof(identity)}, Zygote.Pullback{Tuple{typeof(cov), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(kernelmatrix), SqExponentialKernel{Distances.Euclidean}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(KernelFunctions.pairwise), Distances.SqEuclidean, Vector{Float64}}, Tuple{Zygote.var"#49#back#1057"{Zygote.var"#1058#1059"{Transpose{Float64, Matrix{Float64}}, typeof(transpose)}}, Zygote.Pullback{Tuple{Type{NamedTuple{(:dims,)}}, Tuple{Int64}}, Tuple{Zygote.Pullback{Tuple{Type{NamedTuple{(:dims,), Tuple{Int64}}}, Tuple{Int64}}, Tuple{Zygote.var"#2110#back#228"{Zygote.Jnew{NamedTuple{(:dims,), Tuple{Int64}}, Nothing, true}}}}}}, Zygote.var"#2584#back#435"{Zygote.var"#431#433"{Vector{Float64}, Tuple{Colon, Int64}}}, Zygote.var"#1946#back#155"{typeof(identity)}}}, Zygote.var"#2645#back#478"{Zygote.var"#map_back#474"{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, 1, Tuple{Matrix{Float64}}, Tuple{Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}, Matrix{Tuple{Float64, Zygote.Pullback{Tuple{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, Float64}, Tuple{Zygote.Pullback{Tuple{typeof(KernelFunctions.kappa), SqExponentialKernel{Distances.Euclidean}, Float64}, Tuple{Zygote.ZBack{ChainRules.var"#exp_pullback#1319"{Float64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}, Zygote.ZBack{ChainRules.var"#/_pullback#1335"{Float64, Float64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}, Zygote.ZBack{ChainRules.var"#-_pullback#1343"{Int64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:κ, Zygote.Context{false}, KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, SqExponentialKernel{Distances.Euclidean}}}}}}}}}, Zygote.Pullback{Tuple{typeof(KernelFunctions.metric), SqExponentialKernel{Distances.Euclidean}}, Tuple{Zygote.Pullback{Tuple{Type{Distances.SqEuclidean}}, Tuple{}}}}, Zygote.var"#2100#back#226"{Zygote.Jnew{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, Nothing, false}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:kernel, Zygote.Context{false}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, SqExponentialKernel{Distances.Euclidean}}}}}, Zygote.Pullback{Tuple{typeof(mean), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(AbstractGPs._map_meanfunction), CustomMean{typeof(sin)}, Vector{Float64}}, Tuple{Zygote.var"#2645#back#478"{Zygote.var"#map_back#474"{typeof(sin), 1, Tuple{Vector{Float64}}, Tuple{Tuple{Base.OneTo{Int64}}}, Vector{Tuple{Float64, Zygote.ZBack{ChainRules.var"#sin_pullback#1305"{Float64}}}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:f, Zygote.Context{false}, CustomMean{typeof(sin)}, typeof(sin)}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:mean, Zygote.Context{false}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, CustomMean{typeof(sin)}}}}}}}}}, Zygote.ZBack{ChainRules.var"#adjoint_mat_pullback#2059"{ChainRulesCore.ProjectTo{UpperTriangular, NamedTuple{(:parent,), Tuple{ChainRulesCore.ProjectTo{AbstractArray, NamedTuple{(:element, :axes), Tuple{ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}}}}}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Matrix{Float64}}}, Zygote.Pullback{Tuple{typeof(AbstractGPs._symmetric), Matrix{Float64}}, Tuple{Zygote.var"#2963#back#607"{Zygote.var"#back#606"{Symmetric{Float64, Matrix{Float64}}}}}}, Zygote.var"#3097#back#668"{Zygote.var"#666#667"{Cholesky{Float64, Matrix{Float64}}}}, Zygote.Pullback{Tuple{typeof(eltype), Vector{Float64}}, Tuple{Zygote.ZBack{ChainRules.var"#eltype_pullback#384"}, Zygote.ZBack{ChainRules.var"#typeof_pullback#45"}}}, Zygote.Pullback{Tuple{typeof(cholesky), Symmetric{Float64, Matrix{Float64}}}, Tuple{Zygote.ZBack{ChainRules.var"#cholesky_HermOrSym_pullback#2131"{Symmetric{Float64, Matrix{Float64}}, Cholesky{Float64, Matrix{Float64}}}}, Zygote.Pullback{Tuple{Type{NoPivot}}, Tuple{}}}}, Zygote.var"#back#179"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Matrix{Float64}}}}, Zygote.ZBack{ChainRules.var"#randn_pullback#2206"{Tuple{MersenneTwister, DataType, Int64, Int64}}}, Zygote.ZBack{ChainRules.var"#times_pullback#1479"{LowerTriangular{Float64, Adjoint{Float64, Matrix{Float64}}}, Matrix{Float64}, ChainRulesCore.ProjectTo{AbstractArray, NamedTuple{(:element, :axes), Tuple{ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}}, ChainRulesCore.ProjectTo{LowerTriangular, NamedTuple{(:parent,), Tuple{ChainRulesCore.ProjectTo{AbstractArray, NamedTuple{(:element, :axes), Tuple{ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}}}}}}}}})(Δ::Matrix{Float64})
      @ Zygote ~/.julia/packages/Zygote/hLzJT/src/compiler/interface2.jl:0
   [21] Pullback
      @ ~/Documents/projects/julia/AbstractGPs.jl/src/finite_gp_projection.jl:239 [inlined]
   [22] Pullback
      @ ~/Documents/projects/julia/AbstractGPs.jl/test/finite_gp_projection.jl:112 [inlined]
   [23] (::Zygote.Pullback{Tuple{var"#19#31"{Float64}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(rand), MersenneTwister, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}}, Tuple{Zygote.Pullback{Tuple{typeof(vec), Matrix{Float64}}, Tuple{Zygote.var"#2584#back#435"{Zygote.var"#431#433"{Matrix{Float64}, Tuple{Int64}}}, Zygote.ZBack{ChainRules.var"#length_pullback#746"}}}, Zygote.Pullback{Tuple{typeof(rand), MersenneTwister, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Int64}, Tuple{Zygote.ZBack{ChainRules.var"#length_pullback#746"}, Zygote.Pullback{Tuple{typeof(Base.Broadcast.materialize), Matrix{Float64}}, Tuple{}}, Zygote.ZBack{ChainRules.var"#promote_type_pullback#839"{Tuple{DataType, DataType}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Int64}}, Zygote.var"#back#178"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}}, Zygote.Pullback{Tuple{typeof(eltype), Cholesky{Float64, Matrix{Float64}}}, Tuple{Zygote.ZBack{ChainRules.var"#eltype_pullback#384"}, Zygote.ZBack{ChainRules.var"#typeof_pullback#45"}}}, Zygote.var"#3326#back#767"{Zygote.var"#763#765"{Tuple{Vector{Float64}, Matrix{Float64}}}}, Zygote.Pullback{Tuple{typeof(mean_and_cov), AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}}, Tuple{Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:Σy, Zygote.Context{false}, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Int64}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:x, Zygote.Context{false}, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Vector{Float64}}}, Zygote.var"#1946#back#155"{typeof(identity)}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:f, Zygote.Context{false}, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}}}, Zygote.var"#back#178"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Matrix{Float64}}}, Zygote.var"#3193#back#700"{Zygote.var"#698#699"}, Zygote.var"#back#179"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Matrix{Float64}}}}, Zygote.Pullback{Tuple{typeof(mean_and_cov), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.var"#1946#back#155"{typeof(identity)}, Zygote.Pullback{Tuple{typeof(cov), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(kernelmatrix), SqExponentialKernel{Distances.Euclidean}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(KernelFunctions.pairwise), Distances.SqEuclidean, Vector{Float64}}, Tuple{Zygote.var"#49#back#1057"{Zygote.var"#1058#1059"{Transpose{Float64, Matrix{Float64}}, typeof(transpose)}}, Zygote.Pullback{Tuple{Type{NamedTuple{(:dims,)}}, Tuple{Int64}}, Tuple{Zygote.Pullback{Tuple{Type{NamedTuple{(:dims,), Tuple{Int64}}}, Tuple{Int64}}, Tuple{Zygote.var"#2110#back#228"{Zygote.Jnew{NamedTuple{(:dims,), Tuple{Int64}}, Nothing, true}}}}}}, Zygote.var"#2584#back#435"{Zygote.var"#431#433"{Vector{Float64}, Tuple{Colon, Int64}}}, Zygote.var"#1946#back#155"{typeof(identity)}}}, Zygote.var"#2645#back#478"{Zygote.var"#map_back#474"{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, 1, Tuple{Matrix{Float64}}, Tuple{Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}, Matrix{Tuple{Float64, Zygote.Pullback{Tuple{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, Float64}, Tuple{Zygote.Pullback{Tuple{typeof(KernelFunctions.kappa), SqExponentialKernel{Distances.Euclidean}, Float64}, Tuple{Zygote.ZBack{ChainRules.var"#exp_pullback#1319"{Float64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}, Zygote.ZBack{ChainRules.var"#/_pullback#1335"{Float64, Float64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}, Zygote.ZBack{ChainRules.var"#-_pullback#1343"{Int64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:κ, Zygote.Context{false}, KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, SqExponentialKernel{Distances.Euclidean}}}}}}}}}, Zygote.Pullback{Tuple{typeof(KernelFunctions.metric), SqExponentialKernel{Distances.Euclidean}}, Tuple{Zygote.Pullback{Tuple{Type{Distances.SqEuclidean}}, Tuple{}}}}, Zygote.var"#2100#back#226"{Zygote.Jnew{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, Nothing, false}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:kernel, Zygote.Context{false}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, SqExponentialKernel{Distances.Euclidean}}}}}, Zygote.Pullback{Tuple{typeof(mean), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(AbstractGPs._map_meanfunction), CustomMean{typeof(sin)}, Vector{Float64}}, Tuple{Zygote.var"#2645#back#478"{Zygote.var"#map_back#474"{typeof(sin), 1, Tuple{Vector{Float64}}, Tuple{Tuple{Base.OneTo{Int64}}}, Vector{Tuple{Float64, Zygote.ZBack{ChainRules.var"#sin_pullback#1305"{Float64}}}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:f, Zygote.Context{false}, CustomMean{typeof(sin)}, typeof(sin)}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:mean, Zygote.Context{false}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, CustomMean{typeof(sin)}}}}}}}}}, Zygote.ZBack{ChainRules.var"#adjoint_mat_pullback#2059"{ChainRulesCore.ProjectTo{UpperTriangular, NamedTuple{(:parent,), Tuple{ChainRulesCore.ProjectTo{AbstractArray, NamedTuple{(:element, :axes), Tuple{ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}}}}}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Matrix{Float64}}}, Zygote.Pullback{Tuple{typeof(AbstractGPs._symmetric), Matrix{Float64}}, Tuple{Zygote.var"#2963#back#607"{Zygote.var"#back#606"{Symmetric{Float64, Matrix{Float64}}}}}}, Zygote.var"#3097#back#668"{Zygote.var"#666#667"{Cholesky{Float64, Matrix{Float64}}}}, Zygote.Pullback{Tuple{typeof(eltype), Vector{Float64}}, Tuple{Zygote.ZBack{ChainRules.var"#eltype_pullback#384"}, Zygote.ZBack{ChainRules.var"#typeof_pullback#45"}}}, Zygote.Pullback{Tuple{typeof(cholesky), Symmetric{Float64, Matrix{Float64}}}, Tuple{Zygote.ZBack{ChainRules.var"#cholesky_HermOrSym_pullback#2131"{Symmetric{Float64, Matrix{Float64}}, Cholesky{Float64, Matrix{Float64}}}}, Zygote.Pullback{Tuple{Type{NoPivot}}, Tuple{}}}}, Zygote.var"#back#179"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Matrix{Float64}}}}, Zygote.ZBack{ChainRules.var"#randn_pullback#2206"{Tuple{MersenneTwister, DataType, Int64, Int64}}}, Zygote.ZBack{ChainRules.var"#times_pullback#1479"{LowerTriangular{Float64, Adjoint{Float64, Matrix{Float64}}}, Matrix{Float64}, ChainRulesCore.ProjectTo{AbstractArray, NamedTuple{(:element, :axes), Tuple{ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}}, ChainRulesCore.ProjectTo{LowerTriangular, NamedTuple{(:parent,), Tuple{ChainRulesCore.ProjectTo{AbstractArray, NamedTuple{(:element, :axes), Tuple{ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}}}}}}}}}}}, Zygote.Pullback{Tuple{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Float64}, Tuple{Zygote.var"#2066#back#210"{Zygote.var"#208#209"{Tuple{Tuple{Nothing}, Tuple{Nothing, Nothing}}, Zygote.Pullback{Tuple{Type{AbstractGPs.FiniteGP}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Float64}, Tuple{Zygote.ZBack{ChainRules.var"#length_pullback#746"}, Zygote.Pullback{Tuple{Type{AbstractGPs.FiniteGP}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}, Tuple{Zygote.ZBack{typeof(ChainRules._Diagonal_pullback)}, Zygote.Pullback{Tuple{Type{AbstractGPs.FiniteGP}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Tuple{Zygote.Pullback{Tuple{Type{AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Tuple{Zygote.Pullback{Tuple{typeof(convert), Type{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}}, Tuple{}}, Zygote.var"#2100#back#226"{Zygote.Jnew{AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Nothing, false}}, Zygote.Pullback{Tuple{typeof(convert), Type{Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Any}, Zygote.Pullback{Tuple{typeof(convert), Type{Vector{Float64}}, Vector{Float64}}, Any}}}}}}}, Zygote.var"#2391#back#365"{Zygote.var"#back#364"}}}}}, Zygote.var"#1946#back#155"{typeof(identity)}}}, Zygote.Pullback{Tuple{Type{SqExponentialKernel}}, Tuple{}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{Symbol("#939#Σy"), Zygote.Context{false}, var"#19#31"{Float64}, Float64}}, Zygote.ZBack{ChainRules.var"#AbstractRNG_pullback#2155"{Tuple{Int64}}}, Zygote.Pullback{Tuple{Type{GP}, typeof(sin), SqExponentialKernel{Distances.Euclidean}}, Tuple{Zygote.Pullback{Tuple{Type{GP}, CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Tuple{Zygote.Pullback{Tuple{Type{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}}, CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Tuple{Zygote.Pullback{Tuple{typeof(convert), Type{CustomMean{typeof(sin)}}, CustomMean{typeof(sin)}}, Tuple{}}, Zygote.var"#2100#back#226"{Zygote.Jnew{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Nothing, false}}, Zygote.Pullback{Tuple{typeof(convert), Type{SqExponentialKernel{Distances.Euclidean}}, SqExponentialKernel{Distances.Euclidean}}, Tuple{}}}}}}, Zygote.Pullback{Tuple{Type{CustomMean}, typeof(sin)}, Tuple{Zygote.Pullback{Tuple{Type{CustomMean{typeof(sin)}}, typeof(sin)}, Tuple{Zygote.var"#2100#back#226"{Zygote.Jnew{CustomMean{typeof(sin)}, Nothing, false}}, Zygote.Pullback{Tuple{typeof(convert), Type{typeof(sin)}, typeof(sin)}, Tuple{}}}}}}}}}})(Δ::Vector{Float64})
      @ Zygote ~/.julia/packages/Zygote/hLzJT/src/compiler/interface2.jl:0
   [24] (::Zygote.var"#60#61"{Zygote.Pullback{Tuple{var"#19#31"{Float64}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(rand), MersenneTwister, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}}, Tuple{Zygote.Pullback{Tuple{typeof(vec), Matrix{Float64}}, Tuple{Zygote.var"#2584#back#435"{Zygote.var"#431#433"{Matrix{Float64}, Tuple{Int64}}}, Zygote.ZBack{ChainRules.var"#length_pullback#746"}}}, Zygote.Pullback{Tuple{typeof(rand), MersenneTwister, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Int64}, Tuple{Zygote.ZBack{ChainRules.var"#length_pullback#746"}, Zygote.Pullback{Tuple{typeof(Base.Broadcast.materialize), Matrix{Float64}}, Tuple{}}, Zygote.ZBack{ChainRules.var"#promote_type_pullback#839"{Tuple{DataType, DataType}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Int64}}, Zygote.var"#back#178"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}}, Zygote.Pullback{Tuple{typeof(eltype), Cholesky{Float64, Matrix{Float64}}}, Tuple{Zygote.ZBack{ChainRules.var"#eltype_pullback#384"}, Zygote.ZBack{ChainRules.var"#typeof_pullback#45"}}}, Zygote.var"#3326#back#767"{Zygote.var"#763#765"{Tuple{Vector{Float64}, Matrix{Float64}}}}, Zygote.Pullback{Tuple{typeof(mean_and_cov), AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}}, Tuple{Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:Σy, Zygote.Context{false}, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Int64}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:x, Zygote.Context{false}, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Vector{Float64}}}, Zygote.var"#1946#back#155"{typeof(identity)}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:f, Zygote.Context{false}, AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}}}, Zygote.var"#back#178"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Vector{Float64}}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Matrix{Float64}}}, Zygote.var"#3193#back#700"{Zygote.var"#698#699"}, Zygote.var"#back#179"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Matrix{Float64}}}}, Zygote.Pullback{Tuple{typeof(mean_and_cov), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.var"#1946#back#155"{typeof(identity)}, Zygote.Pullback{Tuple{typeof(cov), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(kernelmatrix), SqExponentialKernel{Distances.Euclidean}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(KernelFunctions.pairwise), Distances.SqEuclidean, Vector{Float64}}, Tuple{Zygote.var"#49#back#1057"{Zygote.var"#1058#1059"{Transpose{Float64, Matrix{Float64}}, typeof(transpose)}}, Zygote.Pullback{Tuple{Type{NamedTuple{(:dims,)}}, Tuple{Int64}}, Tuple{Zygote.Pullback{Tuple{Type{NamedTuple{(:dims,), Tuple{Int64}}}, Tuple{Int64}}, Tuple{Zygote.var"#2110#back#228"{Zygote.Jnew{NamedTuple{(:dims,), Tuple{Int64}}, Nothing, true}}}}}}, Zygote.var"#2584#back#435"{Zygote.var"#431#433"{Vector{Float64}, Tuple{Colon, Int64}}}, Zygote.var"#1946#back#155"{typeof(identity)}}}, Zygote.var"#2645#back#478"{Zygote.var"#map_back#474"{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, 1, Tuple{Matrix{Float64}}, Tuple{Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}, Matrix{Tuple{Float64, Zygote.Pullback{Tuple{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, Float64}, Tuple{Zygote.Pullback{Tuple{typeof(KernelFunctions.kappa), SqExponentialKernel{Distances.Euclidean}, Float64}, Tuple{Zygote.ZBack{ChainRules.var"#exp_pullback#1319"{Float64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}, Zygote.ZBack{ChainRules.var"#/_pullback#1335"{Float64, Float64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}, Zygote.ZBack{ChainRules.var"#-_pullback#1343"{Int64, ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:κ, Zygote.Context{false}, KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, SqExponentialKernel{Distances.Euclidean}}}}}}}}}, Zygote.Pullback{Tuple{typeof(KernelFunctions.metric), SqExponentialKernel{Distances.Euclidean}}, Tuple{Zygote.Pullback{Tuple{Type{Distances.SqEuclidean}}, Tuple{}}}}, Zygote.var"#2100#back#226"{Zygote.Jnew{KernelFunctions.var"#86#87"{SqExponentialKernel{Distances.Euclidean}}, Nothing, false}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:kernel, Zygote.Context{false}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, SqExponentialKernel{Distances.Euclidean}}}}}, Zygote.Pullback{Tuple{typeof(mean), GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}}, Tuple{Zygote.Pullback{Tuple{typeof(AbstractGPs._map_meanfunction), CustomMean{typeof(sin)}, Vector{Float64}}, Tuple{Zygote.var"#2645#back#478"{Zygote.var"#map_back#474"{typeof(sin), 1, Tuple{Vector{Float64}}, Tuple{Tuple{Base.OneTo{Int64}}}, Vector{Tuple{Float64, Zygote.ZBack{ChainRules.var"#sin_pullback#1305"{Float64}}}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:f, Zygote.Context{false}, CustomMean{typeof(sin)}, typeof(sin)}}}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{:mean, Zygote.Context{false}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, CustomMean{typeof(sin)}}}}}}}}}, Zygote.ZBack{ChainRules.var"#adjoint_mat_pullback#2059"{ChainRulesCore.ProjectTo{UpperTriangular, NamedTuple{(:parent,), Tuple{ChainRulesCore.ProjectTo{AbstractArray, NamedTuple{(:element, :axes), Tuple{ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}}}}}}}, Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 1, Zygote.Context{false}, Matrix{Float64}}}, Zygote.Pullback{Tuple{typeof(AbstractGPs._symmetric), Matrix{Float64}}, Tuple{Zygote.var"#2963#back#607"{Zygote.var"#back#606"{Symmetric{Float64, Matrix{Float64}}}}}}, Zygote.var"#3097#back#668"{Zygote.var"#666#667"{Cholesky{Float64, Matrix{Float64}}}}, Zygote.Pullback{Tuple{typeof(eltype), Vector{Float64}}, Tuple{Zygote.ZBack{ChainRules.var"#eltype_pullback#384"}, Zygote.ZBack{ChainRules.var"#typeof_pullback#45"}}}, Zygote.Pullback{Tuple{typeof(cholesky), Symmetric{Float64, Matrix{Float64}}}, Tuple{Zygote.ZBack{ChainRules.var"#cholesky_HermOrSym_pullback#2131"{Symmetric{Float64, Matrix{Float64}}, Cholesky{Float64, Matrix{Float64}}}}, Zygote.Pullback{Tuple{Type{NoPivot}}, Tuple{}}}}, Zygote.var"#back#179"{Zygote.var"#1958#back#160"{Zygote.var"#back#158"{2, 2, Zygote.Context{false}, Matrix{Float64}}}}, Zygote.ZBack{ChainRules.var"#randn_pullback#2206"{Tuple{MersenneTwister, DataType, Int64, Int64}}}, Zygote.ZBack{ChainRules.var"#times_pullback#1479"{LowerTriangular{Float64, Adjoint{Float64, Matrix{Float64}}}, Matrix{Float64}, ChainRulesCore.ProjectTo{AbstractArray, NamedTuple{(:element, :axes), Tuple{ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}}, ChainRulesCore.ProjectTo{LowerTriangular, NamedTuple{(:parent,), Tuple{ChainRulesCore.ProjectTo{AbstractArray, NamedTuple{(:element, :axes), Tuple{ChainRulesCore.ProjectTo{Float64, NamedTuple{(), Tuple{}}}, Tuple{Base.OneTo{Int64}, Base.OneTo{Int64}}}}}}}}}}}}}}, Zygote.Pullback{Tuple{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Float64}, Tuple{Zygote.var"#2066#back#210"{Zygote.var"#208#209"{Tuple{Tuple{Nothing}, Tuple{Nothing, Nothing}}, Zygote.Pullback{Tuple{Type{AbstractGPs.FiniteGP}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Float64}, Tuple{Zygote.ZBack{ChainRules.var"#length_pullback#746"}, Zygote.Pullback{Tuple{Type{AbstractGPs.FiniteGP}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}, Tuple{Zygote.ZBack{typeof(ChainRules._Diagonal_pullback)}, Zygote.Pullback{Tuple{Type{AbstractGPs.FiniteGP}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Tuple{Zygote.Pullback{Tuple{Type{AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Tuple{Zygote.Pullback{Tuple{typeof(convert), Type{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}}, GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}}, Tuple{}}, Zygote.var"#2100#back#226"{Zygote.Jnew{AbstractGPs.FiniteGP{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Vector{Float64}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Nothing, false}}, Zygote.Pullback{Tuple{typeof(convert), Type{Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Diagonal{Float64, Fill{Float64, 1, Tuple{Base.OneTo{Int64}}}}}, Any}, Zygote.Pullback{Tuple{typeof(convert), Type{Vector{Float64}}, Vector{Float64}}, Any}}}}}}}, Zygote.var"#2391#back#365"{Zygote.var"#back#364"}}}}}, Zygote.var"#1946#back#155"{typeof(identity)}}}, Zygote.Pullback{Tuple{Type{SqExponentialKernel}}, Tuple{}}, Zygote.var"#2077#back#218"{Zygote.var"#back#217"{Symbol("#939#Σy"), Zygote.Context{false}, var"#19#31"{Float64}, Float64}}, Zygote.ZBack{ChainRules.var"#AbstractRNG_pullback#2155"{Tuple{Int64}}}, Zygote.Pullback{Tuple{Type{GP}, typeof(sin), SqExponentialKernel{Distances.Euclidean}}, Tuple{Zygote.Pullback{Tuple{Type{GP}, CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Tuple{Zygote.Pullback{Tuple{Type{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}}, CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Tuple{Zygote.Pullback{Tuple{typeof(convert), Type{CustomMean{typeof(sin)}}, CustomMean{typeof(sin)}}, Tuple{}}, Zygote.var"#2100#back#226"{Zygote.Jnew{GP{CustomMean{typeof(sin)}, SqExponentialKernel{Distances.Euclidean}}, Nothing, false}}, Zygote.Pullback{Tuple{typeof(convert), Type{SqExponentialKernel{Distances.Euclidean}}, SqExponentialKernel{Distances.Euclidean}}, Tuple{}}}}}}, Zygote.Pullback{Tuple{Type{CustomMean}, typeof(sin)}, Tuple{Zygote.Pullback{Tuple{Type{CustomMean{typeof(sin)}}, typeof(sin)}, Tuple{Zygote.var"#2100#back#226"{Zygote.Jnew{CustomMean{typeof(sin)}, Nothing, false}}, Zygote.Pullback{Tuple{typeof(convert), Type{typeof(sin)}, typeof(sin)}, Tuple{}}}}}}}}}}})(Δ::Vector{Float64})
      @ Zygote ~/.julia/packages/Zygote/hLzJT/src/compiler/interface.jl:45
   [25] adjoint_test(f::Function, ȳ::Vector{Float64}, x::Vector{Float64}; rtol::Float64, atol::Float64, fdm::FiniteDifferences.AdaptedFiniteDifferenceMethod{5, 1, FiniteDifferences.UnadaptedFiniteDifferenceMethod{7, 5}}, print_results::Bool)
      @ Main ~/Documents/projects/julia/AbstractGPs.jl/test/test_util.jl:59
   [26] macro expansion
      @ ~/Documents/projects/julia/AbstractGPs.jl/test/finite_gp_projection.jl:111 [inlined]
   [27] macro expansion
      @ ~/.julia/juliaup/julia-1.8.5+0.x64.linux.gnu/share/julia/stdlib/v1.8/Test/src/Test.jl:1363 [inlined]
   [28] macro expansion
      @ ~/Documents/projects/julia/AbstractGPs.jl/test/finite_gp_projection.jl:106 [inlined]
   [29] macro expansion
      @ ~/.julia/juliaup/julia-1.8.5+0.x64.linux.gnu/share/julia/stdlib/v1.8/Test/src/Test.jl:1363 [inlined]
   [30] top-level scope
      @ ~/Documents/projects/julia/AbstractGPs.jl/test/finite_gp_projection.jl:9
   [31] include(fname::String)
      @ Base.MainInclude ./client.jl:476
   [32] macro expansion
      @ ~/Documents/projects/julia/AbstractGPs.jl/test/runtests.jl:56 [inlined]
   [33] macro expansion
      @ ~/.julia/juliaup/julia-1.8.5+0.x64.linux.gnu/share/julia/stdlib/v1.8/Test/src/Test.jl:1363 [inlined]
   [34] macro expansion
      @ ~/Documents/projects/julia/AbstractGPs.jl/test/runtests.jl:55 [inlined]
   [35] macro expansion
      @ ~/.julia/juliaup/julia-1.8.5+0.x64.linux.gnu/share/julia/stdlib/v1.8/Test/src/Test.jl:1363 [inlined]
   [36] top-level scope
      @ ~/Documents/projects/julia/AbstractGPs.jl/test/runtests.jl:46
   [37] include(fname::String)
      @ Base.MainInclude ./client.jl:476
   [38] top-level scope
      @ none:6
   [39] eval
      @ ./boot.jl:368 [inlined]
   [40] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:276
   [41] _start()
      @ Base ./client.jl:522
@devmotion
Copy link
Member

Based on the stacktrace and the _tryreverse calls I assume it is caused by FluxML/Zygote.jl#1376.

@simsurace
Copy link
Member Author

Yeah apparently matrices were not thought of:

julia> using LinearAlgebra
julia> reverse(UpperTriangular(rand(3, 3)))
ERROR: ArgumentError: cannot set index in the lower triangular part (3, 2) of an UpperTriangular matrix to a nonzero value (0.5468753916792359)
Stacktrace:
  [1] setindex!
    @ ~/.julia/juliaup/julia-1.8.5+0.x64.linux.gnu/share/julia/stdlib/v1.8/LinearAlgebra/src/triangular.jl:233 [inlined]
  [2] _setindex!
    @ ./abstractarray.jl:1374 [inlined]
  [3] setindex!
    @ ./abstractarray.jl:1344 [inlined]
  [4] _reverse!(A::UpperTriangular{Float64, Matrix{Float64}}, dims::Tuple{Int64, Int64})
    @ Base ./arraymath.jl:89
  [5] _reverse!
    @ ./arraymath.jl:71 [inlined]
  [6] reverse!(A::UpperTriangular{Float64, Matrix{Float64}}; dims::Function)
    @ Base ./arraymath.jl:70
  [7] _reverse(A::UpperTriangular{Float64, Matrix{Float64}}, dims::Function)
    @ Base ./arraymath.jl:60
  [8] #reverse#247
    @ ./arraymath.jl:59 [inlined]
  [9] reverse(A::UpperTriangular{Float64, Matrix{Float64}})
    @ Base ./arraymath.jl:59
 [10] top-level scope
    @ REPL[2]:1

@willtebbutt
Copy link
Member

@simsurace could you please open an issue on Zygote about this, request that the changes be reverted, and a new patch release tagged?

@simsurace
Copy link
Member Author

Will be fixed upstream by FluxML/Zygote.jl#1396

@devmotion
Copy link
Member

Should be fixed now?

@simsurace
Copy link
Member Author

Fixed by Zygote 0.6.58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants