From 1f40106d4b7aacff0b2bf972ef93e59088e9e81f Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Wed, 20 Sep 2023 21:57:41 +0200 Subject: [PATCH 01/27] Test on Julia 1.8 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ada7a038..9607f7aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,7 @@ jobs: matrix: version: - '1' + - '1.8' - '1.6' os: - ubuntu-latest From d5676f3c5d3289bac36c8aa0496a2f8594077080 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Thu, 21 Sep 2023 18:01:12 +0200 Subject: [PATCH 02/27] Check in Manifest --- .gitignore | 1 - Manifest.toml | 622 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 622 insertions(+), 1 deletion(-) create mode 100644 Manifest.toml diff --git a/.gitignore b/.gitignore index de898deb..74b714e5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ *.jl.cov *.jl.mem .DS_Store -/Manifest.toml /test/Manifest.toml /examples/Manifest.toml /dev/ diff --git a/Manifest.toml b/Manifest.toml new file mode 100644 index 00000000..b020f0f5 --- /dev/null +++ b/Manifest.toml @@ -0,0 +1,622 @@ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.9.3" +manifest_format = "2.0" +project_hash = "4a798af36f264d3f93f6784c8b1c59cb71d01d57" + +[[deps.AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "16b6dbc4cf7caee4e1e75c49485ec67b667098a0" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.3.1" +weakdeps = ["ChainRulesCore"] + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + +[[deps.AbstractGPs]] +deps = ["ChainRulesCore", "Distributions", "FillArrays", "IrrationalConstants", "KernelFunctions", "LinearAlgebra", "PDMats", "Random", "RecipesBase", "Reexport", "Statistics", "StatsBase", "Test"] +git-tree-sha1 = "bd32cf623e18935a94ff10961ca02c4062fe1dbe" +uuid = "99985d1d-32ba-4be9-9821-2ec096f28918" +version = "0.5.16" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "cc37d689f599e8df4f464b2fa3870ff7db7492ef" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.6.1" +weakdeps = ["StaticArrays"] + + [deps.Adapt.extensions] + AdaptStaticArraysExt = "StaticArrays" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.Bessels]] +git-tree-sha1 = "4435559dc39793d53a9e3d278e185e920b4619ef" +uuid = "0e736298-9ec6-45e8-9647-e4fc86a2fe38" +version = "0.2.8" + +[[deps.BlockDiagonals]] +deps = ["ChainRulesCore", "FillArrays", "FiniteDifferences", "LinearAlgebra"] +git-tree-sha1 = "ffd635c19b56f50d1d4278d876219644299b5711" +uuid = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" +version = "0.1.41" + +[[deps.CEnum]] +git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90" +uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" +version = "0.4.2" + +[[deps.Calculus]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" +uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" +version = "0.5.1" + +[[deps.ChainRules]] +deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "Statistics", "StructArrays"] +git-tree-sha1 = "7d20c2fb8ab838e41069398685e7b6b5f89ed85b" +uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" +version = "1.48.0" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "c6d890a52d2c4d55d326439580c3b8d0875a77d9" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.15.7" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools", "Test"] +git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.0" + +[[deps.Compat]] +deps = ["UUIDs"] +git-tree-sha1 = "7a60c856b9fa189eb34f5f8a6f6b5529b7942957" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.6.1" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.0.5+0" + +[[deps.CompositionsBase]] +git-tree-sha1 = "455419f7e328a1a2493cabc6428d79e951349769" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.1" + +[[deps.DataAPI]] +git-tree-sha1 = "e8119c1a33d267e16108be441a287a6981ba1630" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.14.0" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.13" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "a4ad7ef19d2cdc2eff57abbbe68032b1cd0bd8f8" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.13.0" + +[[deps.Distances]] +deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "49eba9ad9f7ead780bfb7ee319f962c811c6d3b2" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.8" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Distributions]] +deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] +git-tree-sha1 = "13027f188d26206b9e7b863036f87d2f2e7d013a" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.25.87" + + [deps.Distributions.extensions] + DistributionsChainRulesCoreExt = "ChainRulesCore" + DistributionsDensityInterfaceExt = "DensityInterface" + + [deps.Distributions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" + +[[deps.DocStringExtensions]] +deps = ["LibGit2"] +git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.3" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.6.0" + +[[deps.DualNumbers]] +deps = ["Calculus", "NaNMath", "SpecialFunctions"] +git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" +uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" +version = "0.6.8" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] +git-tree-sha1 = "d3ba08ab64bdfd27234d3f61956c966266757fe6" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "0.13.7" + +[[deps.FiniteDifferences]] +deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] +git-tree-sha1 = "3f605dd6db5640c5278f2551afc9427656439f42" +uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" +version = "0.12.26" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "00e252f4d706b3d55a8863432e742bf5717b498d" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.35" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.Functors]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "478f8c3145bb91d82c2cf20433e8c1b30df454cc" +uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" +version = "0.4.4" + +[[deps.GPUArrays]] +deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"] +git-tree-sha1 = "9ade6983c3dbbd492cf5729f865fe030d1541463" +uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" +version = "8.6.6" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "1cd7f0af1aa58abc02ea1d872953a97359cb87fa" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.1.4" + +[[deps.HypergeometricFunctions]] +deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] +git-tree-sha1 = "432b5b03176f8182bd6841fbfc42c718506a2d5f" +uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" +version = "0.3.15" + +[[deps.IRTools]] +deps = ["InteractiveUtils", "MacroTools", "Test"] +git-tree-sha1 = "0ade27f0c49cebd8db2523c4eeccf779407cf12c" +uuid = "7869d1d1-7146-5819-86e3-90919afe41df" +version = "0.4.9" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.2" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLLWrappers]] +deps = ["Preferences"] +git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.4.1" + +[[deps.KernelFunctions]] +deps = ["ChainRulesCore", "Compat", "CompositionsBase", "Distances", "FillArrays", "Functors", "IrrationalConstants", "LinearAlgebra", "LogExpFunctions", "Random", "Requires", "SpecialFunctions", "Statistics", "StatsBase", "TensorCore", "Test", "ZygoteRules"] +git-tree-sha1 = "c6df06e59d1834ef8290eb702dfe21ad973fd29f" +uuid = "ec8451be-7e33-11e9-00cf-bbf324bd1392" +version = "0.10.55" + +[[deps.LLVM]] +deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Printf", "Unicode"] +git-tree-sha1 = "a8960cae30b42b66dd41808beb76490519f6f9e2" +uuid = "929cbde3-209d-540e-8aea-75f648917ca0" +version = "5.0.0" + +[[deps.LLVMExtra_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"] +git-tree-sha1 = "09b7505cc0b1cee87e5d4a26eea61d2e1b0dcd35" +uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" +version = "0.0.21+0" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.3" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "7.84.0+0" + +[[deps.LibGit2]] +deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "MbedTLS_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.10.2+0" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "0a1b7c2863e44523180fdb3146534e265a91870b" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.23" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "42324d08725e200c23d4dfb549e0d5d89dede2d2" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.10" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.2+0" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.1.0" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2022.10.11" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.0.2" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.2.0" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.21+4" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+0" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.5+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "d321bf2de576bf25ec4d3e4360faca399afca282" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.6.0" + +[[deps.PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "67eae2738d63117a196f497d7db789821bce61d1" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.17" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.9.2" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.3.0" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "6ec7ac8412e83d57e313393220879ede1740f9ee" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.8.2" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA", "Serialization"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.RealDot]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" +uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" +version = "0.1.0" + +[[deps.RecipesBase]] +deps = ["SnoopPrecompile"] +git-tree-sha1 = "261dddd3b862bd2c940cf6ca4d1c8fe593e457c8" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.3" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.0" + +[[deps.Richardson]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "e03ca566bec93f8a3aeb059c8ef102f268a38949" +uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" +version = "1.4.0" + +[[deps.Rmath]] +deps = ["Random", "Rmath_jll"] +git-tree-sha1 = "f65dcb5fa46aee0cf9ed6274ccbd597adc49aa7b" +uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" +version = "0.7.1" + +[[deps.Rmath_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "6ed52fdd3382cf21947b15e8870ac0ddbff736da" +uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" +version = "0.4.0+0" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.SnoopPrecompile]] +deps = ["Preferences"] +git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" +uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" +version = "1.0.3" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "a4ada03f999bd01b3a25dcaa30b2d929fe537e00" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.1.0" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "ef28127915f4229c971eb43f3fc075dd3fe91880" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.2.0" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "63e84b7fdf5021026d0f17f76af7c57772313d99" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.5.21" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "6b7ba252635a5eff6a0b0664a41ee140a1c9e72a" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.0" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.9.0" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "45a7769a04a3cf80da1c1c7c60caf932e6f4c9f7" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.6.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "d1bf48bfcc554a3761a133fe3a9bb01488e06916" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.33.21" + +[[deps.StatsFuns]] +deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "f625d686d5a88bcd2b15cd81f18f98186fdc0c9a" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "1.3.0" + + [deps.StatsFuns.extensions] + StatsFunsChainRulesCoreExt = "ChainRulesCore" + StatsFunsInverseFunctionsExt = "InverseFunctions" + + [deps.StatsFuns.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.StructArrays]] +deps = ["Adapt", "DataAPI", "GPUArraysCore", "StaticArraysCore", "Tables"] +git-tree-sha1 = "521a0e828e98bb69042fec1809c1b5a680eb7389" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.6.15" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "5.10.1+6" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] +git-tree-sha1 = "1544b926975372da01227b382066ab70e574a3ec" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.10.1" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.TensorCore]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" +uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" +version = "0.1.1" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.13+0" + +[[deps.Zygote]] +deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArrays", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "Random", "Requires", "SnoopPrecompile", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] +git-tree-sha1 = "987ae5554ca90e837594a0f30325eeb5e7303d1e" +uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" +version = "0.6.60" + + [deps.Zygote.extensions] + ZygoteColorsExt = "Colors" + ZygoteDistancesExt = "Distances" + ZygoteTrackerExt = "Tracker" + + [deps.Zygote.weakdeps] + Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" + Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ZygoteRules]] +deps = ["ChainRulesCore", "MacroTools"] +git-tree-sha1 = "977aed5d006b840e2e40c0b48984f7463109046d" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.3" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.8.0+0" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.48.0+0" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+0" From 3d51bfbd551d241c4ca32168e3cb5f86d73e7f7d Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Fri, 22 Sep 2023 01:19:39 +0200 Subject: [PATCH 03/27] Add rrules for `kron` --- src/util/chainrules.jl | 53 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/src/util/chainrules.jl b/src/util/chainrules.jl index 23bed859..b610800b 100644 --- a/src/util/chainrules.jl +++ b/src/util/chainrules.jl @@ -265,6 +265,59 @@ function Zygote._symmetric_back(Δ::SMatrix{N, N}, uplo) where {N} end end + +function rrule(::typeof(kron), x::AbstractMatrix, y::AbstractVector) + z = kron(x, y) + + function kron_pullback(z̄) + x̄ = zero(x) + ȳ = zero(y) + m = firstindex(z̄) + @inbounds for j in axes(x,2), i in axes(x,1) + xij = x[i,j] + for k in eachindex(y) + x̄[i, j] += y[k] * z̄[m] + ȳ[k] += xij * z̄[m] + m += 1 + end + end + NoTangent(), x̄, ȳ + end + z, kron_pullback +end + +function rrule(::typeof(kron), x::AbstractVector, y::AbstractMatrix) + z = kron(x, y) + + function kron_pullback(z̄) + x̄ = zero(x) + ȳ = zero(y) + m = firstindex(z̄) + @inbounds for l in axes(y,2), i in eachindex(x) + xi = x[i] + for k in axes(y,1) + x̄[i] += y[k, l] * z̄[m] + ȳ[k, l] += xi * z̄[m] + m += 1 + end + end + NoTangent(), x̄, ȳ + end + z, kron_pullback +end + +function _kron!(C, a::AbstractVector, B::AbstractMatrix) + m = firstindex(C) + @inbounds for l in axes(B,2), i in eachindex(a) + ai = a[i] + for k in axes(B,1) + C[m] = ai*B[k,l] + m += 1 + end + end + return C +end + # Temporary hacks. using Zygote: literal_getproperty, literal_indexed_iterate, literal_getindex From 9da27abf9ede043a30fd36b48b4da172f5a9a04b Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Fri, 22 Sep 2023 01:36:11 +0200 Subject: [PATCH 04/27] Revert "Check in Manifest" This reverts commit d5676f3c5d3289bac36c8aa0496a2f8594077080. --- .gitignore | 1 + Manifest.toml | 622 -------------------------------------------------- 2 files changed, 1 insertion(+), 622 deletions(-) delete mode 100644 Manifest.toml diff --git a/.gitignore b/.gitignore index 74b714e5..de898deb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.jl.cov *.jl.mem .DS_Store +/Manifest.toml /test/Manifest.toml /examples/Manifest.toml /dev/ diff --git a/Manifest.toml b/Manifest.toml deleted file mode 100644 index b020f0f5..00000000 --- a/Manifest.toml +++ /dev/null @@ -1,622 +0,0 @@ -# This file is machine-generated - editing it directly is not advised - -julia_version = "1.9.3" -manifest_format = "2.0" -project_hash = "4a798af36f264d3f93f6784c8b1c59cb71d01d57" - -[[deps.AbstractFFTs]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "16b6dbc4cf7caee4e1e75c49485ec67b667098a0" -uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" -version = "1.3.1" -weakdeps = ["ChainRulesCore"] - - [deps.AbstractFFTs.extensions] - AbstractFFTsChainRulesCoreExt = "ChainRulesCore" - -[[deps.AbstractGPs]] -deps = ["ChainRulesCore", "Distributions", "FillArrays", "IrrationalConstants", "KernelFunctions", "LinearAlgebra", "PDMats", "Random", "RecipesBase", "Reexport", "Statistics", "StatsBase", "Test"] -git-tree-sha1 = "bd32cf623e18935a94ff10961ca02c4062fe1dbe" -uuid = "99985d1d-32ba-4be9-9821-2ec096f28918" -version = "0.5.16" - -[[deps.Adapt]] -deps = ["LinearAlgebra", "Requires"] -git-tree-sha1 = "cc37d689f599e8df4f464b2fa3870ff7db7492ef" -uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "3.6.1" -weakdeps = ["StaticArrays"] - - [deps.Adapt.extensions] - AdaptStaticArraysExt = "StaticArrays" - -[[deps.ArgTools]] -uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" -version = "1.1.1" - -[[deps.Artifacts]] -uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" - -[[deps.Base64]] -uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" - -[[deps.Bessels]] -git-tree-sha1 = "4435559dc39793d53a9e3d278e185e920b4619ef" -uuid = "0e736298-9ec6-45e8-9647-e4fc86a2fe38" -version = "0.2.8" - -[[deps.BlockDiagonals]] -deps = ["ChainRulesCore", "FillArrays", "FiniteDifferences", "LinearAlgebra"] -git-tree-sha1 = "ffd635c19b56f50d1d4278d876219644299b5711" -uuid = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" -version = "0.1.41" - -[[deps.CEnum]] -git-tree-sha1 = "eb4cb44a499229b3b8426dcfb5dd85333951ff90" -uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" -version = "0.4.2" - -[[deps.Calculus]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" -uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" -version = "0.5.1" - -[[deps.ChainRules]] -deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "Statistics", "StructArrays"] -git-tree-sha1 = "7d20c2fb8ab838e41069398685e7b6b5f89ed85b" -uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" -version = "1.48.0" - -[[deps.ChainRulesCore]] -deps = ["Compat", "LinearAlgebra", "SparseArrays"] -git-tree-sha1 = "c6d890a52d2c4d55d326439580c3b8d0875a77d9" -uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.15.7" - -[[deps.CommonSubexpressions]] -deps = ["MacroTools", "Test"] -git-tree-sha1 = "7b8a93dba8af7e3b42fecabf646260105ac373f7" -uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" -version = "0.3.0" - -[[deps.Compat]] -deps = ["UUIDs"] -git-tree-sha1 = "7a60c856b9fa189eb34f5f8a6f6b5529b7942957" -uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.6.1" -weakdeps = ["Dates", "LinearAlgebra"] - - [deps.Compat.extensions] - CompatLinearAlgebraExt = "LinearAlgebra" - -[[deps.CompilerSupportLibraries_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.5+0" - -[[deps.CompositionsBase]] -git-tree-sha1 = "455419f7e328a1a2493cabc6428d79e951349769" -uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" -version = "0.1.1" - -[[deps.DataAPI]] -git-tree-sha1 = "e8119c1a33d267e16108be441a287a6981ba1630" -uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" -version = "1.14.0" - -[[deps.DataStructures]] -deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0" -uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.13" - -[[deps.DataValueInterfaces]] -git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" -uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" -version = "1.0.0" - -[[deps.Dates]] -deps = ["Printf"] -uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" - -[[deps.DiffResults]] -deps = ["StaticArraysCore"] -git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" -uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" -version = "1.1.0" - -[[deps.DiffRules]] -deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] -git-tree-sha1 = "a4ad7ef19d2cdc2eff57abbbe68032b1cd0bd8f8" -uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" -version = "1.13.0" - -[[deps.Distances]] -deps = ["LinearAlgebra", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "49eba9ad9f7ead780bfb7ee319f962c811c6d3b2" -uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" -version = "0.10.8" - -[[deps.Distributed]] -deps = ["Random", "Serialization", "Sockets"] -uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" - -[[deps.Distributions]] -deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SparseArrays", "SpecialFunctions", "Statistics", "StatsBase", "StatsFuns", "Test"] -git-tree-sha1 = "13027f188d26206b9e7b863036f87d2f2e7d013a" -uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" -version = "0.25.87" - - [deps.Distributions.extensions] - DistributionsChainRulesCoreExt = "ChainRulesCore" - DistributionsDensityInterfaceExt = "DensityInterface" - - [deps.Distributions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" - -[[deps.DocStringExtensions]] -deps = ["LibGit2"] -git-tree-sha1 = "2fb1e02f2b635d0845df5d7c167fec4dd739b00d" -uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" -version = "0.9.3" - -[[deps.Downloads]] -deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] -uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" -version = "1.6.0" - -[[deps.DualNumbers]] -deps = ["Calculus", "NaNMath", "SpecialFunctions"] -git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" -uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" -version = "0.6.8" - -[[deps.FileWatching]] -uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" - -[[deps.FillArrays]] -deps = ["LinearAlgebra", "Random", "SparseArrays", "Statistics"] -git-tree-sha1 = "d3ba08ab64bdfd27234d3f61956c966266757fe6" -uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "0.13.7" - -[[deps.FiniteDifferences]] -deps = ["ChainRulesCore", "LinearAlgebra", "Printf", "Random", "Richardson", "SparseArrays", "StaticArrays"] -git-tree-sha1 = "3f605dd6db5640c5278f2551afc9427656439f42" -uuid = "26cc04aa-876d-5657-8c51-4c34ba976000" -version = "0.12.26" - -[[deps.ForwardDiff]] -deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] -git-tree-sha1 = "00e252f4d706b3d55a8863432e742bf5717b498d" -uuid = "f6369f11-7733-5829-9624-2563aa707210" -version = "0.10.35" -weakdeps = ["StaticArrays"] - - [deps.ForwardDiff.extensions] - ForwardDiffStaticArraysExt = "StaticArrays" - -[[deps.Functors]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "478f8c3145bb91d82c2cf20433e8c1b30df454cc" -uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" -version = "0.4.4" - -[[deps.GPUArrays]] -deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"] -git-tree-sha1 = "9ade6983c3dbbd492cf5729f865fe030d1541463" -uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" -version = "8.6.6" - -[[deps.GPUArraysCore]] -deps = ["Adapt"] -git-tree-sha1 = "1cd7f0af1aa58abc02ea1d872953a97359cb87fa" -uuid = "46192b85-c4d5-4398-a991-12ede77f4527" -version = "0.1.4" - -[[deps.HypergeometricFunctions]] -deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] -git-tree-sha1 = "432b5b03176f8182bd6841fbfc42c718506a2d5f" -uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" -version = "0.3.15" - -[[deps.IRTools]] -deps = ["InteractiveUtils", "MacroTools", "Test"] -git-tree-sha1 = "0ade27f0c49cebd8db2523c4eeccf779407cf12c" -uuid = "7869d1d1-7146-5819-86e3-90919afe41df" -version = "0.4.9" - -[[deps.InteractiveUtils]] -deps = ["Markdown"] -uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" - -[[deps.IrrationalConstants]] -git-tree-sha1 = "630b497eafcc20001bba38a4651b327dcfc491d2" -uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" -version = "0.2.2" - -[[deps.IteratorInterfaceExtensions]] -git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" -uuid = "82899510-4779-5014-852e-03e436cf321d" -version = "1.0.0" - -[[deps.JLLWrappers]] -deps = ["Preferences"] -git-tree-sha1 = "abc9885a7ca2052a736a600f7fa66209f96506e1" -uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" -version = "1.4.1" - -[[deps.KernelFunctions]] -deps = ["ChainRulesCore", "Compat", "CompositionsBase", "Distances", "FillArrays", "Functors", "IrrationalConstants", "LinearAlgebra", "LogExpFunctions", "Random", "Requires", "SpecialFunctions", "Statistics", "StatsBase", "TensorCore", "Test", "ZygoteRules"] -git-tree-sha1 = "c6df06e59d1834ef8290eb702dfe21ad973fd29f" -uuid = "ec8451be-7e33-11e9-00cf-bbf324bd1392" -version = "0.10.55" - -[[deps.LLVM]] -deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Printf", "Unicode"] -git-tree-sha1 = "a8960cae30b42b66dd41808beb76490519f6f9e2" -uuid = "929cbde3-209d-540e-8aea-75f648917ca0" -version = "5.0.0" - -[[deps.LLVMExtra_jll]] -deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"] -git-tree-sha1 = "09b7505cc0b1cee87e5d4a26eea61d2e1b0dcd35" -uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" -version = "0.0.21+0" - -[[deps.LazyArtifacts]] -deps = ["Artifacts", "Pkg"] -uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" - -[[deps.LibCURL]] -deps = ["LibCURL_jll", "MozillaCACerts_jll"] -uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.6.3" - -[[deps.LibCURL_jll]] -deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] -uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" -version = "7.84.0+0" - -[[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] -uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" - -[[deps.LibSSH2_jll]] -deps = ["Artifacts", "Libdl", "MbedTLS_jll"] -uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" -version = "1.10.2+0" - -[[deps.Libdl]] -uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" - -[[deps.LinearAlgebra]] -deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] -uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" - -[[deps.LogExpFunctions]] -deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] -git-tree-sha1 = "0a1b7c2863e44523180fdb3146534e265a91870b" -uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" -version = "0.3.23" - - [deps.LogExpFunctions.extensions] - LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" - LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" - LogExpFunctionsInverseFunctionsExt = "InverseFunctions" - - [deps.LogExpFunctions.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.Logging]] -uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" - -[[deps.MacroTools]] -deps = ["Markdown", "Random"] -git-tree-sha1 = "42324d08725e200c23d4dfb549e0d5d89dede2d2" -uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.10" - -[[deps.Markdown]] -deps = ["Base64"] -uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" - -[[deps.MbedTLS_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+0" - -[[deps.Missings]] -deps = ["DataAPI"] -git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272" -uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" -version = "1.1.0" - -[[deps.MozillaCACerts_jll]] -uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.10.11" - -[[deps.NaNMath]] -deps = ["OpenLibm_jll"] -git-tree-sha1 = "0877504529a3e5c3343c6f8b4c0381e57e4387e4" -uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" -version = "1.0.2" - -[[deps.NetworkOptions]] -uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" -version = "1.2.0" - -[[deps.OpenBLAS_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] -uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.21+4" - -[[deps.OpenLibm_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" - -[[deps.OpenSpecFun_jll]] -deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "13652491f6856acfd2db29360e1bbcd4565d04f1" -uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" -version = "0.5.5+0" - -[[deps.OrderedCollections]] -git-tree-sha1 = "d321bf2de576bf25ec4d3e4360faca399afca282" -uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.6.0" - -[[deps.PDMats]] -deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "67eae2738d63117a196f497d7db789821bce61d1" -uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" -version = "0.11.17" - -[[deps.Pkg]] -deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"] -uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" -version = "1.9.2" - -[[deps.Preferences]] -deps = ["TOML"] -git-tree-sha1 = "47e5f437cc0e7ef2ce8406ce1e7e24d44915f88d" -uuid = "21216c6a-2e73-6563-6e65-726566657250" -version = "1.3.0" - -[[deps.Printf]] -deps = ["Unicode"] -uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" - -[[deps.QuadGK]] -deps = ["DataStructures", "LinearAlgebra"] -git-tree-sha1 = "6ec7ac8412e83d57e313393220879ede1740f9ee" -uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" -version = "2.8.2" - -[[deps.REPL]] -deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] -uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" - -[[deps.Random]] -deps = ["SHA", "Serialization"] -uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[[deps.RealDot]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" -uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" -version = "0.1.0" - -[[deps.RecipesBase]] -deps = ["SnoopPrecompile"] -git-tree-sha1 = "261dddd3b862bd2c940cf6ca4d1c8fe593e457c8" -uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "1.3.3" - -[[deps.Reexport]] -git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" -uuid = "189a3867-3050-52da-a836-e630ba90ab69" -version = "1.2.2" - -[[deps.Requires]] -deps = ["UUIDs"] -git-tree-sha1 = "838a3a4188e2ded87a4f9f184b4b0d78a1e91cb7" -uuid = "ae029012-a4dd-5104-9daa-d747884805df" -version = "1.3.0" - -[[deps.Richardson]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "e03ca566bec93f8a3aeb059c8ef102f268a38949" -uuid = "708f8203-808e-40c0-ba2d-98a6953ed40d" -version = "1.4.0" - -[[deps.Rmath]] -deps = ["Random", "Rmath_jll"] -git-tree-sha1 = "f65dcb5fa46aee0cf9ed6274ccbd597adc49aa7b" -uuid = "79098fc4-a85e-5d69-aa6a-4863f24498fa" -version = "0.7.1" - -[[deps.Rmath_jll]] -deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] -git-tree-sha1 = "6ed52fdd3382cf21947b15e8870ac0ddbff736da" -uuid = "f50d1b31-88e8-58de-be2c-1cc44531875f" -version = "0.4.0+0" - -[[deps.SHA]] -uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" -version = "0.7.0" - -[[deps.Serialization]] -uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" - -[[deps.SnoopPrecompile]] -deps = ["Preferences"] -git-tree-sha1 = "e760a70afdcd461cf01a575947738d359234665c" -uuid = "66db9d55-30c0-4569-8b51-7e840670fc0c" -version = "1.0.3" - -[[deps.Sockets]] -uuid = "6462fe0b-24de-5631-8697-dd941f90decc" - -[[deps.SortingAlgorithms]] -deps = ["DataStructures"] -git-tree-sha1 = "a4ada03f999bd01b3a25dcaa30b2d929fe537e00" -uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.1.0" - -[[deps.SparseArrays]] -deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] -uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" - -[[deps.SpecialFunctions]] -deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] -git-tree-sha1 = "ef28127915f4229c971eb43f3fc075dd3fe91880" -uuid = "276daf66-3868-5448-9aa4-cd146d93841b" -version = "2.2.0" -weakdeps = ["ChainRulesCore"] - - [deps.SpecialFunctions.extensions] - SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" - -[[deps.StaticArrays]] -deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"] -git-tree-sha1 = "63e84b7fdf5021026d0f17f76af7c57772313d99" -uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.5.21" - -[[deps.StaticArraysCore]] -git-tree-sha1 = "6b7ba252635a5eff6a0b0664a41ee140a1c9e72a" -uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" -version = "1.4.0" - -[[deps.Statistics]] -deps = ["LinearAlgebra", "SparseArrays"] -uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.9.0" - -[[deps.StatsAPI]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "45a7769a04a3cf80da1c1c7c60caf932e6f4c9f7" -uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" -version = "1.6.0" - -[[deps.StatsBase]] -deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] -git-tree-sha1 = "d1bf48bfcc554a3761a133fe3a9bb01488e06916" -uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" -version = "0.33.21" - -[[deps.StatsFuns]] -deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] -git-tree-sha1 = "f625d686d5a88bcd2b15cd81f18f98186fdc0c9a" -uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" -version = "1.3.0" - - [deps.StatsFuns.extensions] - StatsFunsChainRulesCoreExt = "ChainRulesCore" - StatsFunsInverseFunctionsExt = "InverseFunctions" - - [deps.StatsFuns.weakdeps] - ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" - InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" - -[[deps.StructArrays]] -deps = ["Adapt", "DataAPI", "GPUArraysCore", "StaticArraysCore", "Tables"] -git-tree-sha1 = "521a0e828e98bb69042fec1809c1b5a680eb7389" -uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" -version = "0.6.15" - -[[deps.SuiteSparse]] -deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] -uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" - -[[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] -uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "5.10.1+6" - -[[deps.TOML]] -deps = ["Dates"] -uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" -version = "1.0.3" - -[[deps.TableTraits]] -deps = ["IteratorInterfaceExtensions"] -git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" -uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" -version = "1.0.1" - -[[deps.Tables]] -deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"] -git-tree-sha1 = "1544b926975372da01227b382066ab70e574a3ec" -uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" -version = "1.10.1" - -[[deps.Tar]] -deps = ["ArgTools", "SHA"] -uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" -version = "1.10.0" - -[[deps.TensorCore]] -deps = ["LinearAlgebra"] -git-tree-sha1 = "1feb45f88d133a655e001435632f019a9a1bcdb6" -uuid = "62fd8b95-f654-4bbd-a8a5-9c27f68ccd50" -version = "0.1.1" - -[[deps.Test]] -deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] -uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" - -[[deps.UUIDs]] -deps = ["Random", "SHA"] -uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" - -[[deps.Unicode]] -uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" - -[[deps.Zlib_jll]] -deps = ["Libdl"] -uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+0" - -[[deps.Zygote]] -deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArrays", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "Random", "Requires", "SnoopPrecompile", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] -git-tree-sha1 = "987ae5554ca90e837594a0f30325eeb5e7303d1e" -uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" -version = "0.6.60" - - [deps.Zygote.extensions] - ZygoteColorsExt = "Colors" - ZygoteDistancesExt = "Distances" - ZygoteTrackerExt = "Tracker" - - [deps.Zygote.weakdeps] - Colors = "5ae59095-9a9b-59fe-a467-6f913c188581" - Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" - Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" - -[[deps.ZygoteRules]] -deps = ["ChainRulesCore", "MacroTools"] -git-tree-sha1 = "977aed5d006b840e2e40c0b48984f7463109046d" -uuid = "700de1a5-db45-46bc-99cf-38207098b444" -version = "0.2.3" - -[[deps.libblastrampoline_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+0" - -[[deps.nghttp2_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" -version = "1.48.0+0" - -[[deps.p7zip_jll]] -deps = ["Artifacts", "Libdl"] -uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" From 9373a1e77d6e129b763b478e89dc1a71b48e67ed Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Fri, 22 Sep 2023 01:42:51 +0200 Subject: [PATCH 05/27] Remove unnecessary method --- src/util/chainrules.jl | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/util/chainrules.jl b/src/util/chainrules.jl index b610800b..80a3d4a4 100644 --- a/src/util/chainrules.jl +++ b/src/util/chainrules.jl @@ -306,18 +306,6 @@ function rrule(::typeof(kron), x::AbstractVector, y::AbstractMatrix) z, kron_pullback end -function _kron!(C, a::AbstractVector, B::AbstractMatrix) - m = firstindex(C) - @inbounds for l in axes(B,2), i in eachindex(a) - ai = a[i] - for k in axes(B,1) - C[m] = ai*B[k,l] - m += 1 - end - end - return C -end - # Temporary hacks. using Zygote: literal_getproperty, literal_indexed_iterate, literal_getindex From f11e0a719662b4f80bd6b061cc53c7c4d3225853 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Fri, 22 Sep 2023 03:16:31 +0200 Subject: [PATCH 06/27] Use new `DTC` API --- test/space_time/pseudo_point.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/space_time/pseudo_point.jl b/test/space_time/pseudo_point.jl index cc230e6a..8e43fa04 100644 --- a/test/space_time/pseudo_point.jl +++ b/test/space_time/pseudo_point.jl @@ -96,7 +96,7 @@ include("../models/model_test_utils.jl") validate_dims(lgssm) # The two approaches to DTC computation should be equivalent up to roundoff error. - dtc_naive = dtc(VFE(f_naive(z_naive)), fx_naive, y) + dtc_naive = approx_log_evidence(DTC(f_naive(z_naive)), fx_naive, y) dtc_sde = dtc(fx, y, z_r) @test dtc_naive ≈ dtc_sde rtol=1e-6 @@ -150,7 +150,7 @@ include("../models/model_test_utils.jl") fx_naive = f_naive(naive_inputs_missings, 0.1) # Compute DTC using both approaches. - dtc_naive = dtc(VFE(f_naive(z_naive)), fx_naive, naive_y_missings) + dtc_naive = approx_log_evidence(DTC(f_naive(z_naive)), fx_naive, naive_y_missings) dtc_sde = dtc(fx, y_missing, z_r) @test dtc_naive ≈ dtc_sde rtol=1e-7 atol=1e-7 From f846d58321fc34a4bb1c21f48273df732660fc67 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Fri, 22 Sep 2023 11:43:08 +0200 Subject: [PATCH 07/27] Fix `rand_tangent` deprecation warnings --- test/test_util.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_util.jl b/test/test_util.jl index 083f930a..db00fe80 100644 --- a/test/test_util.jl +++ b/test/test_util.jl @@ -661,14 +661,14 @@ Base.zero(::Reverse) = Reverse() _diag(x) = diag(x) _diag(x::Real) = x -function FiniteDifferences.rand_tangent(rng::AbstractRNG, A::StaticArray) +function ChainRulesTestUtils.rand_tangent(rng::AbstractRNG, A::StaticArray) return map(x -> rand_tangent(rng, x), A) end -FiniteDifferences.rand_tangent(::AbstractRNG, ::Base.OneTo) = ZeroTangent() +ChainRulesTestUtils.rand_tangent(::AbstractRNG, ::Base.OneTo) = ZeroTangent() # Hacks to make rand_tangent play nicely with Zygote. -rand_zygote_tangent(A) = Zygote.wrap_chainrules_output(FiniteDifferences.rand_tangent(A)) +rand_zygote_tangent(A) = Zygote.wrap_chainrules_output(ChainRulesTestUtils.rand_tangent(A)) Zygote.wrap_chainrules_output(x::Array) = map(Zygote.wrap_chainrules_output, x) From 48d41de77bb01a7a4527e30d5f458001e1a240ab Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Fri, 22 Sep 2023 11:43:23 +0200 Subject: [PATCH 08/27] Bump compat for AbstractGPs --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 384b5931..ff1f4766 100644 --- a/Project.toml +++ b/Project.toml @@ -17,7 +17,7 @@ StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [compat] -AbstractGPs = "0.5.15" +AbstractGPs = "0.5.17" Bessels = "0.2.8" BlockDiagonals = "0.1.7" ChainRulesCore = "1" From de5a9216b4057c7dcf5553cdac68a141fe5ee53e Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Fri, 22 Sep 2023 11:47:04 +0200 Subject: [PATCH 09/27] Drop Julia 1.8 from tests --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9607f7aa..ada7a038 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,6 @@ jobs: matrix: version: - '1' - - '1.8' - '1.6' os: - ubuntu-latest From 283b2b74d5df93718f3d0c409c91abd33cfcee6e Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Fri, 22 Sep 2023 11:52:39 +0200 Subject: [PATCH 10/27] Remove disclaimer about dependencies --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index f794c680..035bd8db 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,6 @@ TemporalGPs.jl is a tool to make Gaussian processes (GPs) defined using [Abstrac [JuliaCon 2020 Talk](https://www.youtube.com/watch?v=dysmEpX1QoE) -# Dependency Status - -In the interest of managing expectations, please note that TemporalGPs does not currently operate with the most current version of AbstractGPs / Zygote / ChainRules. I (Will) am aware of this problem, and will sort it out as soon as I have the time! - # Installation TemporalGPs.jl is registered, so simply type the following at the REPL: From 7ecc7191636641b9df59fa6933728b330f6356f2 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Fri, 22 Sep 2023 16:45:28 +0200 Subject: [PATCH 11/27] Revert "Fix `rand_tangent` deprecation warnings" This reverts commit f846d58321fc34a4bb1c21f48273df732660fc67. --- test/test_util.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_util.jl b/test/test_util.jl index db00fe80..083f930a 100644 --- a/test/test_util.jl +++ b/test/test_util.jl @@ -661,14 +661,14 @@ Base.zero(::Reverse) = Reverse() _diag(x) = diag(x) _diag(x::Real) = x -function ChainRulesTestUtils.rand_tangent(rng::AbstractRNG, A::StaticArray) +function FiniteDifferences.rand_tangent(rng::AbstractRNG, A::StaticArray) return map(x -> rand_tangent(rng, x), A) end -ChainRulesTestUtils.rand_tangent(::AbstractRNG, ::Base.OneTo) = ZeroTangent() +FiniteDifferences.rand_tangent(::AbstractRNG, ::Base.OneTo) = ZeroTangent() # Hacks to make rand_tangent play nicely with Zygote. -rand_zygote_tangent(A) = Zygote.wrap_chainrules_output(ChainRulesTestUtils.rand_tangent(A)) +rand_zygote_tangent(A) = Zygote.wrap_chainrules_output(FiniteDifferences.rand_tangent(A)) Zygote.wrap_chainrules_output(x::Array) = map(Zygote.wrap_chainrules_output, x) From 4af932880ebaf46f4f210b877c81772da6ae5da4 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Tue, 26 Sep 2023 14:32:27 +0200 Subject: [PATCH 12/27] Try replacing chainrules by Zygote rules --- src/util/chainrules.jl | 44 ++++++------------------------------------ 1 file changed, 6 insertions(+), 38 deletions(-) diff --git a/src/util/chainrules.jl b/src/util/chainrules.jl index 80a3d4a4..9cc219cd 100644 --- a/src/util/chainrules.jl +++ b/src/util/chainrules.jl @@ -265,45 +265,13 @@ function Zygote._symmetric_back(Δ::SMatrix{N, N}, uplo) where {N} end end +Zygote._kron(x::AbstractMatrix, y::AbstractVector) = Zygote._kron(x, reshape(y, :, 1)) -function rrule(::typeof(kron), x::AbstractMatrix, y::AbstractVector) - z = kron(x, y) - - function kron_pullback(z̄) - x̄ = zero(x) - ȳ = zero(y) - m = firstindex(z̄) - @inbounds for j in axes(x,2), i in axes(x,1) - xij = x[i,j] - for k in eachindex(y) - x̄[i, j] += y[k] * z̄[m] - ȳ[k] += xij * z̄[m] - m += 1 - end - end - NoTangent(), x̄, ȳ - end - z, kron_pullback -end - -function rrule(::typeof(kron), x::AbstractVector, y::AbstractMatrix) - z = kron(x, y) - - function kron_pullback(z̄) - x̄ = zero(x) - ȳ = zero(y) - m = firstindex(z̄) - @inbounds for l in axes(y,2), i in eachindex(x) - xi = x[i] - for k in axes(y,1) - x̄[i] += y[k, l] * z̄[m] - ȳ[k, l] += xi * z̄[m] - m += 1 - end - end - NoTangent(), x̄, ȳ - end - z, kron_pullback +function Zygote._pullback( + cx::Zygote.AContext, ::typeof(kron), a::AbstractMatrix, b::AbstractVector +) + res, back = Zygote._pullback(cx, Zygote._kron, a, b) + return res, back ∘ Zygote.unthunk_tangent end # Temporary hacks. From 5f1d160d141e2ddd1d6a0b872e0cdeda5803d82d Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Wed, 27 Sep 2023 12:36:03 +0200 Subject: [PATCH 13/27] Bump Zygote and remove pirated rules --- Project.toml | 2 +- src/util/chainrules.jl | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Project.toml b/Project.toml index ff1f4766..f9f6a887 100644 --- a/Project.toml +++ b/Project.toml @@ -25,5 +25,5 @@ FillArrays = "0.13.0 - 0.13.7" KernelFunctions = "0.9, 0.10.1" StaticArrays = "1" StructArrays = "0.5, 0.6" -Zygote = "0.6" +Zygote = "0.6.65" julia = "1.6" diff --git a/src/util/chainrules.jl b/src/util/chainrules.jl index 9cc219cd..23bed859 100644 --- a/src/util/chainrules.jl +++ b/src/util/chainrules.jl @@ -265,15 +265,6 @@ function Zygote._symmetric_back(Δ::SMatrix{N, N}, uplo) where {N} end end -Zygote._kron(x::AbstractMatrix, y::AbstractVector) = Zygote._kron(x, reshape(y, :, 1)) - -function Zygote._pullback( - cx::Zygote.AContext, ::typeof(kron), a::AbstractMatrix, b::AbstractVector -) - res, back = Zygote._pullback(cx, Zygote._kron, a, b) - return res, back ∘ Zygote.unthunk_tangent -end - # Temporary hacks. using Zygote: literal_getproperty, literal_indexed_iterate, literal_getindex From 76f209d8c1020322791a5aca9179d45b9f5ab46b Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Wed, 27 Sep 2023 15:40:41 +0200 Subject: [PATCH 14/27] Implement changes re: `Symmetric` --- src/models/linear_gaussian_conditionals.jl | 2 +- src/util/chainrules.jl | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/models/linear_gaussian_conditionals.jl b/src/models/linear_gaussian_conditionals.jl index c342e943..39be3e8c 100644 --- a/src/models/linear_gaussian_conditionals.jl +++ b/src/models/linear_gaussian_conditionals.jl @@ -47,7 +47,7 @@ function predict(x::Gaussian, f::AbstractLGC) A, a, Q = get_fields(f) m, P = get_fields(x) # Symmetric wrapper needed for numerical stability. Do not unwrap. - return Gaussian(A * m + a, (A * symmetric(P)) * A' + Q) + return Gaussian(A * m + a, (A * P) * A' + Q) end """ diff --git a/src/util/chainrules.jl b/src/util/chainrules.jl index 23bed859..fe9e67eb 100644 --- a/src/util/chainrules.jl +++ b/src/util/chainrules.jl @@ -28,13 +28,6 @@ Zygote.accum(a::Tuple, b::Tuple, c::Tuple) = map(Zygote.accum, a, b, c) # StaticArrays # # ---------------------------------------------------------------------------- # -function ProjectTo(x::SArray{S,T}) where {S, T} - return ProjectTo{SArray}(; element=_eltype_projectto(T), axes=axes(x), static_size=S) -end - -(proj::ProjectTo{SArray})(dx::SArray) = SArray{proj.static_size}(dx.data) -(proj::ProjectTo{SArray})(dx::AbstractArray) = SArray{proj.static_size}(Tuple(dx)) - function rrule(::Type{T}, x::Tuple) where {T<:SArray} SArray_rrule(Δ) = begin (NoTangent(), Tangent{typeof(x)}(unthunk(Δ).data...)) From 8e3a4a31b3ec7d8433f8208978bccb1c5a12f5d0 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Wed, 27 Sep 2023 15:44:29 +0200 Subject: [PATCH 15/27] Update comment re: symmetric wrapper --- src/models/linear_gaussian_conditionals.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/models/linear_gaussian_conditionals.jl b/src/models/linear_gaussian_conditionals.jl index 39be3e8c..72fd1627 100644 --- a/src/models/linear_gaussian_conditionals.jl +++ b/src/models/linear_gaussian_conditionals.jl @@ -46,7 +46,9 @@ be equivalent to function predict(x::Gaussian, f::AbstractLGC) A, a, Q = get_fields(f) m, P = get_fields(x) - # Symmetric wrapper needed for numerical stability. Do not unwrap. + # Previously, there was a symmetric wrapper around `P` in the following line. + # It was removed to solve a performance problem with `Symmetric` around static + # arrays, with unclear implications on numerical stability. return Gaussian(A * m + a, (A * P) * A' + Q) end From 23a963823d5b2111fde1898715b1bd2c3a3eca3e Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Tue, 3 Oct 2023 20:17:05 +0200 Subject: [PATCH 16/27] Replace two-argument `map`s by broadcasts --- src/space_time/pseudo_point.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/space_time/pseudo_point.jl b/src/space_time/pseudo_point.jl index 6517e685..6bc42ef1 100644 --- a/src/space_time/pseudo_point.jl +++ b/src/space_time/pseudo_point.jl @@ -103,10 +103,11 @@ function kernel_diagonals(k::DTCSeparable, x::RegularInTime) space_kernel = k.k.l time_kernel = k.k.r time_vars = kernelmatrix_diag(time_kernel, get_times(x)) - return map( - (s_t, x_r) -> Diagonal(kernelmatrix_diag(space_kernel, x_r) * s_t), - time_vars, - x.vs, + return Diagonal.( + kernelmatrix_diag.( + Ref(space_kernel), + x.vs + ) .* time_vars ) end From 228f7f626dddcff81d95923ad18d1a1002be1912 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Tue, 3 Oct 2023 22:48:12 +0200 Subject: [PATCH 17/27] Make space-time examples smaller --- examples/approx_space_time_learning.jl | 2 +- examples/exact_space_time_learning.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/approx_space_time_learning.jl b/examples/approx_space_time_learning.jl index eeb68f6a..5052ad32 100644 --- a/examples/approx_space_time_learning.jl +++ b/examples/approx_space_time_learning.jl @@ -41,7 +41,7 @@ end # Also works with RectilinearGrids of inputs. # Times must be increasing, points in space can be anywhere. N = 50; -T = 1000; +T = 100; points_in_space = [randn(N) for _ in 1:T]; points_in_time = RegularSpacing(0.0, 0.1, T); x = RegularInTime(points_in_time, points_in_space); diff --git a/examples/exact_space_time_learning.jl b/examples/exact_space_time_learning.jl index 7971037a..58584aaa 100644 --- a/examples/exact_space_time_learning.jl +++ b/examples/exact_space_time_learning.jl @@ -39,7 +39,7 @@ end # Exact inference only works for such grids. # Times must be increasing, points in space can be anywhere. N = 50; -T = 1_000; +T = 100; points_in_space = collect(range(-3.0, 3.0; length=N)); points_in_time = RegularSpacing(0.0, 0.01, T); x = RectilinearGrid(points_in_space, points_in_time); @@ -73,7 +73,7 @@ final_params = unpack(training_results.minimizer) f_post = posterior(build_gp(final_params)(x, final_params.var_noise), y); # Specify some locations at which to make predictions. -T_pr = 1200; +T_pr = 120; points_in_time_pr = RegularSpacing(0.0, 0.01, T_pr); x_pr = RectilinearGrid(points_in_space, points_in_time_pr); From ce8690101abaad42cbb1219334ed57ba6d7222f8 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Tue, 3 Oct 2023 23:25:14 +0200 Subject: [PATCH 18/27] Further optimize performance --- src/space_time/pseudo_point.jl | 2 +- src/space_time/regular_in_time.jl | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/space_time/pseudo_point.jl b/src/space_time/pseudo_point.jl index 6bc42ef1..bcb90d5a 100644 --- a/src/space_time/pseudo_point.jl +++ b/src/space_time/pseudo_point.jl @@ -186,7 +186,7 @@ function lgssm_components(k_dtc::DTCSeparable, x::RegularInTime, storage::Storag C = \(K_space_z_chol, C__) Cs = partition(ChainRulesCore.ignore_derivatives(map(length, x.vs)), C) - cs = _map((h, v) -> fill(h, length(v)), hs_t, x.vs) # This should currently be zero. + cs = fill.(hs_t, length.(x.vs)) # This should currently be zero. Hs = _map( ((I, H_t), ) -> kron(I, H_t), zip(Fill(ident_M, N), Hs_t), diff --git a/src/space_time/regular_in_time.jl b/src/space_time/regular_in_time.jl index 67d51099..6e3ab960 100644 --- a/src/space_time/regular_in_time.jl +++ b/src/space_time/regular_in_time.jl @@ -24,7 +24,16 @@ function Base.collect(x::RegularInTime) return [(x, t) for (x, t) in zip(space_inputs, time_inputs)] end -Base.getindex(x::RegularInTime, n::Int) = collect(x)[n] +function Base.getindex(x::RegularInTime, n::Int) + n < 0 || throw(BoundsError(x, n)) + sum_of_lengths = 0 + for (i, v) in enumerate(x.vs) + temp = sum_of_lengths + length(v) + temp ≥ n && return (v[n - sum_of_lengths], x.ts[i]) + sum_of_lengths = temp + end + throw(BoundsError(x, n)) +end Base.show(io::IO, x::RegularInTime) = Base.show(io::IO, collect(x)) From f4bd059334db91a8771951e82817d09c4883c71e Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace <51025924+simsurace@users.noreply.github.com> Date: Tue, 3 Oct 2023 23:30:45 +0200 Subject: [PATCH 19/27] Correct logical typo --- src/space_time/regular_in_time.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/space_time/regular_in_time.jl b/src/space_time/regular_in_time.jl index 6e3ab960..b60eeee5 100644 --- a/src/space_time/regular_in_time.jl +++ b/src/space_time/regular_in_time.jl @@ -25,7 +25,7 @@ function Base.collect(x::RegularInTime) end function Base.getindex(x::RegularInTime, n::Int) - n < 0 || throw(BoundsError(x, n)) + n < 0 && throw(BoundsError(x, n)) sum_of_lengths = 0 for (i, v) in enumerate(x.vs) temp = sum_of_lengths + length(v) From 4062b4f00e5194dbdf7ae83d9ac6ed4d4ab71b8c Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Tue, 3 Oct 2023 23:35:38 +0200 Subject: [PATCH 20/27] Add tests and fix error --- src/space_time/regular_in_time.jl | 2 +- test/space_time/regular_in_time.jl | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/space_time/regular_in_time.jl b/src/space_time/regular_in_time.jl index b60eeee5..c3abac1b 100644 --- a/src/space_time/regular_in_time.jl +++ b/src/space_time/regular_in_time.jl @@ -25,7 +25,7 @@ function Base.collect(x::RegularInTime) end function Base.getindex(x::RegularInTime, n::Int) - n < 0 && throw(BoundsError(x, n)) + n ≤ 0 && throw(BoundsError(x, n)) sum_of_lengths = 0 for (i, v) in enumerate(x.vs) temp = sum_of_lengths + length(v) diff --git a/test/space_time/regular_in_time.jl b/test/space_time/regular_in_time.jl index 22a1fc86..2b98fe01 100644 --- a/test/space_time/regular_in_time.jl +++ b/test/space_time/regular_in_time.jl @@ -10,4 +10,7 @@ using TemporalGPs: RegularInTime @test prod(size(x)) == length(collect(x)) @test all([getindex(x, n) for n in 1:length(x)] .== collect(x)) + @test_throws BoundsError x[0] + @test_throws BoundsError x[-1] + @test_throws BoundsError x[length(x) + 1] end From 61c3d9ad28dc739c53f29fb1e3219e45e077a41f Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Tue, 3 Oct 2023 23:47:23 +0200 Subject: [PATCH 21/27] Put back symmetric wrapper --- src/models/linear_gaussian_conditionals.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/linear_gaussian_conditionals.jl b/src/models/linear_gaussian_conditionals.jl index 72fd1627..daaf0213 100644 --- a/src/models/linear_gaussian_conditionals.jl +++ b/src/models/linear_gaussian_conditionals.jl @@ -49,7 +49,7 @@ function predict(x::Gaussian, f::AbstractLGC) # Previously, there was a symmetric wrapper around `P` in the following line. # It was removed to solve a performance problem with `Symmetric` around static # arrays, with unclear implications on numerical stability. - return Gaussian(A * m + a, (A * P) * A' + Q) + return Gaussian(A * m + a, (A * symmetric(P)) * A' + Q) end """ From c974e4a417612a145c1e098df53a12a8b97af159 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Wed, 4 Oct 2023 00:03:50 +0200 Subject: [PATCH 22/27] Add some `@info` to example runs --- test/runtests.jl | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index c5ce381a..0620b706 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -110,11 +110,16 @@ if GROUP == "examples" Pkg.resolve() Pkg.instantiate() - include(joinpath(pkgpath, "examples", "exact_time_inference.jl")) - include(joinpath(pkgpath, "examples", "exact_time_learning.jl")) - include(joinpath(pkgpath, "examples", "exact_space_time_inference.jl")) - include(joinpath(pkgpath, "examples", "exact_space_time_learning.jl")) - include(joinpath(pkgpath, "examples", "approx_space_time_inference.jl")) - include(joinpath(pkgpath, "examples", "approx_space_time_learning.jl")) - include(joinpath(pkgpath, "examples", "augmented_inference.jl")) + function include_with_info(filename) + @info "Running examples/$filename" + include(joinpath(pkgpath, "examples", filename)) + end + + include_with_info("exact_time_inference.jl") + include_with_info("exact_time_learning.jl") + include_with_info("exact_space_time_inference.jl") + include_with_info("exact_space_time_learning.jl") + include_with_info("approx_space_time_inference.jl") + include_with_info("approx_space_time_learning.jl") + include_with_info("augmented_inference.jl") end From e2ddedd653df86a37e1a4d580fdbd66113152a46 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Wed, 4 Oct 2023 00:05:08 +0200 Subject: [PATCH 23/27] Name image files to not overwrite each other --- examples/approx_space_time_inference.jl | 2 +- examples/approx_space_time_learning.jl | 2 +- examples/augmented_inference.jl | 2 +- examples/exact_space_time_inference.jl | 2 +- examples/exact_space_time_learning.jl | 2 +- examples/exact_time_inference.jl | 2 +- examples/exact_time_learning.jl | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/approx_space_time_inference.jl b/examples/approx_space_time_inference.jl index e8ac4838..51f5d795 100644 --- a/examples/approx_space_time_inference.jl +++ b/examples/approx_space_time_inference.jl @@ -61,6 +61,6 @@ if get(ENV, "TESTING", "FALSE") == "FALSE" heatmap(reshape(σ_post_marginals, N_pr, T)); layout=(1, 2), ), - "posterior.png", + "approx_space_time_inference.png", ); end diff --git a/examples/approx_space_time_learning.jl b/examples/approx_space_time_learning.jl index 5052ad32..62a6d586 100644 --- a/examples/approx_space_time_learning.jl +++ b/examples/approx_space_time_learning.jl @@ -100,6 +100,6 @@ if get(ENV, "TESTING", "FALSE") == "FALSE" heatmap(reshape(σ_post_marginals, N_pr, T)); layout=(1, 2), ), - "posterior.png", + "approx_space_time_learning.png", ); end diff --git a/examples/augmented_inference.jl b/examples/augmented_inference.jl index 5f1acc62..a15b3bb6 100644 --- a/examples/augmented_inference.jl +++ b/examples/augmented_inference.jl @@ -73,5 +73,5 @@ if get(ENV, "TESTING", "FALSE") == "FALSE" plot!(plt, x_pr, f_post_samples; color=:red, alpha=0.3, label=""); plot!(plt, x, f_true; label="", lw=2.0, color=:blue); # Plot the true latent GP on top scatter!(plt, x, y; label="", markersize=1.0, alpha=1.0); # Plot the data - savefig(plt, "posterior.png"); + savefig(plt, "augmented_inference.png"); end diff --git a/examples/exact_space_time_inference.jl b/examples/exact_space_time_inference.jl index 8c329f39..b6045678 100644 --- a/examples/exact_space_time_inference.jl +++ b/examples/exact_space_time_inference.jl @@ -59,6 +59,6 @@ if get(ENV, "TESTING", "FALSE") == "FALSE" heatmap(reshape(σ_post_marginals, N, T_pr)); layout=(1, 2), ), - "posterior.png", + "exact_space_time_inference.png", ); end diff --git a/examples/exact_space_time_learning.jl b/examples/exact_space_time_learning.jl index 58584aaa..48b24ad6 100644 --- a/examples/exact_space_time_learning.jl +++ b/examples/exact_space_time_learning.jl @@ -93,6 +93,6 @@ if get(ENV, "TESTING", "FALSE") == "FALSE" heatmap(reshape(σ_post_marginals, N, T_pr)); layout=(1, 2), ), - "posterior.png", + "exact_space_time_learning.png", ); end diff --git a/examples/exact_time_inference.jl b/examples/exact_time_inference.jl index 37661be4..ad6a0d68 100644 --- a/examples/exact_time_inference.jl +++ b/examples/exact_time_inference.jl @@ -48,5 +48,5 @@ if get(ENV, "TESTING", "FALSE") == "FALSE" scatter!(plt, x, y; label="", markersize=0.1, alpha=0.1); plot!(plt, f_post(x_pr); ribbon_scale=3.0, label=""); plot!(x_pr, f_post_samples; color=:red, label=""); - savefig(plt, "posterior.png"); + savefig(plt, "exact_time_inference.png"); end diff --git a/examples/exact_time_learning.jl b/examples/exact_time_learning.jl index 64b79218..b4b05cb4 100644 --- a/examples/exact_time_learning.jl +++ b/examples/exact_time_learning.jl @@ -86,5 +86,5 @@ if get(ENV, "TESTING", "FALSE") == "FALSE" scatter!(plt, x, y; label="", markersize=0.1, alpha=0.1); plot!(plt, f_post(x_pr); ribbon_scale=3.0, label=""); plot!(plt, x_pr, f_post_samples; color=:red, label=""); - savefig(plt, "posterior.png"); + savefig(plt, "exact_time_learning.png"); end From ad05422865368a4e897eea9c9dd03d57a782cda4 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Wed, 4 Oct 2023 00:09:21 +0200 Subject: [PATCH 24/27] Revert "Update comment re: symmetric wrapper" This reverts commit 8e3a4a31b3ec7d8433f8208978bccb1c5a12f5d0. --- src/models/linear_gaussian_conditionals.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/models/linear_gaussian_conditionals.jl b/src/models/linear_gaussian_conditionals.jl index daaf0213..0b5fe798 100644 --- a/src/models/linear_gaussian_conditionals.jl +++ b/src/models/linear_gaussian_conditionals.jl @@ -46,9 +46,8 @@ be equivalent to function predict(x::Gaussian, f::AbstractLGC) A, a, Q = get_fields(f) m, P = get_fields(x) - # Previously, there was a symmetric wrapper around `P` in the following line. - # It was removed to solve a performance problem with `Symmetric` around static - # arrays, with unclear implications on numerical stability. + + # Symmetric wrapper needed for numerical stability. Do not unwrap. return Gaussian(A * m + a, (A * symmetric(P)) * A' + Q) end From 9286cca8f8564f74d583ed74679281071759e748 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Wed, 4 Oct 2023 00:09:28 +0200 Subject: [PATCH 25/27] Revert "Make space-time examples smaller" This reverts commit 228f7f626dddcff81d95923ad18d1a1002be1912. --- examples/approx_space_time_learning.jl | 2 +- examples/exact_space_time_learning.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/approx_space_time_learning.jl b/examples/approx_space_time_learning.jl index 62a6d586..ca007981 100644 --- a/examples/approx_space_time_learning.jl +++ b/examples/approx_space_time_learning.jl @@ -41,7 +41,7 @@ end # Also works with RectilinearGrids of inputs. # Times must be increasing, points in space can be anywhere. N = 50; -T = 100; +T = 1000; points_in_space = [randn(N) for _ in 1:T]; points_in_time = RegularSpacing(0.0, 0.1, T); x = RegularInTime(points_in_time, points_in_space); diff --git a/examples/exact_space_time_learning.jl b/examples/exact_space_time_learning.jl index 48b24ad6..b28a0066 100644 --- a/examples/exact_space_time_learning.jl +++ b/examples/exact_space_time_learning.jl @@ -39,7 +39,7 @@ end # Exact inference only works for such grids. # Times must be increasing, points in space can be anywhere. N = 50; -T = 100; +T = 1_000; points_in_space = collect(range(-3.0, 3.0; length=N)); points_in_time = RegularSpacing(0.0, 0.01, T); x = RectilinearGrid(points_in_space, points_in_time); @@ -73,7 +73,7 @@ final_params = unpack(training_results.minimizer) f_post = posterior(build_gp(final_params)(x, final_params.var_noise), y); # Specify some locations at which to make predictions. -T_pr = 120; +T_pr = 1200; points_in_time_pr = RegularSpacing(0.0, 0.01, T_pr); x_pr = RectilinearGrid(points_in_space, points_in_time_pr); From 7e0147ad1aa8faf536376f3f3a9383cb1561edf2 Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Wed, 4 Oct 2023 10:32:37 +0200 Subject: [PATCH 26/27] Get rid of warning about `params` --- examples/augmented_inference.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/augmented_inference.jl b/examples/augmented_inference.jl index a15b3bb6..206e587d 100644 --- a/examples/augmented_inference.jl +++ b/examples/augmented_inference.jl @@ -1,6 +1,6 @@ using AbstractGPs using TemporalGPs -using Distributions +using Distributions: Bernoulli using StatsFuns: logistic # In this example we are showing how to work with non-Gaussian likelihoods, From 07588b1d0c030d3ab3d95f1f9307f36669f7c66b Mon Sep 17 00:00:00 2001 From: Simone Carlo Surace Date: Wed, 4 Oct 2023 10:34:25 +0200 Subject: [PATCH 27/27] Decrease size of exact space-time learning --- examples/exact_space_time_learning.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/exact_space_time_learning.jl b/examples/exact_space_time_learning.jl index b28a0066..f9664ac3 100644 --- a/examples/exact_space_time_learning.jl +++ b/examples/exact_space_time_learning.jl @@ -39,7 +39,7 @@ end # Exact inference only works for such grids. # Times must be increasing, points in space can be anywhere. N = 50; -T = 1_000; +T = 500; points_in_space = collect(range(-3.0, 3.0; length=N)); points_in_time = RegularSpacing(0.0, 0.01, T); x = RectilinearGrid(points_in_space, points_in_time); @@ -73,7 +73,7 @@ final_params = unpack(training_results.minimizer) f_post = posterior(build_gp(final_params)(x, final_params.var_noise), y); # Specify some locations at which to make predictions. -T_pr = 1200; +T_pr = 600; points_in_time_pr = RegularSpacing(0.0, 0.01, T_pr); x_pr = RectilinearGrid(points_in_space, points_in_time_pr);