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

Use nansafe branch for ForwardDiff #165

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9"
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
Kronecker = "2c470bb0-bcc8-11e8-3dad-c9649493f05e"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Expand All @@ -18,7 +18,6 @@ AxisArrays = "0.4.3"
Distances = "0.9"
FiniteDifferences = "0.10.8"
Flux = "0.10, 0.11"
ForwardDiff = "0.10"
Kronecker = "0.4"
PDMats = "0.9, 0.10"
ReverseDiff = "1.2"
Expand Down
3 changes: 1 addition & 2 deletions test/basekernels/fbm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
@test kernelmatrix(k, x1*ones(1,1), x2*ones(1,1))[1] ≈ k(x1, x2) atol=1e-5

@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)
test_params(k, ([h],))
end
4 changes: 2 additions & 2 deletions test/basekernels/gabor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
@test k.ell ≈ 1.0 atol=1e-5
@test k.p ≈ 1.0 atol=1e-5
@test repr(k) == "Gabor Kernel (ell = 1.0, p = 1.0)"
test_ADs(x -> GaborKernel(ell = x[1], p = x[2]), [ell, p], ADs = [:Zygote])
# Tests are also failing randomly for ForwardDiff and ReverseDiff but randomly
test_ADs(x -> GaborKernel(ell = x[1], p = x[2]), [ell, p], ADs = [:Zygote, :ForwardDiff])
@test_broken "Tests are also failing randomly for ReverseDiff but randomly"
end
4 changes: 2 additions & 2 deletions test/basekernels/wiener.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
@test kernelmatrix(k2, x1*ones(1,1), x2*ones(1,1))[1] ≈ k2(x1, x2) atol=1e-5
@test kernelmatrix(k3, x1*ones(1,1), x2*ones(1,1))[1] ≈ k3(x1, x2) atol=1e-5

# test_ADs(()->WienerKernel(i=1))
@test_broken "No tests passing"
test_ADs(()->WienerKernel(i=1), ADs=[:ForwardDiff])
@test_broken "Zygote and ReverseDiff fail"
end
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ using Random
using SpecialFunctions
using Test
using Flux

using Pkg
Pkg.add(PackageSpec(; url="https://github.com/JuliaDiff/ForwardDiff.jl", rev="nansafe"))

import Zygote, ForwardDiff, ReverseDiff, FiniteDifferences

using KernelFunctions: SimpleKernel, metric, kappa, ColVecs, RowVecs
Expand Down