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
Currently, if someone mistakenly uses Zero() instead of DoesNotExist() inside the rrule
functionpartly_dne(a, i)
return a[i]
endfunction ChainRulesCore.rrule(::typeof(partly_dne), a, i)
y =partly_dne(a, i)
functionpartly_dne_pullback(ȳ)
grad =zeros(size(a))
grad[i] = ȳ
return (NO_FIELDS, grad, Zero())
endreturn y, partly_dne_pullback
end
The error message isn't very clear
julia>rrule_test(partly_dne, rand(), (rand(4), rand(4)), (1, nothing))
Test Failed at /Users/mzgubic/Projects/ChainRules.jl/dev/ChainRulesTestUtils/src/testers.jl:295
Expression: x̄_ad isa DoesNotExist
Evaluated:Zero() isa DoesNotExist
ERROR: There was an error during testing