diff --git a/Project.toml b/Project.toml index ca3a4b26..6d7cc50b 100644 --- a/Project.toml +++ b/Project.toml @@ -4,6 +4,7 @@ authors = ["SciML"] version = "6.9.0" [deps] +ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" ExtendableSparse = "95c220a8-a1cf-11e9-0c77-dbfce5f500b3" GLM = "38e38edf-8417-5370-95a0-9cbb8c7f171a" @@ -16,6 +17,7 @@ Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [compat] Aqua = "0.8" +ChainRulesCore = "1.15" Cubature = "1.5" Distributions = "0.25.71" ExtendableSparse = "1" @@ -24,8 +26,8 @@ ForwardDiff = "0.10.19" GLM = "1.5" IterativeSolvers = "0.9" LinearAlgebra = "1.10" -PolyChaos = "0.2.5" Pkg = "1" +PolyChaos = "0.2.5" QuadGK = "2.4" QuasiMonteCarlo = "0.3.1" SafeTestsets = "0.1" diff --git a/src/Radials.jl b/src/Radials.jl index 9b0a0a13..9cff6bf4 100644 --- a/src/Radials.jl +++ b/src/Radials.jl @@ -106,7 +106,8 @@ function _construct_rbf_y_matrix(y, y_el, m) [i <= length(y) ? y[i][j] : zero(first(y_el)) for i in 1:m, j in 1:length(y_el)] end -using Zygote: @nograd, Buffer +using Zygote: Buffer +using ChainRulesCore: @non_differentiable function _make_combination(n, d, ix) exponents_combinations = [e @@ -118,8 +119,8 @@ function _make_combination(n, d, ix) return exponents_combinations[ix + 1] end # TODO: Is this correct? Do we ever want to differentiate w.r.t n, d, or ix? -# By using @nograd we force the gradient to be 1 for n, d, ix -@nograd _make_combination +# By using @non_differentiable we force the gradient to be 1 for n, d, ix +@non_differentiable _make_combination(n, d, ix) """ multivar_poly_basis(x, ix, d, n)