You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> ChainRulesTestUtils.test_approx(Tangent{Int}(; x=1), ZeroTangent())
ERROR: MethodError:test_approx(::Tangent{Int64, NamedTuple{(:x,), Tuple{Int64}}}, ::ZeroTangent) is ambiguous. Candidates:test_approx(x, ::AbstractZero) in ChainRulesTestUtils at /Users/me/.julia/packages/ChainRulesTestUtils/8dFTY/src/check_result.jl:34test_approx(actual::Tangent{P, T}, expected) where {T, P} in ChainRulesTestUtils at /Users/me/.julia/packages/ChainRulesTestUtils/8dFTY/src/check_result.jl:108
Possible fix, define
test_approx(::Tangent{P, T}, ::AbstractZero) where {T, P}
Stacktrace:
That's a made-up example, the real one gave:
Error During Test at /Users/me/.julia/packages/ChainRulesTestUtils/8dFTY/src/testers.jl:195
Got exception outside of a @test
MethodError: (::ChainRulesTestUtils.var"#test_approx##kw")(::NamedTuple{(:rtol, :atol), Tuple{Float64, Float64}}, ::typeof(test_approx), ::ChainRulesCore.NoTangent, ::ChainRulesCore.Tangent{Tuple{Float64, Float64, Float64}, Tuple{Float64, Float64, Float64}}) is ambiguous. Candidates:
(var"#s103"::ChainRulesTestUtils.var"#test_approx##kw")(::Any, ::typeof(test_approx), x, y::ChainRulesCore.Tangent) in ChainRulesTestUtils at /Users/me/.julia/packages/ChainRulesTestUtils/8dFTY/src/check_result.jl:124
(var"#s102"::ChainRulesTestUtils.var"#test_approx##kw")(::Any, ::typeof(test_approx), ::ChainRulesCore.AbstractZero, x) in ChainRulesTestUtils at /Users/me/.julia/packages/ChainRulesTestUtils/8dFTY/src/check_result.jl:33
Possible fix, define
(::ChainRulesTestUtils.var"#test_approx##kw")(::Any, ::typeof(test_approx), ::ChainRulesCore.AbstractZero, ::ChainRulesCore.Tangent)
That's a made-up example, the real one gave:
Real example: https://github.com/JuliaDiff/ChainRules.jl/pull/570/files#diff-14d216cb53721d9360bbbcc399d93fff67f2594bd388162abbbe82c59ad1ba9fR169
The text was updated successfully, but these errors were encountered: