@@ -136,17 +136,8 @@ function test_frule(
136
136
Ω = call_on_copy (primals... )
137
137
test_approx (Ω_ad, Ω; isapprox_kwargs... )
138
138
139
- # TODO : remove Nothing when https://github.com/JuliaDiff/ChainRulesTestUtils.jl/issues/113
140
- is_ignored = isa .(tangents, Union{Nothing,NoTangent})
141
- if any (tangents .== nothing )
142
- Base. depwarn (
143
- " test_frule(f, k ⊢ nothing) is deprecated, use " *
144
- " test_frule(f, k ⊢ NoTangent()) instead for non-differentiable ks" ,
145
- :test_frule ,
146
- )
147
- end
148
-
149
139
# Correctness testing via finite differencing.
140
+ is_ignored = isa .(tangents, NoTangent)
150
141
dΩ_fd = _make_jvp_call (fdm, call_on_copy, Ω, primals, tangents, is_ignored)
151
142
test_approx (dΩ_ad, dΩ_fd; isapprox_kwargs... )
152
143
@@ -254,22 +245,13 @@ function test_rrule(
254
245
)
255
246
256
247
# Correctness testing via finite differencing.
257
- # TODO : remove Nothing when https://github.com/JuliaDiff/ChainRulesTestUtils.jl/issues/113
258
- is_ignored = isa .(accum_cotangents, Union{Nothing, NoTangent})
259
- if any (accum_cotangents .== nothing )
260
- Base. depwarn (
261
- " test_rrule(f, k ⊢ nothing) is deprecated, use " *
262
- " test_rrule(f, k ⊢ NoTangent()) instead for non-differentiable ks" ,
263
- :test_rrule ,
264
- )
265
- end
266
-
248
+ is_ignored = isa .(accum_cotangents, NoTangent)
267
249
fd_cotangents = _make_j′vp_call (fdm, call, ȳ, primals, is_ignored)
268
250
269
251
for (accum_cotangent, ad_cotangent, fd_cotangent) in zip (
270
252
accum_cotangents, ad_cotangents, fd_cotangents
271
253
)
272
- if accum_cotangent isa Union{Nothing, NoTangent} # then we marked this argument as not differentiable # TODO remove once #113
254
+ if accum_cotangent isa NoTangent # then we marked this argument as not differentiable
273
255
@assert fd_cotangent === nothing # this is how `_make_j′vp_call` works
274
256
ad_cotangent isa ZeroTangent && error (
275
257
" The pullback in the rrule should use NoTangent()" *
0 commit comments