Skip to content

Commit

Permalink
remove rrules and ChainRulesCore
Browse files Browse the repository at this point in the history
  • Loading branch information
st-- committed Apr 9, 2022
1 parent f1df8b5 commit 145091d
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ authors = ["JuliaGaussianProcesses Team"]
version = "0.5.12"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
IrrationalConstants = "92d709cd-6900-40b7-9082-c6be49f344b6"
Expand All @@ -19,7 +18,6 @@ StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
ChainRulesCore = "1"
Distributions = "0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25"
FillArrays = "0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13"
IrrationalConstants = "0.1"
Expand Down
1 change: 0 additions & 1 deletion src/AbstractGPs.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module AbstractGPs

using ChainRulesCore
using Distributions
using FillArrays
using LinearAlgebra
Expand Down
10 changes: 0 additions & 10 deletions src/mean_function.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ This is an AbstractGPs-internal workaround for AD issues; ideally we would just
"""
_map_meanfunction(::ZeroMean{T}, x::AbstractVector) where {T} = Zeros{T}(length(x))

function ChainRulesCore.rrule(::typeof(_map_meanfunction), m::ZeroMean, x::AbstractVector)
map_ZeroMean_pullback(Δ) = (NoTangent(), ZeroTangent(), ZeroTangent())
return _map_meanfunction(m, x), map_ZeroMean_pullback
end

ZeroMean() = ZeroMean{Float64}()

"""
Expand All @@ -30,11 +25,6 @@ end

_map_meanfunction(m::ConstMean, x::AbstractVector) = Fill(m.c, length(x))

function ChainRulesCore.rrule(::typeof(_map_meanfunction), m::ConstMean, x::AbstractVector)
map_ConstMean_pullback(Δ) = (NoTangent(), Tangent{ConstMean}(; c=sum(Δ)), ZeroTangent())
return _map_meanfunction(m, x), map_ConstMean_pullback
end

"""
CustomMean{Tf} <: MeanFunction
Expand Down
2 changes: 0 additions & 2 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
Expand All @@ -14,7 +13,6 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
ChainRulesCore = "1"
Distributions = "0.19, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25"
Documenter = "0.24, 0.25, 0.26, 0.27"
FillArrays = "0.11, 0.12, 0.13"
Expand Down
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ using AbstractGPs:
TestUtils

using Documenter
using ChainRulesCore
using Distributions: MvNormal, PDMat, loglikelihood, Distributions
using FillArrays
using FiniteDifferences
Expand Down

0 comments on commit 145091d

Please sign in to comment.