Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't test FBM on Zygote #342

Merged
merged 8 commits into from
Jul 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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