Skip to content

Commit

Permalink
Don't test FBM on Zygote (#342)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Jul 20, 2021
1 parent fbce558 commit b24c5b9
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions test/basekernels/fbm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,19 @@

test_interface(k)
@test repr(k) == "Fractional Brownian Motion Kernel (h = $(h))"
test_ADs(FBMKernel; ADs=[:ReverseDiff, :Zygote])
@test_broken "Tests failing for kernelmatrix(k, x) for ForwardDiff"
test_ADs(FBMKernel; ADs=[:ReverseDiff])

# Tests failing for ForwardDiff and [email protected] (obtained with Julia > 1.3).
# Related to: https://github.com/FluxML/Zygote.jl/issues/1036
@test_broken !isinf(ForwardDiff.gradient(x -> x[1]^x[2], [0.0, 0.9])[1])
if VERSION >= v"1.4.0"
f(x, y) = x^y
@test_broken !isinf(
Zygote.gradient((x, y) -> sum(f.(x, y)), zeros(1), fill(0.9, 1))[1][1]
)
else
test_ADs(FBMKernel; ADs=[:Zygote])
end

test_params(k, ([h],))
end

0 comments on commit b24c5b9

Please sign in to comment.