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

Minor changes towards GPU compatibility #236

Merged
merged 29 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
becacaa
return lazy Fill arrays for mean functions from #197
st-- Oct 28, 2021
c42402b
replace Diagonal(Fill(...)) with PDMats.ScalMat
st-- Oct 28, 2021
6cc507f
add tr_Cf_invΣy method for ScalMat & tests
st-- Oct 28, 2021
15143be
_cholesky for ScalMat and remove superfluous _symmetric() calls
st-- Oct 28, 2021
a95cf54
update deprecated call
st-- Oct 28, 2021
553d7ec
Merge branch 'master' into st/gpuprep
st-- Oct 28, 2021
8159deb
standard fallback for ScalMat
st-- Oct 28, 2021
236bdc1
Merge branch 'st/gpuprep' of github.com:JuliaGaussianProcesses/Abstra…
st-- Oct 28, 2021
aec60e2
update Manifests
st-- Oct 29, 2021
feba01e
Merge branch 'master' of github.com:JuliaGaussianProcesses/AbstractGP…
st-- Nov 2, 2021
4f5d112
Merge branch 'master' into st/gpuprep
st-- Nov 3, 2021
3339dce
Merge branch 'st/gpuprep' of github.com:JuliaGaussianProcesses/Abstra…
st-- Mar 30, 2022
48f9b23
Merge branch 'master' of github.com:JuliaGaussianProcesses/AbstractGP…
st-- Mar 30, 2022
30a20b5
revert change that is separated into #239
st-- Mar 30, 2022
694fd36
_symmetric(X::AbstractPDMat) = X
st-- Mar 30, 2022
d41a59b
restrict type parameter
st-- Mar 30, 2022
a0ae96d
restrict further
st-- Mar 30, 2022
03c46a5
Update src/finite_gp_projection.jl
st-- Mar 30, 2022
7127868
compat
st-- Mar 30, 2022
ab2c0a1
compat
st-- Mar 30, 2022
de926ce
Update src/sparse_approximations.jl
st-- Mar 30, 2022
fd075f2
Merge branch 'master' of github.com:JuliaGaussianProcesses/AbstractGP…
st-- Mar 30, 2022
2567571
Merge branch 'st/gpuprep' of github.com:JuliaGaussianProcesses/Abstra…
st-- Mar 30, 2022
569718c
version bump
st-- Mar 30, 2022
3576ab3
fix Manifest
st-- Mar 30, 2022
eeaee74
remove "breaking" change, someone else can handle this elsewhere
st-- Mar 30, 2022
ba04b9d
Merge branch 'master' into st/gpuprep
st-- Mar 30, 2022
9321393
update docs/Manifest
st-- Mar 30, 2022
9568b1a
update Manifests
st-- Mar 31, 2022
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
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AbstractGPs"
uuid = "99985d1d-32ba-4be9-9821-2ec096f28918"
authors = ["JuliaGaussianProcesses Team"]
version = "0.5.9"
version = "0.5.10"
st-- marked this conversation as resolved.
Show resolved Hide resolved

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand All @@ -10,6 +10,7 @@ FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
IrrationalConstants = "92d709cd-6900-40b7-9082-c6be49f344b6"
KernelFunctions = "ec8451be-7e33-11e9-00cf-bbf324bd1392"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150"
st-- marked this conversation as resolved.
Show resolved Hide resolved
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Expand All @@ -23,6 +24,7 @@ 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"
KernelFunctions = "0.9, 0.10"
PDMats = "0.11"
RecipesBase = "1"
Reexport = "0.2, 1"
StatsBase = "0.33"
Expand Down
109 changes: 59 additions & 50 deletions docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9"
version = "0.0.1"

[[AbstractGPs]]
deps = ["ChainRulesCore", "Distributions", "FillArrays", "IrrationalConstants", "KernelFunctions", "LinearAlgebra", "Random", "RecipesBase", "Reexport", "Statistics", "StatsBase", "Test"]
deps = ["ChainRulesCore", "Distributions", "FillArrays", "IrrationalConstants", "KernelFunctions", "LinearAlgebra", "PDMats", "Random", "RecipesBase", "Reexport", "Statistics", "StatsBase", "Test"]
path = ".."
uuid = "99985d1d-32ba-4be9-9821-2ec096f28918"
version = "0.4.0"
version = "0.5.3"

[[ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
Expand All @@ -22,15 +22,15 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[ChainRulesCore]]
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "bdc0937269321858ab2a4f288486cb258b9a0af7"
git-tree-sha1 = "3533f5a691e60601fe60c90d8bc47a27aa2907ec"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "1.3.0"
version = "1.11.0"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "727e463cfebd0c7b999bbf3e9e7e16f254b94193"
git-tree-sha1 = "31d0151f5716b655421d9d75b7fa74cc4e744df2"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.34.0"
version = "3.39.0"

[[CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
Expand All @@ -42,9 +42,9 @@ uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b"
version = "0.1.1"

[[DataAPI]]
git-tree-sha1 = "ee400abb2298bd13bfc3df1c412ed228061a2385"
git-tree-sha1 = "cc70b17275652eb47bc9e5f81635981f13cea5c8"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.7.0"
version = "1.9.0"

[[DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
Expand All @@ -62,47 +62,46 @@ uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"

[[Distances]]
deps = ["LinearAlgebra", "Statistics", "StatsAPI"]
git-tree-sha1 = "abe4ad222b26af3337262b8afb28fab8d215e9f8"
git-tree-sha1 = "09d9eaef9ef719d2cd5d928a191dc95be2ec8059"
uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
version = "0.10.3"
version = "0.10.5"

[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[Distributions]]
deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"]
git-tree-sha1 = "3889f646423ce91dd1055a76317e9a1d3a23fff1"
deps = ["ChainRulesCore", "FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns"]
git-tree-sha1 = "d249ebaa67716b39f91cf6052daf073634013c0f"
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
version = "0.25.11"
version = "0.25.23"

[[DocStringExtensions]]
deps = ["LibGit2"]
git-tree-sha1 = "a32185f5428d3986f47c2ab78b1f216d5e6cc96f"
git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.5"
version = "0.8.6"

[[Documenter]]
deps = ["ANSIColoredPrinters", "Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
git-tree-sha1 = "350dced36c11f794c6c4da5dc6493ec894e50c16"
git-tree-sha1 = "f425293f7e0acaf9144de6d731772de156676233"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.27.5"
version = "0.27.10"

[[Downloads]]
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

[[FillArrays]]
deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"]
git-tree-sha1 = "7c365bdef6380b29cfc5caaf99688cd7489f9b87"
git-tree-sha1 = "8756f9935b7ccc9064c6eef0bff0ad643df733a3"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "0.12.2"
version = "0.12.7"

[[Functors]]
deps = ["MacroTools"]
git-tree-sha1 = "4cd9e70bf8fce05114598b663ad79dfe9ae432b3"
git-tree-sha1 = "e4768c3b7f597d5a352afa09874d16e3c3f6ead2"
uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196"
version = "0.2.3"
version = "0.2.7"

[[IOCapture]]
deps = ["Logging", "Random"]
Expand All @@ -114,10 +113,16 @@ version = "0.2.2"
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[InverseFunctions]]
deps = ["Test"]
git-tree-sha1 = "f0c6489b12d28fb4c2103073ec7452f3423bd308"
uuid = "3587e190-3f89-42d0-90ee-14403ec27112"
version = "0.1.1"

[[IrrationalConstants]]
git-tree-sha1 = "f76424439413893a832026ca355fe273e93bce94"
git-tree-sha1 = "7fd44fd4ff43fc60815f8e764c0f352b83c49151"
uuid = "92d709cd-6900-40b7-9082-c6be49f344b6"
version = "0.1.0"
version = "0.1.1"

[[JLLWrappers]]
deps = ["Preferences"]
Expand All @@ -133,9 +138,9 @@ version = "0.21.2"

[[KernelFunctions]]
deps = ["ChainRulesCore", "Compat", "CompositionsBase", "Distances", "FillArrays", "Functors", "IrrationalConstants", "LinearAlgebra", "LogExpFunctions", "Random", "Requires", "SpecialFunctions", "StatsBase", "TensorCore", "Test", "ZygoteRules"]
git-tree-sha1 = "6f46fb7fa868699dfbb6ae7973ba2825d3558ade"
git-tree-sha1 = "9c3d38dafc02feae68a4747813b8b0205fd03da5"
uuid = "ec8451be-7e33-11e9-00cf-bbf324bd1392"
version = "0.10.16"
version = "0.10.26"

[[LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
Expand All @@ -161,19 +166,19 @@ deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[LogExpFunctions]]
deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"]
git-tree-sha1 = "3d682c07e6dd250ed082f883dc88aee7996bf2cc"
deps = ["ChainRulesCore", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"]
git-tree-sha1 = "6193c3815f13ba1b78a51ce391db8be016ae9214"
uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
version = "0.3.0"
version = "0.3.4"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[MacroTools]]
deps = ["Markdown", "Random"]
git-tree-sha1 = "0fb723cd8c45858c22169b2e42269e53271a6df7"
git-tree-sha1 = "3d3e902b31198a27340d0bf00d6ac452866021cf"
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
version = "0.5.7"
version = "0.5.9"

[[Markdown]]
deps = ["Base64"]
Expand All @@ -185,9 +190,9 @@ uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"

[[Missings]]
deps = ["DataAPI"]
git-tree-sha1 = "2ca267b08821e86c5ef4376cffed98a46c2cb205"
git-tree-sha1 = "bf210ce90b6c9eed32d25dbcae1ebc565df2687f"
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
version = "1.0.1"
version = "1.0.2"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
Expand All @@ -198,6 +203,10 @@ uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
[[NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"

[[OpenLibm_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "05823500-19ac-5b8b-9628-191a04bc5112"

[[OpenSpecFun_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1"
Expand All @@ -217,9 +226,9 @@ version = "0.11.1"

[[Parsers]]
deps = ["Dates"]
git-tree-sha1 = "438d35d2d95ae2c5e8780b330592b6de8494e779"
git-tree-sha1 = "d911b6a12ba974dabe2291c6d450094a7226b372"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.0.3"
version = "2.1.1"

[[Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
Expand All @@ -237,9 +246,9 @@ uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[QuadGK]]
deps = ["DataStructures", "LinearAlgebra"]
git-tree-sha1 = "12fbe86da16df6679be7521dfb39fbc861e1dc7b"
git-tree-sha1 = "78aadffb3efd2155af139781b8a8df1ef279ea39"
uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
version = "2.4.1"
version = "2.4.2"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
Expand All @@ -255,9 +264,9 @@ uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
version = "1.1.2"

[[Reexport]]
git-tree-sha1 = "5f6c21241f0f655da3952fd60aa18477cf96c220"
git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b"
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
version = "1.1.0"
version = "1.2.2"

[[Requires]]
deps = ["UUIDs"]
Expand Down Expand Up @@ -301,10 +310,10 @@ deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[SpecialFunctions]]
deps = ["ChainRulesCore", "LogExpFunctions", "OpenSpecFun_jll"]
git-tree-sha1 = "a322a9493e49c5f3a10b50df3aedaf1cdb3244b7"
deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"]
git-tree-sha1 = "f0bccf98e16759818ffc5d97ac3ebf87eb950150"
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
version = "1.6.1"
version = "1.8.1"

[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
Expand All @@ -316,16 +325,16 @@ uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0"
version = "1.0.0"

[[StatsBase]]
deps = ["DataAPI", "DataStructures", "LinearAlgebra", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"]
git-tree-sha1 = "fed1ec1e65749c4d96fc20dd13bea72b55457e62"
deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"]
git-tree-sha1 = "eb35dcc66558b2dda84079b9a1be17557d32091a"
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
version = "0.33.9"
version = "0.33.12"

[[StatsFuns]]
deps = ["IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"]
git-tree-sha1 = "20d1bb720b9b27636280f751746ba4abb465f19d"
deps = ["ChainRulesCore", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"]
git-tree-sha1 = "95072ef1a22b057b1e80f73c2a89ad238ae4cfff"
uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c"
version = "0.9.9"
version = "0.9.12"

[[SuiteSparse]]
deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
Expand Down Expand Up @@ -362,9 +371,9 @@ uuid = "83775a58-1f1d-513f-b197-d71354ab007a"

[[ZygoteRules]]
deps = ["MacroTools"]
git-tree-sha1 = "9e7a1e8ca60b742e508a315c17eef5211e7fbfd7"
git-tree-sha1 = "8c1a8e4dfacb1fd631745552c8db35d0deb09ea0"
uuid = "700de1a5-db45-46bc-99cf-38207098b444"
version = "0.2.1"
version = "0.2.2"

[[nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
Expand Down
4 changes: 2 additions & 2 deletions examples/0-intro-1d/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ julia_version = "1.7.1"
manifest_format = "2.0"

[[deps.AbstractGPs]]
deps = ["ChainRulesCore", "Distributions", "FillArrays", "IrrationalConstants", "KernelFunctions", "LinearAlgebra", "Random", "RecipesBase", "Reexport", "Statistics", "StatsBase", "Test"]
deps = ["ChainRulesCore", "Distributions", "FillArrays", "IrrationalConstants", "KernelFunctions", "LinearAlgebra", "PDMats", "Random", "RecipesBase", "Reexport", "Statistics", "StatsBase", "Test"]
path = "../.."
uuid = "99985d1d-32ba-4be9-9821-2ec096f28918"
version = "0.5.9"
version = "0.5.10"

[[deps.AbstractMCMC]]
deps = ["BangBang", "ConsoleProgressMonitor", "Distributed", "Logging", "LoggingExtras", "ProgressLogging", "Random", "StatsBase", "TerminalLoggers", "Transducers"]
Expand Down
1 change: 1 addition & 0 deletions src/AbstractGPs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ using ChainRulesCore
using Distributions
using FillArrays
using LinearAlgebra
using PDMats: ScalMat
using Reexport
@reexport using KernelFunctions
using Random
Expand Down
5 changes: 3 additions & 2 deletions src/finite_gp_projection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
The finite-dimensional projection of the AbstractGP `f` at `x`. Assumed to be observed under
Gaussian noise with zero mean and covariance matrix `Σy`
"""
struct FiniteGP{Tf<:AbstractGP,Tx<:AbstractVector,TΣ} <: AbstractMvNormal
struct FiniteGP{Tf<:AbstractGP,Tx<:AbstractVector,TΣ<:AbstractMatrix{<:Real}} <:
AbstractMvNormal
f::Tf
x::Tx
Σy::TΣ
Expand All @@ -17,7 +18,7 @@ end
const default_σ² = 1e-18

function FiniteGP(f::AbstractGP, x::AbstractVector, σ²::Real=default_σ²)
return FiniteGP(f, x, Fill(σ², length(x)))
return FiniteGP(f, x, ScalMat(length(x), σ²))
st-- marked this conversation as resolved.
Show resolved Hide resolved
end

## conversions
Expand Down
4 changes: 2 additions & 2 deletions src/mean_function.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ struct ZeroMean{T<:Real} <: MeanFunction end
"""
This is an AbstractGPs-internal workaround for AD issues; ideally we would just extend Base.map
"""
_map_meanfunction(::ZeroMean{T}, x::AbstractVector) where {T} = zeros(T, length(x))
_map_meanfunction(::ZeroMean{T}, x::AbstractVector) where {T} = Zeros{T}(length(x))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC we didn't use FillArrays here before due to AD issues. Great if it is working now.


function ChainRulesCore.rrule(::typeof(_map_meanfunction), m::ZeroMean, x::AbstractVector)
map_ZeroMean_pullback(Δ) = (NoTangent(), NoTangent(), ZeroTangent())
Expand All @@ -28,7 +28,7 @@ struct ConstMean{T<:Real} <: MeanFunction
c::T
end

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

"""
CustomMean{Tf} <: MeanFunction
Expand Down
4 changes: 4 additions & 0 deletions src/sparse_approximations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,7 @@ end
function tr_Cf_invΣy(f::FiniteGP, Σy::Diagonal)
return sum(var(f.f, f.x) ./ diag(Σy))
end

function tr_Cf_invΣy(f::FiniteGP, Σy::ScalMat)
return sum(var(f.f, f.x)) / Σy.value
end
1 change: 1 addition & 0 deletions src/util/common_covmat_ops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
_symmetric(X) = Symmetric(X)
_symmetric(X::Diagonal) = X
_symmetric(X::Cholesky) = X
_symmetric(X::AbstractPDMat) = X

# Small bit of indirection to work around a cholesky-related bug whereby the interaction
# between `FillArrays` and `Diagonal` and `Cholesky` causes problems.
Expand Down
2 changes: 2 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150"
st-- marked this conversation as resolved.
Show resolved Hide resolved
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand All @@ -18,6 +19,7 @@ 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"
FiniteDifferences = "0.9.6, 0.10, 0.11, 0.12"
PDMats = "0.11"
Plots = "1"
Zygote = "0.5, 0.6"
julia = "1.3"
2 changes: 1 addition & 1 deletion test/latent_gp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
x = rand(10)
y = rand(10)

lgp = LatentGP(gp, x -> MvNormal(x, 0.1), 1e-5)
lgp = LatentGP(gp, x -> MvNormal(x, 0.01 * I), 1e-5)
@test lgp isa LatentGP
@test lgp.f isa AbstractGPs.AbstractGP
@test lgp.Σy isa Real
Expand Down
Loading