Skip to content

Commit b24c5b9

Browse files
willtebbuttgithub-actions[bot]st--
authored
Don't test FBM on Zygote (#342)
* Make failing tests * Document failures better * Fix style suggestion Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix style suggestion Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Define f Co-authored-by: st-- <[email protected]> * Style Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Only run breaking test on 1.6 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: st-- <[email protected]>
1 parent fbce558 commit b24c5b9

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

test/basekernels/fbm.jl

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,19 @@
1313

1414
test_interface(k)
1515
@test repr(k) == "Fractional Brownian Motion Kernel (h = $(h))"
16-
test_ADs(FBMKernel; ADs=[:ReverseDiff, :Zygote])
17-
@test_broken "Tests failing for kernelmatrix(k, x) for ForwardDiff"
16+
test_ADs(FBMKernel; ADs=[:ReverseDiff])
17+
18+
# Tests failing for ForwardDiff and [email protected] (obtained with Julia > 1.3).
19+
# Related to: https://github.com/FluxML/Zygote.jl/issues/1036
20+
@test_broken !isinf(ForwardDiff.gradient(x -> x[1]^x[2], [0.0, 0.9])[1])
21+
if VERSION >= v"1.4.0"
22+
f(x, y) = x^y
23+
@test_broken !isinf(
24+
Zygote.gradient((x, y) -> sum(f.(x, y)), zeros(1), fill(0.9, 1))[1][1]
25+
)
26+
else
27+
test_ADs(FBMKernel; ADs=[:Zygote])
28+
end
29+
1830
test_params(k, ([h],))
1931
end

0 commit comments

Comments
 (0)