File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 11name = " ChainRulesTestUtils"
22uuid = " cdddcdb0-9152-4a09-a978-84456f9df70a"
3- version = " 1.7.0 "
3+ version = " 1.7.1 "
44
55[deps ]
66ChainRulesCore = " d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ function test_rrule(
227227 end
228228
229229 if check_thunked_output_tangent
230- test_approx (ad_cotangents, pullback (@thunk (ȳ)), " pulling back a thunk:" )
230+ test_approx (ad_cotangents, pullback (@thunk (ȳ)), " pulling back a thunk:" ; isapprox_kwargs ... )
231231 check_inferred && _test_inferred (pullback, @thunk (ȳ))
232232 end
233233 end # top-level testset
Original file line number Diff line number Diff line change 683683 function ChainRulesCore. rrule (:: typeof (my_id), x)
684684 my_id_pb (ȳ) = (NoTangent (), ȳ)
685685 function my_id_pb (ȳ:: AbstractThunk )
686- precision = rand () > 0.5 ? Float64 : Float32
686+ # We use a condition that always evaluates to true to avoid issues with tolerances
687+ # (see https://github.com/JuliaDiff/ChainRulesTestUtils.jl/pull/247)
688+ # The function is type unstable for `Float64` inputs nevertheless
689+ precision = rand () >= 0.0 ? Float64 : Float32
687690 return (NoTangent (), precision (unthunk (ȳ)))
688691 end
689692 return x, my_id_pb
You can’t perform that action at this time.
0 commit comments