Open
Description
I'm pretty confident this worked in September, but have no idea whether changes here or in ChainRules broke it: Edit -- the change is JuliaDiff/ChainRulesCore.jl#495, discussed there.
julia> Diffractor.gradient(cbrt, 1.23)
(0.29036348772107673,)
julia> Diffractor.gradient(identity∘cbrt, 1.23)
ERROR: ArgumentError: Tangent for the primal Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}} should be backed by a AbstractDict type, not by NamedTuple{(:data,), Tuple{ChainRulesCore.ZeroTangent}}.
Stacktrace:
[1] _backing_error(P::Type, G::Type, E::Type)
@ ChainRulesCore ~/.julia/packages/ChainRulesCore/qzYOG/src/tangent_types/tangent.jl:62
[2] ChainRulesCore.Tangent{Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, NamedTuple{(:data,), Tuple{ChainRulesCore.ZeroTangent}}}(backing::NamedTuple{(:data,), Tuple{ChainRulesCore.ZeroTangent}})
@ ChainRulesCore ~/.julia/packages/ChainRulesCore/qzYOG/src/tangent_types/tangent.jl:33
[3] (::Diffractor.var"#162#164"{Symbol, DataType})(Δ::ChainRulesCore.ZeroTangent)
@ Diffractor ~/.julia/packages/Diffractor/HYuxt/src/stage1/generated.jl:308
[4] (::Diffractor.EvenOddOdd{1, 1, Diffractor.var"#162#164"{Symbol, DataType}, Diffractor.var"#163#165"{Symbol}})(Δ::ChainRulesCore.ZeroTangent)
@ Diffractor ~/.julia/packages/Diffractor/HYuxt/src/stage1/generated.jl:288
[5] ∂⃖¹₁merge
@ ./none:1
[6] ∂⃖¹₁
@ ./none:1
[7] (::Diffractor.ApplyOdd{1, 1})(Δ::Float64)
@ Diffractor ~/.julia/packages/Diffractor/HYuxt/src/stage1/generated.jl:371
[8] ∂⃖¹₁ComposedFunction
@ ./none:1
[9] (::Diffractor.∇{ComposedFunction{typeof(identity), typeof(cbrt)}})(args::Float64)
@ Diffractor ~/.julia/packages/Diffractor/HYuxt/src/interface.jl:122
[10] Diffractor.∇(::Function, ::Float64)
@ Diffractor ~/.julia/packages/Diffractor/HYuxt/src/interface.jl:128
[11] top-level scope
@ REPL[3]:1
Metadata
Metadata
Assignees
Labels
No labels