Open mcabbott opened 2 years ago
BTW, if you disable that check with ChainRulesCore._backing_error(P,G,E) = nothing
, then it fails by generating a Tuple and a Tangent for the same gradient. This case was not addressed in https://github.com/JuliaDiff/Diffractor.jl/pull/88
Stacktrace:
[1] accum(a::Tangent{Tuple{typeof(identity), typeof(cbrt)}, Tuple{NoTangent, NoTangent}}, b::Tuple{NoTangent, ZeroTangent})
@ Diffractor ~/.julia/dev/Diffractor/src/runtime.jl:4
[2] (::Tuple{Diffractor.EvenOddOdd{1, 1, Diffractor.∂⃖getfield{2, 1}, Diffractor.var"#160#161"{Int64}}, ChainRules.var"#tail_pullback#1599"{Tuple{typeof(identity), typeof(cbrt)}}, Core.OpaqueClosure{Tuple{Any}, Tuple{ZeroTangent, Tuple{NoTangent}, Tuple{Any}, Tangent{Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, NamedTuple{(:data,), Tuple{ZeroTangent}}}}}, ChainRules.var"#identity_pullback#1221", Nothing})(Δ::Any)
@ Diffractor ./none:1
[3] (::Tuple{Core.OpaqueClosure{Tuple{Any}, Tuple{ZeroTangent, Union{NoTangent, Tangent{ComposedFunction{typeof(identity), typeof(cbrt)}}}}}, Core.OpaqueClosure{Tuple{Any}, Union{}}, Nothing})(Δ::Any)
@ Diffractor ./none:1
[4] (::Diffractor.ApplyOdd{1, 1})(Δ::Float64)
@ Diffractor ~/.julia/dev/Diffractor/src/stage1/generated.jl:373
[5] (::Tuple{Core.OpaqueClosure{Tuple{Any}, Tuple{ZeroTangent}}, Core.OpaqueClosure{Tuple{Any}, Tuple{ZeroTangent, Any}}, Diffractor.EvenOddOdd{1, 1, Diffractor.tuple_back{2}, Diffractor.var"#176#177"}, Diffractor.ApplyOdd{1, 1}, Nothing})(Δ::Any)
@ Diffractor ./none:1
[6] (::Diffractor.∇{ComposedFunction{typeof(identity), typeof(cbrt)}})(args::Float64)
I'm pretty confident this worked in September,
but have no idea whether changes here or in ChainRules broke it:Edit -- the change is https://github.com/JuliaDiff/ChainRulesCore.jl/pull/495, discussed there.