diff --git a/Project.toml b/Project.toml index a11eaf2..6d68a20 100644 --- a/Project.toml +++ b/Project.toml @@ -7,6 +7,7 @@ version = "0.6.1" ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" DifferentiableFrankWolfe = "b383313e-5450-4164-a800-befbd27b574d" +DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" RequiredInterfaces = "97f35ef4-7bc5-4ec1-a41a-dcc69c7308c6" @@ -25,6 +26,7 @@ InferOptFrankWolfeExt = "DifferentiableFrankWolfe" ChainRulesCore = "1" DensityInterface = "0.4.0" DifferentiableFrankWolfe = "0.2" +DocStringExtensions = "0.9" LinearAlgebra = "<0.0.1,1" Random = "<0.0.1,1" RequiredInterfaces = "0.1.3" diff --git a/README.md b/README.md index 6075fd3..331ac4d 100644 --- a/README.md +++ b/README.md @@ -12,20 +12,20 @@ InferOpt.jl is a toolbox for using combinatorial optimization algorithms within machine learning pipelines. It allows you to create differentiable layers from optimization oracles that do not have meaningful derivatives. -Typical examples include mixed integer linear programs or graph algorithms. +Typical examples include mixed integer linear programs or graph algorithms, but any discrete function is compatible. ## Getting started To install the stable version, open a Julia REPL and run the following command: ```julia -julia> using Pkg; Pkg.add("InferOpt") +julia> import Pkg; Pkg.add("InferOpt") ``` To install the development version, run this command instead: ```julia -julia> using Pkg; Pkg.add(url="https://github.com/axelparmentier/InferOpt.jl") +julia> import Pkg; Pkg.add(url="https://github.com/axelparmentier/InferOpt.jl") ``` ## Citing us diff --git a/docs/Manifest.toml b/docs/Manifest.toml index afedcf6..a7619cd 100644 --- a/docs/Manifest.toml +++ b/docs/Manifest.toml @@ -1,8 +1,8 @@ # This file is machine-generated - editing it directly is not advised -julia_version = "1.9.4" +julia_version = "1.10.0" manifest_format = "2.0" -project_hash = "62c6c2d871b6216a78a27ec0b4dd2c53f1dc4f4f" +project_hash = "e8ee63b10db2c3c9dd45599a54ceebfa2c1cc58e" [[deps.ANSIColoredPrinters]] git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c" @@ -87,11 +87,28 @@ git-tree-sha1 = "aebf55e6d7795e02ca500a689d326ac979aaf89e" uuid = "9718e550-a3fa-408a-8086-8db961cd8217" version = "0.1.1" +[[deps.BitFlags]] +git-tree-sha1 = "2dc09997850d68179b69dafb58ae806167a32b1b" +uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35" +version = "0.1.8" + +[[deps.Bzip2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9e2a6b69137e6969bab0152632dcb3bc108c8bdd" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.8+1" + [[deps.CEnum]] git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" version = "0.5.0" +[[deps.Cairo_jll]] +deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2" +uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" +version = "1.16.1+1" + [[deps.Calculus]] deps = ["LinearAlgebra"] git-tree-sha1 = "f641eb0a4f00c343bbc32346e1217b86f3ce9dad" @@ -100,15 +117,15 @@ version = "0.5.1" [[deps.ChainRules]] deps = ["Adapt", "ChainRulesCore", "Compat", "Distributed", "GPUArraysCore", "IrrationalConstants", "LinearAlgebra", "Random", "RealDot", "SparseArrays", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] -git-tree-sha1 = "006cc7170be3e0fa02ccac6d4164a1eee1fc8c27" +git-tree-sha1 = "0aa0a3dd7b9bacbbadf1932ccbdfa938985c5561" uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" -version = "1.58.0" +version = "1.58.1" [[deps.ChainRulesCore]] deps = ["Compat", "LinearAlgebra"] -git-tree-sha1 = "e0af648f0692ec1691b5d094b8724ba1346281cf" +git-tree-sha1 = "c1deebd76f7a443d527fc0430d5758b8b2112ed8" uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" -version = "1.18.0" +version = "1.19.1" weakdeps = ["SparseArrays"] [deps.ChainRulesCore.extensions] @@ -120,6 +137,12 @@ git-tree-sha1 = "c0216e792f518b39b22212127d4a84dc31e4e386" uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" version = "1.3.5" +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "cd67fc487743b2f0fd4380d4cbd3a24660d0eec8" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.3" + [[deps.ColorSchemes]] deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "PrecompileTools", "Random"] git-tree-sha1 = "67c1f244b991cad9b0aa4b7540fb758c2488b129" @@ -155,10 +178,10 @@ uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" version = "0.3.0" [[deps.Compat]] -deps = ["UUIDs"] -git-tree-sha1 = "886826d76ea9e72b35fcd000e535588f7b60f21d" +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "75bd5b6fc5089df449b5d35fa501c846c9b6549b" uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" -version = "4.10.1" +version = "4.12.0" weakdeps = ["Dates", "LinearAlgebra"] [deps.Compat.extensions] @@ -167,7 +190,7 @@ weakdeps = ["Dates", "LinearAlgebra"] [[deps.CompilerSupportLibraries_jll]] deps = ["Artifacts", "Libdl"] uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" -version = "1.0.5+0" +version = "1.0.5+1" [[deps.CompositionsBase]] git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" @@ -178,6 +201,12 @@ weakdeps = ["InverseFunctions"] [deps.CompositionsBase.extensions] CompositionsBaseInverseFunctionsExt = "InverseFunctions" +[[deps.ConcurrentUtilities]] +deps = ["Serialization", "Sockets"] +git-tree-sha1 = "8cfa272e8bdedfa88b6aefbbca7c19f1befac519" +uuid = "f0e56b4a-5159-44fe-b623-3e5288b988bb" +version = "2.3.0" + [[deps.ConstructionBase]] deps = ["LinearAlgebra"] git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" @@ -215,9 +244,9 @@ version = "1.15.0" [[deps.DataStructures]] deps = ["Compat", "InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "3dbd312d370723b6bb43ba9d02fc36abade4518d" +git-tree-sha1 = "ac67408d9ddf207de5cfa9a97e114352430f01ed" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.18.15" +version = "0.18.16" [[deps.DataValueInterfaces]] git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" @@ -284,12 +313,36 @@ git-tree-sha1 = "5837a837389fccf076445fce071c8ddaea35a566" uuid = "fa6b7ba4-c1ee-5f82-b5fc-ecf0adba8f74" version = "0.6.8" +[[deps.EpollShim_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8e9441ee83492030ace98f9789a654a6d0b1f643" +uuid = "2702e6a9-849d-5ed8-8c21-79e8b8f9ee43" +version = "0.0.20230411+0" + +[[deps.ExceptionUnwrapping]] +deps = ["Test"] +git-tree-sha1 = "dcb08a0d93ec0b1cdc4af184b26b591e9695423a" +uuid = "460bff9d-24e4-43bc-9d9f-a8973cb893f4" +version = "0.1.10" + [[deps.Expat_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "4558ab818dcceaab612d1bb8c19cee87eda2b83c" uuid = "2e619515-83b5-522b-bb60-26c02a35a201" version = "2.5.0+0" +[[deps.FFMPEG]] +deps = ["FFMPEG_jll"] +git-tree-sha1 = "b57e3acbe22f8484b4b5ff66a7499717fe1a9cc8" +uuid = "c87230d0-a227-11e9-1b43-d7ebe4e7570a" +version = "0.4.1" + +[[deps.FFMPEG_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "PCRE2_jll", "Zlib_jll", "libaom_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"] +git-tree-sha1 = "466d45dc38e15794ec7d5d63ec03d776a9aff36e" +uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5" +version = "4.4.4+1" + [[deps.FLoops]] deps = ["BangBang", "Compat", "FLoopsBase", "InitialValues", "JuliaVariables", "MLStyle", "Serialization", "Setfield", "Transducers"] git-tree-sha1 = "ffb97765602e3cbe59a0589d237bf07f245a8576" @@ -319,9 +372,9 @@ version = "0.8.4" [[deps.Flux]] deps = ["Adapt", "ChainRulesCore", "Compat", "Functors", "LinearAlgebra", "MLUtils", "MacroTools", "NNlib", "OneHotArrays", "Optimisers", "Preferences", "ProgressLogging", "Random", "Reexport", "SparseArrays", "SpecialFunctions", "Statistics", "Zygote"] -git-tree-sha1 = "75e3b3732929e880e7fd121e8a4e4dd5e1bfeaee" +git-tree-sha1 = "2827339fbc2291d541a9c62ffbf28da7f3621ae4" uuid = "587475ba-b771-5e3f-ad9e-33799f191a9c" -version = "0.14.7" +version = "0.14.9" [deps.Flux.extensions] FluxAMDGPUExt = "AMDGPU" @@ -335,6 +388,18 @@ version = "0.14.7" Metal = "dde4c033-4e86-420c-a63e-0dd931031962" cuDNN = "02a925ec-e4fe-4b08-9a7e-0d78e3d38ccd" +[[deps.Fontconfig_jll]] +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Pkg", "Zlib_jll"] +git-tree-sha1 = "21efd19106a55620a188615da6d3d06cd7f6ee03" +uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" +version = "2.13.93+0" + +[[deps.Formatting]] +deps = ["Printf"] +git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8" +uuid = "59287772-0a20-5a39-b81b-1366585eb4c0" +version = "0.4.2" + [[deps.ForwardDiff]] deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" @@ -345,6 +410,18 @@ weakdeps = ["StaticArrays"] [deps.ForwardDiff.extensions] ForwardDiffStaticArraysExt = "StaticArrays" +[[deps.FreeType2_jll]] +deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "d8db6a5a2fe1381c1ea4ef2cab7c69c2de7f9ea0" +uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" +version = "2.13.1+0" + +[[deps.FriBidi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "aa31987c2ba8704e23c6c8ba8a4f769d5d7e4f91" +uuid = "559328eb-81f9-559d-9380-de523a88c83c" +version = "1.0.10+0" + [[deps.Functors]] deps = ["LinearAlgebra"] git-tree-sha1 = "9a68d75d466ccc1218d0552a8e1631151c569545" @@ -355,6 +432,12 @@ version = "0.4.5" deps = ["Random"] uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" +[[deps.GLFW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"] +git-tree-sha1 = "ff38ba61beff76b8f4acad8ab0c97ef73bb670cb" +uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89" +version = "3.3.9+0" + [[deps.GPUArrays]] deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"] git-tree-sha1 = "85d7fb51afb3def5dcb85ad31c3707795c8bccc1" @@ -367,6 +450,24 @@ git-tree-sha1 = "2d6ca471a6c7b536127afccfa7564b5b39227fe0" uuid = "46192b85-c4d5-4398-a991-12ede77f4527" version = "0.1.5" +[[deps.GR]] +deps = ["Artifacts", "Base64", "DelimitedFiles", "Downloads", "GR_jll", "HTTP", "JSON", "Libdl", "LinearAlgebra", "Pkg", "Preferences", "Printf", "Random", "Serialization", "Sockets", "TOML", "Tar", "Test", "UUIDs", "p7zip_jll"] +git-tree-sha1 = "27442171f28c952804dede8ff72828a96f2bfc1f" +uuid = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71" +version = "0.72.10" + +[[deps.GR_jll]] +deps = ["Artifacts", "Bzip2_jll", "Cairo_jll", "FFMPEG_jll", "Fontconfig_jll", "FreeType2_jll", "GLFW_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libtiff_jll", "Pixman_jll", "Qt6Base_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "025d171a2847f616becc0f84c8dc62fe18f0f6dd" +uuid = "d2c73de3-f751-5644-a686-071e5b155ba9" +version = "0.72.10+0" + +[[deps.Gettext_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "9b02998aba7bf074d14de89f9d37ca24a1a0b046" +uuid = "78b55507-aeef-58d4-861c-77aaff3498b1" +version = "0.21.0+0" + [[deps.Git]] deps = ["Git_jll"] git-tree-sha1 = "51764e6c2e84c37055e846c516e9015b4a291c7d" @@ -375,9 +476,21 @@ version = "1.3.0" [[deps.Git_jll]] deps = ["Artifacts", "Expat_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Libiconv_jll", "OpenSSL_jll", "PCRE2_jll", "Zlib_jll"] -git-tree-sha1 = "bb8f7cc77ec1152414b2af6db533d9471cfbb2d1" +git-tree-sha1 = "b30c473c97fcc1e1e44fab8f3e88fd1b89c9e9d1" uuid = "f8c6e375-362e-5223-8a59-34ff63f689eb" -version = "2.42.0+0" +version = "2.43.0+0" + +[[deps.Glib_jll]] +deps = ["Artifacts", "Gettext_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "e94c92c7bf4819685eb80186d51c43e71d4afa17" +uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" +version = "2.76.5+0" + +[[deps.Graphite2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "344bf40dcab1073aca04aa0df4fb092f920e4011" +uuid = "3b182d85-2403-5c21-9c21-1e1f0cc25472" +version = "1.3.14+0" [[deps.Graphs]] deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] @@ -391,6 +504,23 @@ git-tree-sha1 = "84145cbcffc84c0d60099c6ac7c989885139bf09" uuid = "dd2b58c7-5af7-4f17-9e46-57c68ac813fb" version = "0.10.0" +[[deps.Grisu]] +git-tree-sha1 = "53bb909d1151e57e2484c3d1b53e19552b887fb2" +uuid = "42e2da0e-8278-4e71-bc24-59509adca0fe" +version = "1.0.2" + +[[deps.HTTP]] +deps = ["Base64", "CodecZlib", "ConcurrentUtilities", "Dates", "ExceptionUnwrapping", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"] +git-tree-sha1 = "abbbb9ec3afd783a7cbd82ef01dcd088ea051398" +uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3" +version = "1.10.1" + +[[deps.HarfBuzz_jll]] +deps = ["Artifacts", "Cairo_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "Graphite2_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg"] +git-tree-sha1 = "129acf094d168394e80ee1dc4bc06ec835e510a3" +uuid = "2e76f6c2-a576-52d4-95c1-20adfe4de566" +version = "2.8.1+1" + [[deps.HypergeometricFunctions]] deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] git-tree-sha1 = "f218fe3736ddf977e0e772bc9a586b2383da2685" @@ -410,7 +540,7 @@ uuid = "7869d1d1-7146-5819-86e3-90919afe41df" version = "0.4.11" [[deps.InferOpt]] -deps = ["ChainRulesCore", "DensityInterface", "LinearAlgebra", "Random", "RequiredInterfaces", "Statistics", "StatsBase", "StatsFuns", "ThreadsX"] +deps = ["ChainRulesCore", "DensityInterface", "DocStringExtensions", "LinearAlgebra", "Random", "RequiredInterfaces", "Statistics", "StatsBase", "StatsFuns", "ThreadsX"] path = ".." uuid = "4846b161-c94e-4150-8dac-c7ae193c601f" version = "0.6.1" @@ -451,6 +581,12 @@ git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" uuid = "82899510-4779-5014-852e-03e436cf321d" version = "1.0.0" +[[deps.JLFzf]] +deps = ["Pipe", "REPL", "Random", "fzf_jll"] +git-tree-sha1 = "a53ebe394b71470c7f97c2e7e170d51df21b17af" +uuid = "1019f520-868f-41f5-a6de-eb00f4b6a39c" +version = "0.1.7" + [[deps.JLLWrappers]] deps = ["Artifacts", "Preferences"] git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" @@ -463,11 +599,17 @@ git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" version = "0.21.4" +[[deps.JpegTurbo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "60b1194df0a3298f460063de985eae7b01bc011a" +uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" +version = "3.0.1+0" + [[deps.JuliaInterpreter]] deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] -git-tree-sha1 = "e49bce680c109bc86e3e75ebcb15040d6ad9e1d3" +git-tree-sha1 = "04663b9e1eb0d0eabf76a6d0752e0dac83d53b36" uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" -version = "0.9.27" +version = "0.9.28" [[deps.JuliaVariables]] deps = ["MLStyle", "NameResolution"] @@ -477,9 +619,9 @@ version = "0.2.4" [[deps.KernelAbstractions]] deps = ["Adapt", "Atomix", "InteractiveUtils", "LinearAlgebra", "MacroTools", "PrecompileTools", "Requires", "SparseArrays", "StaticArrays", "UUIDs", "UnsafeAtomics", "UnsafeAtomicsLLVM"] -git-tree-sha1 = "81de11f7b02465435aab0ed7e935965bfcb3072b" +git-tree-sha1 = "4e0cb2f5aad44dcfdc91088e85dee4ecb22c791c" uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" -version = "0.9.14" +version = "0.9.16" [deps.KernelAbstractions.extensions] EnzymeExt = "EnzymeCore" @@ -487,11 +629,23 @@ version = "0.9.14" [deps.KernelAbstractions.weakdeps] EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" +[[deps.LAME_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "f6250b16881adf048549549fba48b1161acdac8c" +uuid = "c1c5ebd0-6772-5130-a774-d5fcae4a789d" +version = "3.100.1+0" + +[[deps.LERC_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bf36f528eec6634efc60d7ec062008f171071434" +uuid = "88015f11-f218-50d7-93a8-a6af411a945d" +version = "3.0.0+1" + [[deps.LLVM]] deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Preferences", "Printf", "Requires", "Unicode"] -git-tree-sha1 = "0678579657515e88b6632a3a482d39adcbb80445" +git-tree-sha1 = "cb4619f7353fc62a1a22ffa3d7ed9791cfb47ad8" uuid = "929cbde3-209d-540e-8aea-75f648917ca0" -version = "6.4.1" +version = "6.4.2" [deps.LLVM.extensions] BFloat16sExt = "BFloat16s" @@ -505,6 +659,37 @@ git-tree-sha1 = "98eaee04d96d973e79c25d49167668c5c8fb50e2" uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" version = "0.0.27+1" +[[deps.LLVMOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "d986ce2d884d49126836ea94ed5bfb0f12679713" +uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" +version = "15.0.7+0" + +[[deps.LZO_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "e5b909bcf985c5e2605737d2ce278ed791b89be6" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.1+0" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "50901ebc375ed41dbf8058da26f9de442febbbec" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.3.1" + +[[deps.Latexify]] +deps = ["Formatting", "InteractiveUtils", "LaTeXStrings", "MacroTools", "Markdown", "OrderedCollections", "Printf", "Requires"] +git-tree-sha1 = "f428ae552340899a935973270b8d98e5a31c49fe" +uuid = "23fbe1c1-3f47-55db-b15f-69d7ec21a316" +version = "0.16.1" + + [deps.Latexify.extensions] + DataFramesExt = "DataFrames" + SymEngineExt = "SymEngine" + + [deps.Latexify.weakdeps] + DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" + SymEngine = "123dc426-2d89-5057-bbad-38513e3affd8" + [[deps.LazilyInitializedFields]] git-tree-sha1 = "8f7f3cabab0fd1800699663533b6d5cb3fc0e612" uuid = "0e77f7df-68c5-4e49-93ce-4cd80f5598bf" @@ -525,9 +710,14 @@ uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" version = "8.4.0+0" [[deps.LibGit2]] -deps = ["Base64", "NetworkOptions", "Printf", "SHA"] +deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"] uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.6.4+0" + [[deps.LibSSH2_jll]] deps = ["Artifacts", "Libdl", "MbedTLS_jll"] uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" @@ -536,21 +726,63 @@ version = "1.11.0+1" [[deps.Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +[[deps.Libffi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "0b4a5d71f3e5200a7dff793393e09dfc2d874290" +uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" +version = "3.2.2+1" + +[[deps.Libgcrypt_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgpg_error_jll", "Pkg"] +git-tree-sha1 = "64613c82a59c120435c067c2b809fc61cf5166ae" +uuid = "d4300ac3-e22c-5743-9152-c294e39db1e4" +version = "1.8.7+0" + +[[deps.Libglvnd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "6f73d1dd803986947b2c750138528a999a6c7733" +uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" +version = "1.6.0+0" + +[[deps.Libgpg_error_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "c333716e46366857753e273ce6a69ee0945a6db9" +uuid = "7add5ba3-2f88-524e-9cd5-f83b8a55f7b8" +version = "1.42.0+0" + [[deps.Libiconv_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] git-tree-sha1 = "f9557a255370125b405568f9767d6d195822a175" uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" version = "1.17.0+0" +[[deps.Libmount_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "9c30530bf0effd46e15e0fdcf2b8636e78cbbd73" +uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" +version = "2.35.0+0" + +[[deps.Libtiff_jll]] +deps = ["Artifacts", "JLLWrappers", "JpegTurbo_jll", "LERC_jll", "Libdl", "XZ_jll", "Zlib_jll", "Zstd_jll"] +git-tree-sha1 = "2da088d113af58221c52828a80378e16be7d037a" +uuid = "89763e89-9b03-5906-acba-b20f662cd828" +version = "4.5.1+1" + +[[deps.Libuuid_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "7f3efec06033682db852f8b3bc3c1d2b0a0ab066" +uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" +version = "2.36.0+0" + [[deps.LinearAlgebra]] deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" [[deps.Literate]] deps = ["Base64", "IOCapture", "JSON", "REPL"] -git-tree-sha1 = "7cf4b8ca67b6a86a2ad7526bfe514ecd00d944f9" +git-tree-sha1 = "bad26f1ccd99c553886ec0725e99a509589dcd11" uuid = "98b081ad-f1c9-55d3-8b20-4c87d4299306" -version = "2.16.0" +version = "2.16.1" [[deps.LogExpFunctions]] deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] @@ -571,11 +803,17 @@ version = "0.3.26" [[deps.Logging]] uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +[[deps.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.0.3" + [[deps.LoweredCodeUtils]] deps = ["JuliaInterpreter"] -git-tree-sha1 = "0b8cf121228f7dae022700c1c11ac1f04122f384" +git-tree-sha1 = "38756922d32476c8f41f73560b910fc805a5a103" uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b" -version = "2.3.2" +version = "2.4.3" [[deps.MLStyle]] git-tree-sha1 = "bc38dff0548128765760c79eb7388a4b37fae2c8" @@ -584,15 +822,15 @@ version = "0.4.17" [[deps.MLUtils]] deps = ["ChainRulesCore", "Compat", "DataAPI", "DelimitedFiles", "FLoops", "NNlib", "Random", "ShowCases", "SimpleTraits", "Statistics", "StatsBase", "Tables", "Transducers"] -git-tree-sha1 = "3504cdb8c2bc05bde4d4b09a81b01df88fcbbba0" +git-tree-sha1 = "b45738c2e3d0d402dffa32b2c1654759a2ac35a4" uuid = "f1d291b0-491e-4a28-83b9-f70985020b54" -version = "0.4.3" +version = "0.4.4" [[deps.MacroTools]] deps = ["Markdown", "Random"] -git-tree-sha1 = "9ee1618cbf5240e6d4e0371d6f24065083f60c48" +git-tree-sha1 = "2fa9ee3e63fd3a4f7a9a4f4744a52f4856de82df" uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" -version = "0.5.11" +version = "0.5.13" [[deps.MarchingCubes]] deps = ["PrecompileTools", "StaticArrays"] @@ -610,10 +848,21 @@ git-tree-sha1 = "465a70f0fc7d443a00dcdc3267a497397b8a3899" uuid = "d0879d2d-cac2-40c8-9cee-1863dc0c7391" version = "0.1.2" +[[deps.MbedTLS]] +deps = ["Dates", "MbedTLS_jll", "MozillaCACerts_jll", "NetworkOptions", "Random", "Sockets"] +git-tree-sha1 = "c067a280ddc25f196b5e7df3877c6b226d390aaf" +uuid = "739be429-bea8-5141-9913-cc70e7f3736d" +version = "1.1.9" + [[deps.MbedTLS_jll]] deps = ["Artifacts", "Libdl"] uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" -version = "2.28.2+0" +version = "2.28.2+1" + +[[deps.Measures]] +git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102" +uuid = "442fdcdd-2543-5da2-b0f3-8c86c306513e" +version = "0.3.2" [[deps.MicroCollections]] deps = ["BangBang", "InitialValues", "Setfield"] @@ -632,13 +881,13 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804" [[deps.MozillaCACerts_jll]] uuid = "14a3606d-f60d-562e-9121-12d972cd8159" -version = "2022.10.11" +version = "2023.1.10" [[deps.NNlib]] deps = ["Adapt", "Atomix", "ChainRulesCore", "GPUArraysCore", "KernelAbstractions", "LinearAlgebra", "Pkg", "Random", "Requires", "Statistics"] -git-tree-sha1 = "ac86d2944bf7a670ac8bf0f7ec099b5898abcc09" +git-tree-sha1 = "900a11b3a2b02e36b25cb55a80777d4a4670f0f6" uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" -version = "0.9.8" +version = "0.9.10" [deps.NNlib.extensions] NNlibAMDGPUExt = "AMDGPU" @@ -668,6 +917,12 @@ version = "0.1.5" uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" version = "1.2.0" +[[deps.Ogg_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "887579a3eb005446d514ab7aeac5d1d027658b8f" +uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051" +version = "1.3.5+1" + [[deps.OneHotArrays]] deps = ["Adapt", "ChainRulesCore", "Compat", "GPUArraysCore", "LinearAlgebra", "NNlib"] git-tree-sha1 = "5e4029759e8699ec12ebdf8721e51a659443403c" @@ -677,12 +932,18 @@ version = "0.2.4" [[deps.OpenBLAS_jll]] deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" -version = "0.3.21+4" +version = "0.3.23+2" [[deps.OpenLibm_jll]] deps = ["Artifacts", "Libdl"] uuid = "05823500-19ac-5b8b-9628-191a04bc5112" -version = "0.8.1+0" +version = "0.8.1+2" + +[[deps.OpenSSL]] +deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"] +git-tree-sha1 = "51901a49222b09e3743c65b8847687ae5fc78eb2" +uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c" +version = "1.4.1" [[deps.OpenSSL_jll]] deps = ["Artifacts", "JLLWrappers", "Libdl"] @@ -702,6 +963,12 @@ git-tree-sha1 = "34205b1204cc83c43cd9cfe53ffbd3b310f6e8c5" uuid = "3bd65402-5787-11e9-1adc-39752487f4e2" version = "0.3.1" +[[deps.Opus_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "51a08fb14ec28da2ec7a927c4337e4332c2a4720" +uuid = "91d4177d-7536-5919-b921-800302f37372" +version = "1.3.2+0" + [[deps.OrderedCollections]] git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" @@ -710,18 +977,61 @@ version = "1.6.3" [[deps.PCRE2_jll]] deps = ["Artifacts", "Libdl"] uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" -version = "10.42.0+0" +version = "10.42.0+1" [[deps.Parsers]] deps = ["Dates", "PrecompileTools", "UUIDs"] -git-tree-sha1 = "a935806434c9d4c506ba941871b327b96d41f2bf" +git-tree-sha1 = "8489905bcdbcfac64d1daa51ca07c0d8f0283821" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "2.8.0" +version = "2.8.1" + +[[deps.Pipe]] +git-tree-sha1 = "6842804e7867b115ca9de748a0cf6b364523c16d" +uuid = "b98c9c47-44ae-5843-9183-064241ee97a0" +version = "1.3.0" + +[[deps.Pixman_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] +git-tree-sha1 = "64779bc4c9784fee475689a1752ef4d5747c5e87" +uuid = "30392449-352a-5448-841d-b1acce4e97dc" +version = "0.42.2+0" [[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" +version = "1.10.0" + +[[deps.PlotThemes]] +deps = ["PlotUtils", "Statistics"] +git-tree-sha1 = "1f03a2d339f42dca4a4da149c7e15e9b896ad899" +uuid = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a" +version = "3.1.0" + +[[deps.PlotUtils]] +deps = ["ColorSchemes", "Colors", "Dates", "PrecompileTools", "Printf", "Random", "Reexport", "Statistics"] +git-tree-sha1 = "862942baf5663da528f66d24996eb6da85218e76" +uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043" +version = "1.4.0" + +[[deps.Plots]] +deps = ["Base64", "Contour", "Dates", "Downloads", "FFMPEG", "FixedPointNumbers", "GR", "JLFzf", "JSON", "LaTeXStrings", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "PrecompileTools", "Preferences", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "RelocatableFolders", "Requires", "Scratch", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs", "UnicodeFun", "UnitfulLatexify", "Unzip"] +git-tree-sha1 = "ccee59c6e48e6f2edf8a5b64dc817b6729f99eb5" +uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" +version = "1.39.0" + + [deps.Plots.extensions] + FileIOExt = "FileIO" + GeometryBasicsExt = "GeometryBasics" + IJuliaExt = "IJulia" + ImageInTerminalExt = "ImageInTerminal" + UnitfulExt = "Unitful" + + [deps.Plots.weakdeps] + FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" + GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" + IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a" + ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [[deps.PrecompileTools]] deps = ["Preferences"] @@ -756,12 +1066,18 @@ git-tree-sha1 = "00099623ffee15972c16111bcf84c58a0051257c" uuid = "92933f4c-e287-5a05-a399-4b506db050ca" version = "1.9.0" +[[deps.Qt6Base_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Fontconfig_jll", "Glib_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "OpenSSL_jll", "Vulkan_Loader_jll", "Xorg_libSM_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Xorg_libxcb_jll", "Xorg_xcb_util_cursor_jll", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_keysyms_jll", "Xorg_xcb_util_renderutil_jll", "Xorg_xcb_util_wm_jll", "Zlib_jll", "libinput_jll", "xkbcommon_jll"] +git-tree-sha1 = "37b7bb7aabf9a085e0044307e1717436117f2b3b" +uuid = "c0090381-4147-56d7-9ebc-da0b1113ec56" +version = "6.5.3+1" + [[deps.REPL]] deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" [[deps.Random]] -deps = ["SHA", "Serialization"] +deps = ["SHA"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[deps.RealDot]] @@ -770,6 +1086,18 @@ git-tree-sha1 = "9f0a1b71baaf7650f4fa8a1d168c7fb6ee41f0c9" uuid = "c1ae055f-0cd5-4b69-90a6-9a35b1a98df9" version = "0.1.0" +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.RecipesPipeline]] +deps = ["Dates", "NaNMath", "PlotUtils", "PrecompileTools", "RecipesBase"] +git-tree-sha1 = "45cf9fd0ca5839d06ef333c8201714e888486342" +uuid = "01d81517-befc-4cb6-b9ec-a95719d0359c" +version = "0.6.12" + [[deps.Reexport]] git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" uuid = "189a3867-3050-52da-a836-e630ba90ab69" @@ -777,9 +1105,9 @@ version = "1.2.2" [[deps.Referenceables]] deps = ["Adapt"] -git-tree-sha1 = "e681d3bfa49cd46c3c161505caddf20f0e62aaa9" +git-tree-sha1 = "02d31ad62838181c1a3a5fd23a1ce5914a643601" uuid = "42d2dcc6-99eb-4e98-b66c-637b7d73030e" -version = "0.1.2" +version = "0.1.3" [[deps.RegistryInstances]] deps = ["LazilyInitializedFields", "Pkg", "TOML", "Tar"] @@ -787,6 +1115,12 @@ git-tree-sha1 = "ffd19052caf598b8653b99404058fce14828be51" uuid = "2792f1a3-b283-48e8-9a74-f99dce5104f3" version = "0.1.0" +[[deps.RelocatableFolders]] +deps = ["SHA", "Scratch"] +git-tree-sha1 = "ffdaf70d81cf6ff22c2b6e733c900c3321cab864" +uuid = "05181044-ff0b-4ac5-8273-598c1e38db00" +version = "1.0.1" + [[deps.RequiredInterfaces]] deps = ["InteractiveUtils", "Logging", "Test"] git-tree-sha1 = "deb5b451248bbe5ce37cb639a546ac13d07b791f" @@ -801,9 +1135,9 @@ version = "1.3.0" [[deps.Revise]] deps = ["CodeTracking", "Distributed", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "Pkg", "REPL", "Requires", "UUIDs", "Unicode"] -git-tree-sha1 = "6990168abf3fe9a6e34ebb0e05aaaddf6572189e" +git-tree-sha1 = "3fe4e5b9cdbb9bbc851c57b149e516acc07f8f72" uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" -version = "3.5.10" +version = "3.5.13" [[deps.Rmath]] deps = ["Random", "Rmath_jll"] @@ -821,6 +1155,12 @@ version = "0.4.0+0" uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" version = "0.7.0" +[[deps.Scratch]] +deps = ["Dates"] +git-tree-sha1 = "3bac05bc7e74a75fd9cba4295cde4045d9fe2386" +uuid = "6c6a2e73-6563-6170-7368-637461726353" +version = "1.2.1" + [[deps.Serialization]] uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" @@ -839,6 +1179,17 @@ git-tree-sha1 = "7f534ad62ab2bd48591bdeac81994ea8c445e4a5" uuid = "605ecd9f-84a6-4c9e-81e2-4798472b76a3" version = "0.1.0" +[[deps.Showoff]] +deps = ["Dates", "Grisu"] +git-tree-sha1 = "91eddf657aca81df9ae6ceb20b959ae5653ad1de" +uuid = "992d4aef-0814-514b-bc4d-f2e9a6c4116f" +version = "1.0.3" + +[[deps.SimpleBufferStream]] +git-tree-sha1 = "874e8867b33a00e784c8a7e4b60afe9e037b74e1" +uuid = "777ac1f9-54b0-4bf8-805c-2214025038e7" +version = "1.1.0" + [[deps.SimpleTraits]] deps = ["InteractiveUtils", "MacroTools"] git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" @@ -850,19 +1201,20 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc" [[deps.SortingAlgorithms]] deps = ["DataStructures"] -git-tree-sha1 = "5165dfb9fd131cf0c6957a3a7605dede376e7b63" +git-tree-sha1 = "66e0a8e672a0bdfca2c3f5937efb8538b9ddc085" uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" -version = "1.2.0" +version = "1.2.1" [[deps.SparseArrays]] deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" [[deps.SparseInverseSubset]] deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] -git-tree-sha1 = "91402087fd5d13b2d97e3ef29bbdf9d7859e678a" +git-tree-sha1 = "52962839426b75b3021296f7df242e40ecfc0852" uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" -version = "0.1.1" +version = "0.1.2" [[deps.SpecialFunctions]] deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] @@ -882,12 +1234,13 @@ version = "0.1.15" [[deps.StaticArrays]] deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] -git-tree-sha1 = "5ef59aea6f18c25168842bded46b16662141ab87" +git-tree-sha1 = "f68dd04d131d9a8a8eb836173ee8f105c360b0c5" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "1.7.0" -weakdeps = ["Statistics"] +version = "1.9.1" +weakdeps = ["ChainRulesCore", "Statistics"] [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" StaticArraysStatisticsExt = "Statistics" [[deps.StaticArraysCore]] @@ -898,7 +1251,7 @@ version = "1.4.2" [[deps.Statistics]] deps = ["LinearAlgebra", "SparseArrays"] uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -version = "1.9.0" +version = "1.10.0" [[deps.StatsAPI]] deps = ["LinearAlgebra"] @@ -934,9 +1287,9 @@ deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" [[deps.SuiteSparse_jll]] -deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" -version = "5.10.1+6" +version = "7.2.1+1" [[deps.TOML]] deps = ["Dates"] @@ -976,11 +1329,20 @@ git-tree-sha1 = "34e6bcf36b9ed5d56489600cf9f3c16843fa2aa2" uuid = "ac1d9e8a-700a-412c-b207-f0111f4b6c0d" version = "0.1.11" +[[deps.TranscodingStreams]] +git-tree-sha1 = "1fbeaaca45801b4ba17c251dd8603ef24801dd84" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.10.2" +weakdeps = ["Random", "Test"] + + [deps.TranscodingStreams.extensions] + TestExt = ["Test", "Random"] + [[deps.Transducers]] deps = ["Adapt", "ArgCheck", "BangBang", "Baselet", "CompositionsBase", "ConstructionBase", "DefineSingletons", "Distributed", "InitialValues", "Logging", "Markdown", "MicroCollections", "Requires", "Setfield", "SplittablesBase", "Tables"] -git-tree-sha1 = "e579d3c991938fecbb225699e8f611fa3fbf2141" +git-tree-sha1 = "3064e780dbb8a9296ebb3af8f440f787bb5332af" uuid = "28d57a85-8fef-5791-bfe6-a80928e7c999" -version = "0.4.79" +version = "0.4.80" [deps.Transducers.extensions] TransducersBlockArraysExt = "BlockArrays" @@ -996,6 +1358,11 @@ version = "0.4.79" OnlineStatsBase = "925886fa-5bf2-5e8e-b522-a9147a512338" Referenceables = "42d2dcc6-99eb-4e98-b66c-637b7d73030e" +[[deps.URIs]] +git-tree-sha1 = "67db6cc7b3821e19ebe75791a9dd19c9b1188f2b" +uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" +version = "1.5.1" + [[deps.UUIDs]] deps = ["Random", "SHA"] uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" @@ -1003,11 +1370,17 @@ uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" [[deps.Unicode]] uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +[[deps.UnicodeFun]] +deps = ["REPL"] +git-tree-sha1 = "53915e50200959667e78a92a418594b428dffddf" +uuid = "1cfade01-22cf-5700-b092-accc4b62d6e1" +version = "0.4.1" + [[deps.UnicodePlots]] deps = ["ColorSchemes", "ColorTypes", "Contour", "Crayons", "Dates", "LinearAlgebra", "MarchingCubes", "NaNMath", "PrecompileTools", "Printf", "Requires", "SparseArrays", "StaticArrays", "StatsBase"] -git-tree-sha1 = "b96de03092fe4b18ac7e4786bee55578d4b75ae8" +git-tree-sha1 = "92032ca730338662506bb3d0eb562375faf6c06a" uuid = "b8865327-cd53-5732-bb35-84acbb429228" -version = "3.6.0" +version = "3.6.3" [deps.UnicodePlots.extensions] FreeTypeExt = ["FileIO", "FreeType"] @@ -1024,6 +1397,23 @@ version = "3.6.0" Term = "22787eb5-b846-44ae-b979-8e399b8463ab" Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" +[[deps.Unitful]] +deps = ["Dates", "LinearAlgebra", "Random"] +git-tree-sha1 = "3c793be6df9dd77a0cf49d80984ef9ff996948fa" +uuid = "1986cc42-f94f-5a68-af5c-568840ba703d" +version = "1.19.0" +weakdeps = ["ConstructionBase", "InverseFunctions"] + + [deps.Unitful.extensions] + ConstructionBaseUnitfulExt = "ConstructionBase" + InverseFunctionsUnitfulExt = "InverseFunctions" + +[[deps.UnitfulLatexify]] +deps = ["LaTeXStrings", "Latexify", "Unitful"] +git-tree-sha1 = "e2d817cc500e960fdbafcf988ac8436ba3208bfd" +uuid = "45397f5d-5981-4c77-b2b3-fc36d6e9b728" +version = "1.6.3" + [[deps.UnsafeAtomics]] git-tree-sha1 = "6331ac3440856ea1988316b46045303bef658278" uuid = "013be700-e6cd-48c3-b4a1-df204f14c38f" @@ -1035,16 +1425,207 @@ git-tree-sha1 = "323e3d0acf5e78a56dfae7bd8928c989b4f3083e" uuid = "d80eeb9a-aca5-4d75-85e5-170c8b632249" version = "0.1.3" +[[deps.Unzip]] +git-tree-sha1 = "ca0969166a028236229f63514992fc073799bb78" +uuid = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d" +version = "0.2.0" + +[[deps.Vulkan_Loader_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Wayland_jll", "Xorg_libX11_jll", "Xorg_libXrandr_jll", "xkbcommon_jll"] +git-tree-sha1 = "2f0486047a07670caad3a81a075d2e518acc5c59" +uuid = "a44049a8-05dd-5a78-86c9-5fde0876e88c" +version = "1.3.243+0" + +[[deps.Wayland_jll]] +deps = ["Artifacts", "EpollShim_jll", "Expat_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Pkg", "XML2_jll"] +git-tree-sha1 = "7558e29847e99bc3f04d6569e82d0f5c54460703" +uuid = "a2964d1f-97da-50d4-b82a-358c7fce9d89" +version = "1.21.0+1" + +[[deps.Wayland_protocols_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "93f43ab61b16ddfb2fd3bb13b3ce241cafb0e6c9" +uuid = "2381bf8a-dfd0-557d-9999-79630e7b1b91" +version = "1.31.0+0" + +[[deps.XML2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] +git-tree-sha1 = "801cbe47eae69adc50f36c3caec4758d2650741b" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.12.2+0" + +[[deps.XSLT_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libgcrypt_jll", "Libgpg_error_jll", "Libiconv_jll", "Pkg", "XML2_jll", "Zlib_jll"] +git-tree-sha1 = "91844873c4085240b95e795f692c4cec4d805f8a" +uuid = "aed1982a-8fda-507f-9586-7b0439959a61" +version = "1.1.34+0" + +[[deps.XZ_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "522b8414d40c4cbbab8dee346ac3a09f9768f25d" +uuid = "ffd25f8a-64ca-5728-b0f7-c24cf3aae800" +version = "5.4.5+0" + +[[deps.Xorg_libICE_jll]] +deps = ["Libdl", "Pkg"] +git-tree-sha1 = "e5becd4411063bdcac16be8b66fc2f9f6f1e8fe5" +uuid = "f67eecfb-183a-506d-b269-f58e52b52d7c" +version = "1.0.10+1" + +[[deps.Xorg_libSM_jll]] +deps = ["Libdl", "Pkg", "Xorg_libICE_jll"] +git-tree-sha1 = "4a9d9e4c180e1e8119b5ffc224a7b59d3a7f7e18" +uuid = "c834827a-8449-5923-a945-d239c165b7dd" +version = "1.2.3+0" + +[[deps.Xorg_libX11_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "afead5aba5aa507ad5a3bf01f58f82c8d1403495" +uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" +version = "1.8.6+0" + +[[deps.Xorg_libXau_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6035850dcc70518ca32f012e46015b9beeda49d8" +uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" +version = "1.0.11+0" + +[[deps.Xorg_libXcursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXfixes_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "12e0eb3bc634fa2080c1c37fccf56f7c22989afd" +uuid = "935fb764-8cf2-53bf-bb30-45bb1f8bf724" +version = "1.2.0+4" + +[[deps.Xorg_libXdmcp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "34d526d318358a859d7de23da945578e8e8727b7" +uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" +version = "1.1.4+0" + +[[deps.Xorg_libXext_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "b7c0aa8c376b31e4852b360222848637f481f8c3" +uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" +version = "1.3.4+4" + +[[deps.Xorg_libXfixes_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "0e0dc7431e7a0587559f9294aeec269471c991a4" +uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" +version = "5.0.3+4" + +[[deps.Xorg_libXi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXfixes_jll"] +git-tree-sha1 = "89b52bc2160aadc84d707093930ef0bffa641246" +uuid = "a51aa0fd-4e3c-5386-b890-e753decda492" +version = "1.7.10+4" + +[[deps.Xorg_libXinerama_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll"] +git-tree-sha1 = "26be8b1c342929259317d8b9f7b53bf2bb73b123" +uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" +version = "1.1.4+4" + +[[deps.Xorg_libXrandr_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "34cea83cb726fb58f325887bf0612c6b3fb17631" +uuid = "ec84b674-ba8e-5d96-8ba1-2a689ba10484" +version = "1.5.2+4" + +[[deps.Xorg_libXrender_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libX11_jll"] +git-tree-sha1 = "19560f30fd49f4d4efbe7002a1037f8c43d43b96" +uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" +version = "0.9.10+4" + +[[deps.Xorg_libpthread_stubs_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "8fdda4c692503d44d04a0603d9ac0982054635f9" +uuid = "14d82f49-176c-5ed1-bb49-ad3f5cbd8c74" +version = "0.1.1+0" + +[[deps.Xorg_libxcb_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "XSLT_jll", "Xorg_libXau_jll", "Xorg_libXdmcp_jll", "Xorg_libpthread_stubs_jll"] +git-tree-sha1 = "b4bfde5d5b652e22b9c790ad00af08b6d042b97d" +uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" +version = "1.15.0+0" + +[[deps.Xorg_libxkbfile_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "730eeca102434283c50ccf7d1ecdadf521a765a4" +uuid = "cc61e674-0454-545c-8b26-ed2c68acab7a" +version = "1.1.2+0" + +[[deps.Xorg_xcb_util_cursor_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xcb_util_image_jll", "Xorg_xcb_util_jll", "Xorg_xcb_util_renderutil_jll"] +git-tree-sha1 = "04341cb870f29dcd5e39055f895c39d016e18ccd" +uuid = "e920d4aa-a673-5f3a-b3d7-f755a4d47c43" +version = "0.1.4+0" + +[[deps.Xorg_xcb_util_image_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "0fab0a40349ba1cba2c1da699243396ff8e94b97" +uuid = "12413925-8142-5f55-bb0e-6d7ca50bb09b" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_libxcb_jll"] +git-tree-sha1 = "e7fd7b2881fa2eaa72717420894d3938177862d1" +uuid = "2def613f-5ad1-5310-b15b-b15d46f528f5" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_keysyms_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "d1151e2c45a544f32441a567d1690e701ec89b00" +uuid = "975044d2-76e6-5fbe-bf08-97ce7c6574c7" +version = "0.4.0+1" + +[[deps.Xorg_xcb_util_renderutil_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "dfd7a8f38d4613b6a575253b3174dd991ca6183e" +uuid = "0d47668e-0667-5a69-a72c-f761630bfb7e" +version = "0.3.9+1" + +[[deps.Xorg_xcb_util_wm_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Xorg_xcb_util_jll"] +git-tree-sha1 = "e78d10aab01a4a154142c5006ed44fd9e8e31b67" +uuid = "c22f9ab0-d5fe-5066-847c-f4bb1cd4e361" +version = "0.4.1+1" + +[[deps.Xorg_xkbcomp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxkbfile_jll"] +git-tree-sha1 = "330f955bc41bb8f5270a369c473fc4a5a4e4d3cb" +uuid = "35661453-b289-5fab-8a00-3d9160c6a3a4" +version = "1.4.6+0" + +[[deps.Xorg_xkeyboard_config_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_xkbcomp_jll"] +git-tree-sha1 = "691634e5453ad362044e2ad653e79f3ee3bb98c3" +uuid = "33bec58e-1273-512f-9401-5d533626f822" +version = "2.39.0+0" + +[[deps.Xorg_xtrans_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "e92a1a012a10506618f10b7047e478403a046c77" +uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" +version = "1.5.0+0" + [[deps.Zlib_jll]] deps = ["Libdl"] uuid = "83775a58-1f1d-513f-b197-d71354ab007a" -version = "1.2.13+0" +version = "1.2.13+1" + +[[deps.Zstd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "49ce682769cd5de6c72dcf1b94ed7790cd08974c" +uuid = "3161d3a3-bdf6-5164-811a-617609db77b4" +version = "1.5.5+0" [[deps.Zygote]] deps = ["AbstractFFTs", "ChainRules", "ChainRulesCore", "DiffRules", "Distributed", "FillArrays", "ForwardDiff", "GPUArrays", "GPUArraysCore", "IRTools", "InteractiveUtils", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "PrecompileTools", "Random", "Requires", "SparseArrays", "SpecialFunctions", "Statistics", "ZygoteRules"] -git-tree-sha1 = "5ded212acd815612df112bb895ef3910c5a03f57" +git-tree-sha1 = "30c1b8bfc2b3c7c5d8bba7cd32e8b6d5f968e7c3" uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" -version = "0.6.67" +version = "0.6.68" [deps.Zygote.extensions] ZygoteColorsExt = "Colors" @@ -1058,14 +1639,80 @@ version = "0.6.67" [[deps.ZygoteRules]] deps = ["ChainRulesCore", "MacroTools"] -git-tree-sha1 = "9d749cd449fb448aeca4feee9a2f4186dbb5d184" +git-tree-sha1 = "27798139afc0a2afa7b1824c206d5e87ea587a00" uuid = "700de1a5-db45-46bc-99cf-38207098b444" -version = "0.2.4" +version = "0.2.5" + +[[deps.eudev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "gperf_jll"] +git-tree-sha1 = "431b678a28ebb559d224c0b6b6d01afce87c51ba" +uuid = "35ca27e7-8b34-5b7f-bca9-bdc33f59eb06" +version = "3.2.9+0" + +[[deps.fzf_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "a68c9655fbe6dfcab3d972808f1aafec151ce3f8" +uuid = "214eeab7-80f7-51ab-84ad-2988db7cef09" +version = "0.43.0+0" + +[[deps.gperf_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3516a5630f741c9eecb3720b1ec9d8edc3ecc033" +uuid = "1a1c6b14-54f6-533d-8383-74cd7377aa70" +version = "3.1.1+0" + +[[deps.libaom_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "3a2ea60308f0996d26f1e5354e10c24e9ef905d4" +uuid = "a4ae2306-e953-59d6-aa16-d00cac43593b" +version = "3.4.0+0" + +[[deps.libass_jll]] +deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "HarfBuzz_jll", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "5982a94fcba20f02f42ace44b9894ee2b140fe47" +uuid = "0ac62f75-1d6f-5e53-bd7c-93b484bb37c0" +version = "0.15.1+0" [[deps.libblastrampoline_jll]] deps = ["Artifacts", "Libdl"] uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" -version = "5.8.0+0" +version = "5.8.0+1" + +[[deps.libevdev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "141fe65dc3efabb0b1d5ba74e91f6ad26f84cc22" +uuid = "2db6ffa8-e38f-5e21-84af-90c45d0032cc" +version = "1.11.0+0" + +[[deps.libfdk_aac_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "daacc84a041563f965be61859a36e17c4e4fcd55" +uuid = "f638f0a6-7fb0-5443-88ba-1cc74229b280" +version = "2.0.2+0" + +[[deps.libinput_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "eudev_jll", "libevdev_jll", "mtdev_jll"] +git-tree-sha1 = "ad50e5b90f222cfe78aa3d5183a20a12de1322ce" +uuid = "36db933b-70db-51c0-b978-0f229ee0e533" +version = "1.18.0+0" + +[[deps.libpng_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "93284c28274d9e75218a416c65ec49d0e0fcdf3d" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.40+0" + +[[deps.libvorbis_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Ogg_jll", "Pkg"] +git-tree-sha1 = "b910cb81ef3fe6e78bf6acee440bda86fd6ae00c" +uuid = "f27f6e37-5d2b-51aa-960f-b287f2bc3b7a" +version = "1.3.7+1" + +[[deps.mtdev_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "814e154bdb7be91d78b6802843f76b6ece642f11" +uuid = "009596ad-96f7-51b1-9f1b-5ce2d5e8a71e" +version = "1.1.6+0" [[deps.nghttp2_jll]] deps = ["Artifacts", "Libdl"] @@ -1075,4 +1722,22 @@ version = "1.52.0+1" [[deps.p7zip_jll]] deps = ["Artifacts", "Libdl"] uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" -version = "17.4.0+0" +version = "17.4.0+2" + +[[deps.x264_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "4fea590b89e6ec504593146bf8b988b2c00922b2" +uuid = "1270edf5-f2f9-52d2-97e9-ab00b5d0237a" +version = "2021.5.5+0" + +[[deps.x265_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "ee567a171cce03570d77ad3a43e90218e38937a9" +uuid = "dfaa095f-4041-5dcd-9319-2fabd8486b76" +version = "3.5.0+0" + +[[deps.xkbcommon_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Wayland_jll", "Wayland_protocols_jll", "Xorg_libxcb_jll", "Xorg_xkeyboard_config_jll"] +git-tree-sha1 = "9c304562909ab2bab0262639bd4f444d7bc2be37" +uuid = "d8fb68d0-12a3-5cfd-a85a-d49703b185fd" +version = "1.4.1+1" diff --git a/docs/Project.toml b/docs/Project.toml index 4a9624d..aa5825d 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -2,12 +2,14 @@ AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c" +ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" GridGraphs = "dd2b58c7-5af7-4f17-9e46-57c68ac813fb" InferOpt = "4846b161-c94e-4150-8dac-c7ae193c601f" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306" +Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" diff --git a/docs/make.jl b/docs/make.jl index 83c3208..60691ee 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -23,9 +23,15 @@ end # Parse test/tutorial.jl into docs/src/tutorial.md (overwriting) -tuto_jl_file = joinpath(dirname(@__DIR__), "examples", "tutorial.jl") +tutorial_directory = "examples" +tutorial_files = readdir(tutorial_directory) +tutorial_names = [first(split(file, ".")) for file in tutorial_files] tuto_md_dir = joinpath(@__DIR__, "src") -Literate.markdown(tuto_jl_file, tuto_md_dir; documenter=true, execute=false) + +for name in tutorial_names + tuto_jl_file = joinpath(dirname(@__DIR__), tutorial_directory, "$name.jl") + Literate.markdown(tuto_jl_file, tuto_md_dir; documenter=true, execute=false) +end makedocs(; modules=[InferOpt], @@ -40,15 +46,17 @@ makedocs(; ), pages=[ "Home" => "index.md", - "Background" => "background.md", - "Examples" => ["tutorial.md", "advanced_applications.md"], - "Algorithms" => ["optim.md", "losses.md"], + "background.md", + "Tutorials" => ["basics.md", "tutorial.md", "advanced_applications.md"], # ! hardcoded? + "Algorithms" => ["choosetherighttool.md", "optim.md", "losses.md"], "API reference" => "api.md", ], ) -for file in - [joinpath(@__DIR__, "src", "index.md"), joinpath(@__DIR__, "src", "tutorial.md")] +for file in vcat( + joinpath(tuto_md_dir, "index.md"), + [joinpath(tuto_md_dir, "$name.md") for name in tutorial_names], +) rm(file) end diff --git a/docs/src/api.md b/docs/src/api.md index c95c58e..dfbfe24 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -4,22 +4,99 @@ InferOpt ``` -## Types +## Generic optimization layers +```@docs +PerturbedAdditive +PerturbedMultiplicative +PerturbedOracle +RegularizedFrankWolfe +``` + +## Problem specific optimization layers +```@docs +SoftArgmax +SparseArgmax +SoftRank +SoftSort +IdentityRelaxation +Interpolation +``` + +## Losses +```@docs +FenchelYoungLoss +SPOPlusLoss +StructuredSVMLoss +ImitationLoss +Pushforward +``` + +## Generalized maximizer +```@docs +GeneralizedMaximizer +``` + +## Public abstract interfaces +```@docs +AbstractRegularized +AbstractRegularizedGeneralizedMaximizer +``` + +## Function versions of specific layers +```@docs +soft_argmax +sparse_argmax +soft_rank +soft_sort +InferOpt.ZeroOneImitationLoss +InferOpt.ZeroOneStructuredSVMLoss +``` + +## Internals + +### Types ```@autodocs Modules = [InferOpt] -Order = [:type] +Public = false +Order = [:type] ``` -## Functions +### Miscellaneous +```@docs +FixedAtomsProbabilityDistribution +``` +### Functions ```@autodocs Modules = [InferOpt] -Order = [:function] +Public = false +Order = [:function] +``` + +## Is exported but should be private? + +```@docs +soft_rank_kl +soft_rank_l2 +soft_sort_kl +soft_sort_l2 +half_square_norm +negative_shannon_entropy +compute_expectation +objective_value +one_hot_argmax +ranking +shannon_entropy +compute_probability_distribution(::InferOpt.AbstractPerturbed, ::AbstractArray) +compute_probability_distribution +compute_probability_distribution(::Pushforward, ::Any) +get_y_true(::NamedTuple) +get_y_true ``` ## Index ```@index Modules = [InferOpt] -``` \ No newline at end of file +``` diff --git a/docs/src/background.md b/docs/src/background.md index a7e3e5c..b6400c6 100644 --- a/docs/src/background.md +++ b/docs/src/background.md @@ -1,18 +1,24 @@ -# Background +# Introduction -The goal of InferOpt.jl is to make machine learning pipelines more expressive by incorporating combinatorial optimization layers. +The goal of InferOpt.jl is to provide tools to use discrete functions into machine learning pipelines. -## How the math works +### How the math works -Consider the following combinatorial optimization problem: +Consider the following combinatorial optimization oracle: ```math - f\colon \theta \longmapsto \arg \max_{v \in \mathcal{V}} \theta^\top v + f\colon \theta \longmapsto \arg \max_{y \in \mathcal{Y}} g(y, \theta) ``` -where $\mathcal{V} \subset \mathbb{R}^d$ is a finite set of feasible solutions, and $\theta$ is an objective vector. -Note that any linear program (LP) or mixed integer linear program (MILP) can be formulated this way. +where $\mathcal{Y} \subset \mathbb{R}^d$ is a finite set of feasible solutions, $\theta$ is a vector input parameter, and $g$ is a scalar function. -Unfortunately, the optimal solution $f(\theta)$ is a piecewise constant function of $\theta$, which means its derivative is either zero or undefined. -Starting with an oracle for $f$, InferOpt.jl approximates it with a differentiable "layer", whose derivatives convey meaningful slope information. +!!! example + Note that many discrete functions can be formulated this way. For instance: + - The regular argmax function. + - Ranking or sorting a vector. + - Optimization algorithms over graphs, such as shortest paths algorithms. + - Linear program (LP) or mixed integer linear program (MILP). + +Unfortunately, the optimal solution $f(\theta)$ is often a piecewise constant function of $\theta$, which means its derivative is either zero or undefined. +Starting from a given oracle for $f$, InferOpt.jl approximates it with a differentiable "layer", whose derivatives convey meaningful slope information. Such a layer can then be used within a machine learning pipeline, and gradient descent will succeed. InferOpt.jl also provides adequate loss functions for structured learning. @@ -29,11 +35,32 @@ For a broader perspective on the interactions between machine learning and combi !!! note "Reference" [End-to-end Constrained Optimization Learning: A Survey](https://arxiv.org/abs/2103.16378) -## How the code works +### How the code works Since we want our package to be as generic as possible, we don't make any assumptions on the oracle used for $f$. That way, the best solver can be selected for each use case. We only ask the user to provide a black box function called `maximizer`, taking $\theta$ as argument and returning $f(\theta)$. This function is then wrapped into a callable Julia `struct`, which can be used (for instance) within neural networks from the [Flux.jl](https://github.com/FluxML/Flux.jl) or [Lux.jl](https://github.com/LuxDL/Lux.jl) library. -To achieve this compatibility, we leverage Julia's automatic differentiation (AD) ecosystem, which revolves around the [ChainRules.jl](https://github.com/JuliaDiff/ChainRules.jl) package. \ No newline at end of file +To achieve this compatibility, we leverage Julia's automatic differentiation (AD) ecosystem, which revolves around the [ChainRules.jl](https://github.com/JuliaDiff/ChainRules.jl) package. + +### Using InferOpt in machine learning applications + +InferOpt can be used to make machine learning pipelines more expressive by incorporating combinatorial optimization layers. + +Typically, a Combinatorial Optimization algorithm can be put as the last layer of a Machine Learning pipeline, after a statistical model (e.g. a neural network). +This gives discrete structured outputs, which enables several applications such as: +- Using an argmax layer instead of a softmax +- Learning to rank/learning to rank +- Multilabel classification +- Pathfinding on a map from an image + +### Using InferOpt in combinatorial optimization applications + +InferOpt has been mostly used to help solve hard variants of well-known combinatorial optimization problems. + +For instance, it can be used for: +- Stochastic vehicle scheduling +- Multi-stage dynamic vehicle routing +- Two-stage minimum weight spanning tree +- Single machine scheduling diff --git a/docs/src/choosetherighttool.md b/docs/src/choosetherighttool.md new file mode 100644 index 0000000..658c4aa --- /dev/null +++ b/docs/src/choosetherighttool.md @@ -0,0 +1,3 @@ +# Choosing the right tool + +The goal of this page is to help you choose the right tool for your application. diff --git a/examples/basics.jl b/examples/basics.jl new file mode 100644 index 0000000..492bd05 --- /dev/null +++ b/examples/basics.jl @@ -0,0 +1,51 @@ +# # Basics: differentiating through argmax + +#= +In this first tutorial, we show how to levarage InferOpt's features in order to compute +meaningfull derivatives of a very simple function: `argmax`. + +Given a vector of float ``\theta``, the `argmax` method returns the index of the maximum value of ``\theta``: +=# +θ = [3.0, 3.1, 1.0] +argmax(θ) +# We can use the [`Zygote`](https://fluxml.ai/Zygote.jl/stable/) backward automatic differentiation library to try to differentiate through it +using Zygote +@show Zygote.gradient(argmax, θ) +# Zygote gradient is not defined 🙁. Let' try with [`ForwardDiff`](https://juliadiff.org/ForwardDiff.jl/stable/) instead: +using ForwardDiff +ForwardDiff.gradient(argmax, θ) +# Gradients are 0. That's expected, here is the argmax value when the second component changes: +using Plots +plot(x -> argmax([3.0, x, 1.0]), 1:0.01:5; xlabel="θ₂") +# Argmax is a discrete function, and is piecewise constant, therefore gradients are zero almost everywhere, which is not very useful in practice. +# This is where InferOpt can be used to smooth it and retrieve informative gradients. + +# ## Differentiating through a black-box + +# One tool that is very generic and can be used to differentiate through any discrte function +# are the [`InferOpt.AbstractPerturbed`](@ref) wrappers. The most common one is the [`PerturbedAdditive`](@ref), +# which can be used by wrapping the function you want to differentiate as follows: +using InferOpt: PerturbedAdditive +perturbed_argmax = PerturbedAdditive(argmax; ε=0.25, nb_samples=100000, seed=0) +# The resulting `perturbed_argmax` object is callable with the same arguments as the original function: +perturbed_argmax(θ) +# We can see that its output is continuous, unlike the original argmax function. The discontinuities are smoothed out: +plot(x -> argmax([3.0, x, 1.0]), 1:0.01:5; label="argmax", xlabel="θ₂") +plot!(x -> perturbed_argmax([3.0, x, 1.0]); label="perturbed argmax") +# Let's try to compute gradients: +Zygote.gradient(perturbed_argmax, θ)[1] +# Now it works, they are non zero ! +plot(x -> argmax([3.0, x, 1.0]), 1:0.01:5; label="argmax", xlabel="θ₂") +plot!(x -> perturbed_argmax([3.0, x, 1.0]); label="perturbed argmax") +plot!(x -> Zygote.gradient(perturbed_argmax, [3.0, x, 1.0])[1][2]; label="gradient") + +# This `perturbed_argmax` layer can now be used for instance inside a machine learning +# pipeline for multiclass classification instead of the usual softmax layer. + +# ## Math behind the implementation + +# TODO + +# ## Specific implementations for the argmax function + +# [`sparse_argmax`](@ref) and [`soft_argmax`](@ref) diff --git a/src/InferOpt.jl b/src/InferOpt.jl index 4d62096..0e36b34 100644 --- a/src/InferOpt.jl +++ b/src/InferOpt.jl @@ -1,15 +1,17 @@ """ InferOpt -A toolbox for using combinatorial optimization algorithms within machine learning pipelines. +$README -See our preprint +# Exported names +$EXPORTS """ module InferOpt using ChainRulesCore: ChainRulesCore, NoTangent, RuleConfig, Tangent, ZeroTangent using ChainRulesCore: rrule, rrule_via_ad, unthunk using DensityInterface: logdensityof +using DocStringExtensions using LinearAlgebra: dot using Random: AbstractRNG, GLOBAL_RNG, MersenneTwister, rand, seed! using Statistics: mean diff --git a/src/imitation/fenchel_young_loss.jl b/src/imitation/fenchel_young_loss.jl index d82c104..1b1ce56 100644 --- a/src/imitation/fenchel_young_loss.jl +++ b/src/imitation/fenchel_young_loss.jl @@ -1,5 +1,5 @@ """ - FenchelYoungLoss <: AbstractLossLayer +$TYPEDEF Fenchel-Young loss associated with a given optimization layer. ``` @@ -9,10 +9,10 @@ L(θ, y_true) = (Ω(y_true) - θᵀy_true) - (Ω(ŷ) - θᵀŷ) Reference: # Fields - -- `optimization_layer::AbstractOptimizationLayer`: optimization layer that can be formulated as `ŷ(θ) = argmax {θᵀy - Ω(y)}` (either regularized or perturbed) +$TYPEDFIELDS """ struct FenchelYoungLoss{O<:AbstractOptimizationLayer} <: AbstractLossLayer + "optimization layer that can be formulated as `ŷ(θ) = argmax {θᵀy - Ω(y)}` (either regularized or perturbed)" optimization_layer::O end @@ -24,7 +24,7 @@ end ## Forward pass """ - (fyl::FenchelYoungLoss)(θ, y_true[; kwargs...]) + (fyl::$FUNCTIONNAME)(θ, y_true[; kwargs...]) """ function (fyl::FenchelYoungLoss)(θ::AbstractArray, y_true::AbstractArray; kwargs...) l, _ = fenchel_young_loss_and_grad(fyl, θ, y_true; kwargs...) diff --git a/src/imitation/imitation_loss.jl b/src/imitation/imitation_loss.jl index 9f4ee71..16c491f 100644 --- a/src/imitation/imitation_loss.jl +++ b/src/imitation/imitation_loss.jl @@ -1,5 +1,5 @@ """ - ImitationLoss <: AbstractLossLayer +$TYPEDEF Generic imitation loss of the form ``` @@ -12,16 +12,16 @@ L(θ, t_true) = max_y {δ(y, t_true) + α θᵀ(y - y_true) - (Ω(y) - Ω(y_true Note: by default, `t_true` is a named tuple with field `y_true`, but it can be any data structure for which the [`get_y_true`](@ref) method is implemented. # Fields - -- `aux_loss_maximizer`: function of `(θ, t_true, α)` that computes the argmax in the problem above -- `δ`: base loss function -- `Ω`: regularization function -- `α::Float64`: hyperparameter with a default value of 1.0 +$TYPEDFIELDS """ struct ImitationLoss{M,L,R} <: AbstractLossLayer + "function of `(θ, t_true, α)` that computes the argmax in the problem above" aux_loss_maximizer::M + "base loss function" δ::L + "regularization function" Ω::R + "hyperparameter with a default value of 1.0" α::Float64 end @@ -40,7 +40,7 @@ function ImitationLoss(; aux_loss_maximizer, δ, Ω, α=1.0) end """ - get_y_true(t_true::Any) + $FUNCTIONNAME(t_true::Any) Retrieve `y_true` from `t_true`. @@ -49,7 +49,7 @@ This method should be implemented when using a custom data structure for `t_true function get_y_true end """ - get_y_true(t_true::NamedTuple) +$TYPEDSIGNATURES Retrieve `y_true` from `t_true`. `t_true` must contain an `y_true` field. """ diff --git a/src/imitation/spoplus_loss.jl b/src/imitation/spoplus_loss.jl index c572842..77b20b5 100644 --- a/src/imitation/spoplus_loss.jl +++ b/src/imitation/spoplus_loss.jl @@ -1,16 +1,17 @@ """ - SPOPlusLoss <: AbstractLossLayer +$TYPEDEF Convex surrogate of the Smart "Predict-then-Optimize" loss. -# Fields -- `maximizer`: linear maximizer function of the form `θ -> ŷ(θ) = argmax θᵀy` -- `α::Float64`: convexification parameter, default = 2.0 - Reference: + +# Fields +$TYPEDFIELDS """ struct SPOPlusLoss{F} <: AbstractLossLayer + "linear maximizer function of the form `θ -> ŷ(θ) = argmax θᵀy`" maximizer::F + "convexification parameter, default = 2.0" α::Float64 end diff --git a/src/imitation/ssvm_loss.jl b/src/imitation/ssvm_loss.jl index 5149b42..9816986 100644 --- a/src/imitation/ssvm_loss.jl +++ b/src/imitation/ssvm_loss.jl @@ -1,5 +1,5 @@ """ - StructuredSVMLoss <: AbstractLossLayer +$TYPEDEF Loss associated with the Structured Support Vector Machine, defined by ``` @@ -9,14 +9,14 @@ L(θ, y_true) = max_y {δ(y, y_true) + α θᵀ(y - y_true)} Reference: (Chapter 6) # Fields - -- `aux_loss_maximizer::M`: function of `(θ, y_true, α)` that computes the argmax in the problem above -- `δ::L`: base loss function -- `α::Float64`: hyperparameter with a default value of 1.0 +$TYPEDFIELDS """ struct StructuredSVMLoss{M,L} <: AbstractLossLayer + "function of `(θ, y_true, α)` that computes the argmax in the problem above" aux_loss_maximizer::M + "base loss function" δ::L + "hyperparameter with a default value of 1.0" α::Float64 end diff --git a/src/imitation/zero_one_loss.jl b/src/imitation/zero_one_loss.jl index 62fa462..a57551c 100644 --- a/src/imitation/zero_one_loss.jl +++ b/src/imitation/zero_one_loss.jl @@ -1,5 +1,5 @@ """ - zero_one_loss(y, y_true) +$TYPEDSIGNATURES 0-1 loss for multiclass classification: `δ(y, y_true) = 0` if `y = y_true`, and `1` otherwise. """ @@ -8,7 +8,7 @@ function zero_one_loss(y::AbstractArray, y_true::AbstractArray) end """ - zero_one_loss_maximizer(y, y_true; α) +$TYPEDSIGNATURES For `δ = zero_one_loss`, compute ``` @@ -33,22 +33,22 @@ function zero_one_loss_maximizer( end """ - ZeroOneStructuredSVMLoss + ZeroOneStructuredSVMLoss(α=1.0) Implementation of the [`StructuredSVMLoss`](@ref) based on a 0-1 loss for multiclass classification. """ -function ZeroOneStructuredSVMLoss(α=1) +function ZeroOneStructuredSVMLoss(α=1.0) return StructuredSVMLoss(; aux_loss_maximizer=zero_one_loss_maximizer, δ=zero_one_loss, α=α ) end """ - ZeroOneStructuredSVMLoss(α) + ZeroOneStructuredSVMLoss(α=1.0) Implementation of the [`ImitationLoss`](@ref) based on a 0-1 loss for multiclass classification with no regularization. """ -function ZeroOneImitationLoss(α=1) +function ZeroOneImitationLoss(α=1.0) return ImitationLoss(; δ=(y, t_true) -> zero_one_loss(y, get_y_true(t_true)), Ω=y -> 0, diff --git a/src/interface.jl b/src/interface.jl index cb4ac75..27fef9a 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -1,50 +1,53 @@ """ - AbstractLayer +$TYPEDEF Supertype for all the layers defined in InferOpt. - + All of these layers are callable, and differentiable with any ChainRules-compatible autodiff backend. # Interface -- `(layer::AbstractLayer)(args...; kwargs...)` +- `(layer::$FUNCTIONNAME)(args...; kwargs...)` """ abstract type AbstractLayer end ## Optimization """ - AbstractOptimizationLayer <: AbstractLayer +$TYPEDEF -Supertype for all the optimization layers defined in InferOpt. +Supertype for all the optimization layers defined in `InferOpt`. # Interface -- `(layer::AbstractOptimizationLayer)(θ; kwargs...)` -- `compute_probability_distribution(layer, θ; kwargs...)` (only if the layer is probabilistic) +- `(layer::$FUNCTIONNAME)(θ; kwargs...)` +- `compute_probability_distribution(layer::$FUNCTIONNAME, θ; kwargs...)` (only if the layer is probabilistic) """ abstract type AbstractOptimizationLayer <: AbstractLayer end ## Losses """ - AbstractLossLayer <: AbstractLayer +$TYPEDEF -Supertype for all the loss layers defined in InferOpt. +Supertype for all the loss layers defined in `InferOpt`. Depending on the precise loss, the arguments to the layer might vary # Interface -- `(layer::AbstractLossLayer)(θ; kwargs...)` or -- `(layer::AbstractLossLayer)(θ, θ_true; kwargs...)` or -- `(layer::AbstractLossLayer)(θ, y_true; kwargs...)` or -- `(layer::AbstractLossLayer)(θ, (; θ_true, y_true); kwargs...)` +- `(layer::$FUNCTIONNAME)(θ; kwargs...)` or +- `(layer::$FUNCTIONNAME)(θ, θ_true; kwargs...)` or +- `(layer::$FUNCTIONNAME)(θ, y_true; kwargs...)` or +- `(layer::$FUNCTIONNAME)(θ, (; θ_true, y_true); kwargs...)` """ abstract type AbstractLossLayer <: AbstractLayer end ## Checking specific properties """ - compute_probability_distribution(layer, θ; kwargs...) + $FUNCTIONNAME(layer, θ; kwargs...) Apply a probabilistic optimization layer to an objective direction `θ` in order to generate a [`FixedAtomsProbabilityDistribution`](@ref) on the vertices of a polytope. + +# Method list +$METHODLIST """ function compute_probability_distribution end diff --git a/src/perturbed/abstract_perturbed.jl b/src/perturbed/abstract_perturbed.jl index 5ac197f..596397c 100644 --- a/src/perturbed/abstract_perturbed.jl +++ b/src/perturbed/abstract_perturbed.jl @@ -1,5 +1,5 @@ """ - AbstractPerturbed{F,parallel} <: AbstractOptimizationLayer +$TYPEDEF Differentiable perturbation of a black box optimizer of type `F`. @@ -43,14 +43,14 @@ function compute_atoms( end """ - sample_perturbations(perturbed::AbstractPerturbed, θ::AbstractArray) + $FUNCTIONNAME(perturbed::AbstractPerturbed, θ::AbstractArray) Draw `nb_samples` random perturbations from the `perturbation` distribution. """ function sample_perturbations end """ - perturbation_grad_logdensity( + $FUNCTIONNAME( ::RuleConfig, ::AbstractPerturbed, θ::AbstractArray, @@ -63,7 +63,7 @@ distribution evaluated in the observed perturbation sample `η`. function perturbation_grad_logdensity end """ - compute_probability_distribution_from_samples( + $FUNCTIONNAME( ::AbstractPerturbed, θ::AbstractArray, samples::Vector{<:AbstractArray}; @@ -75,7 +75,7 @@ Create a probability distributions from `samples` drawn from `perturbation`. function compute_probability_distribution_from_samples end """ - compute_probability_distribution(perturbed::AbstractPerturbed, θ; kwargs...) +$TYPEDSIGNATURES Turn random perturbations of `θ` into a distribution on polytope vertices. diff --git a/src/perturbed/additive.jl b/src/perturbed/additive.jl index e9923d5..f7e1ca3 100644 --- a/src/perturbed/additive.jl +++ b/src/perturbed/additive.jl @@ -1,5 +1,5 @@ """ - PerturbedAdditive{P,G,O,R,S,parallel} <: AbstractPerturbed{parallel} +$TYPEDEF Differentiable normal perturbation of a black-box maximizer: the input undergoes `θ -> θ + εZ` where `Z ∼ N(0, I)`. @@ -10,8 +10,8 @@ Reference: See [`AbstractPerturbed`](@ref) for more details. -# Specific field -- `ε:Float64`: size of the perturbation +# Fields +$TYPEDFIELDS """ struct PerturbedAdditive{P,G,O,R<:AbstractRNG,S<:Union{Nothing,Int},parallel} <: AbstractPerturbed{O,parallel} @@ -21,14 +21,15 @@ struct PerturbedAdditive{P,G,O,R<:AbstractRNG,S<:Union{Nothing,Int},parallel} <: rng::R seed::S nb_samples::Int + "size of the perturbation" ε::Float64 end function Base.show(io::IO, perturbed::PerturbedAdditive) - (; oracle, ε, rng, seed, nb_samples, perturbation) = perturbed - perturb = isnothing(perturbation) ? "Normal(0, 1)" : "$perturbation" + (; oracle, ε, seed, nb_samples, perturbation) = perturbed + perturb = isnothing(perturbation) ? "𝓝(0, 1)" : "$perturbation" return print( - io, "PerturbedAdditive($oracle, $ε, $nb_samples, $(typeof(rng)), $seed, $perturb)" + io, "PerturbedAdditive($oracle, ε=$ε, nb_samples=$nb_samples, seed=$seed, $perturb)" ) end diff --git a/src/perturbed/multiplicative.jl b/src/perturbed/multiplicative.jl index f96a333..e13841c 100644 --- a/src/perturbed/multiplicative.jl +++ b/src/perturbed/multiplicative.jl @@ -1,5 +1,5 @@ """ - PerturbedMultiplicative{P,G,O,R,S,parallel} <: AbstractPerturbed{parallel} +$TYPEDEF Differentiable multiplicative perturbation of a black-box oracle: the input undergoes `θ -> θ ⊙ exp[εZ - ε²/2]` where `Z ∼ perturbation`. @@ -11,8 +11,8 @@ Reference: See [`AbstractPerturbed`](@ref) for more details. -# Specific field -- `ε:Float64`: size of the perturbation +# Fields +$TYPEDFIELDS """ struct PerturbedMultiplicative{P,G,O,R<:AbstractRNG,S<:Union{Nothing,Int},parallel} <: AbstractPerturbed{O,parallel} @@ -22,6 +22,7 @@ struct PerturbedMultiplicative{P,G,O,R<:AbstractRNG,S<:Union{Nothing,Int},parall rng::R seed::S nb_samples::Int + "size of the perturbation" ε::Float64 end diff --git a/src/perturbed/perturbed_oracle.jl b/src/perturbed/perturbed_oracle.jl index 9d7cd04..1eaf5f9 100644 --- a/src/perturbed/perturbed_oracle.jl +++ b/src/perturbed/perturbed_oracle.jl @@ -1,11 +1,14 @@ """ - PerturbedOracle{P,G,O,R,S,parallel} <: AbstractPerturbed{parallel} +$TYPEDEF Differentiable perturbed black-box oracle. The `oracle` input `θ` is perturbed as `η ∼ perturbation(⋅|θ)`. [`PerturbedAdditive`](@ref) is a special case of `PerturbedOracle` with `perturbation(θ) = MvNormal(θ, ε * I)`. [`PerturbedMultiplicative`] is also a special case of `PerturbedOracle`. See [`AbstractPerturbed`](@ref) for more details about its fields. + +# Fields +$TYPEDFIELDS """ struct PerturbedOracle{P,G,O,R<:AbstractRNG,S<:Union{Nothing,Int},parallel} <: AbstractPerturbed{O,parallel} diff --git a/src/regularized/abstract_regularized.jl b/src/regularized/abstract_regularized.jl index 9a2a903..fba88c9 100644 --- a/src/regularized/abstract_regularized.jl +++ b/src/regularized/abstract_regularized.jl @@ -1,5 +1,5 @@ """ - AbstractRegularized <: AbstractOptimizationLayer +$TYPEDEF Convex regularization perturbation of a black box linear optimizer ``` @@ -20,7 +20,7 @@ Convex regularization perturbation of a black box linear optimizer abstract type AbstractRegularized <: AbstractOptimizationLayer end """ - AbstractRegularizedGeneralizedMaximizer <: AbstractRegularized +$TYPEDEF Convex regularization perturbation of a black box **generalized** optimizer ``` @@ -37,19 +37,21 @@ with g and h functions of y. abstract type AbstractRegularizedGeneralizedMaximizer <: AbstractRegularized end """ - compute_regularization(regularized, y) + $FUNCTIONNAME(regularized, y) Return the convex penalty `Ω(y)` associated with an `AbstractRegularized` layer. """ function compute_regularization end """ - get_maximizer(regularized) + $FUNCTIONNAME(regularized) Return the associated optimizer. """ function get_maximizer end +# Required interface + @required AbstractRegularized begin # (regularized::AbstractRegularized)(θ::AbstractArray; kwargs...) # waiting for RequiredInterfaces to support this (see https://github.com/Seelengrab/RequiredInterfaces.jl/issues/11) compute_regularization(::AbstractRegularized, y) diff --git a/src/regularized/regularized_frank_wolfe.jl b/src/regularized/regularized_frank_wolfe.jl index 8f68887..2a892a7 100644 --- a/src/regularized/regularized_frank_wolfe.jl +++ b/src/regularized/regularized_frank_wolfe.jl @@ -1,5 +1,5 @@ """ - RegularizedFrankWolfe <: AbstractRegularized +$TYPEDEF Regularized optimization layer which relies on the Frank-Wolfe algorithm to define a probability distribution while solving ``` @@ -10,11 +10,7 @@ Regularized optimization layer which relies on the Frank-Wolfe algorithm to defi Since this is a conditional dependency, you need to have loaded the package DifferentiableFrankWolfe.jl before using `RegularizedFrankWolfe`. # Fields - -- `linear_maximizer`: linear maximization oracle `θ -> argmax_{x ∈ C} θᵀx`, implicitly defines the polytope `C` -- `Ω`: regularization function `Ω(y)` -- `Ω_grad`: gradient function of the regularization function `∇Ω(y)` -- `frank_wolfe_kwargs`: named tuple of keyword arguments passed to the Frank-Wolfe algorithm +$TYPEDFIELDS # Frank-Wolfe parameters @@ -30,9 +26,13 @@ Some values you can tune: See the documentation of FrankWolfe.jl for details. """ struct RegularizedFrankWolfe{M,RF,RG,FWK} <: AbstractRegularized + "linear maximization oracle `θ -> argmax_{x ∈ C} θᵀx`, implicitly defines the polytope `C`" linear_maximizer::M + "regularization function `Ω(y)`" Ω::RF + "gradient function of the regularization function `∇Ω(y)`" Ω_grad::RG + "named tuple of keyword arguments passed to the Frank-Wolfe algorithm" frank_wolfe_kwargs::FWK end diff --git a/src/regularized/soft_argmax.jl b/src/regularized/soft_argmax.jl index 5038ab0..40b333d 100644 --- a/src/regularized/soft_argmax.jl +++ b/src/regularized/soft_argmax.jl @@ -1,5 +1,5 @@ """ - SoftArgmax <: Regularized +$TYPEDEF Soft argmax activation function `s(z) = (e^zᵢ / ∑ e^zⱼ)ᵢ`. @@ -10,6 +10,9 @@ struct SoftArgmax <: AbstractRegularized end (::SoftArgmax)(z::AbstractVector; kwargs...) = soft_argmax(z) compute_regularization(::SoftArgmax, y) = soft_argmax_regularization(y) +""" +$TYPEDSIGNATURES +""" function soft_argmax(z::AbstractVector) s = exp.(z) return s ./ sum(s) diff --git a/src/regularized/soft_rank.jl b/src/regularized/soft_rank.jl index 125e58a..9839239 100644 --- a/src/regularized/soft_rank.jl +++ b/src/regularized/soft_rank.jl @@ -1,5 +1,5 @@ """ - SoftRank{is_l2_regularized} <: AbstractRegularized +$TYPEDEF Fast differentiable ranking regularized layer. It uses an L2 regularization if `is_l2_regularized` is true, else it uses an entropic (kl) regularization. @@ -7,14 +7,15 @@ It uses an L2 regularization if `is_l2_regularized` is true, else it uses an ent As an [`AbstractRegularized`](@ref) layer, it can also be used for supervised learning with a [`FenchelYoungLoss`](@ref). -# Fields -- `ε::Float64`: size of the regularization -- `rev::Bool`: rank in ascending order if false - Reference: + +# Fields +$TYPEDFIELDS """ struct SoftRank{is_l2_regularized} <: AbstractRegularized + "size of the regularization" ε::Float64 + "rank in ascending order if false" rev::Bool end @@ -44,7 +45,7 @@ compute_regularization(l::SoftRank{true}, y) = l.ε * half_square_norm(y) compute_regularization(l::SoftRank{false}, y) = l.ε * dot(y, log.(y) .- 1) """ - SoftSort{is_l2_regularized} <: AbstractOptimizationLayer +$TYPEDEF Fast differentiable sorting optimization layer. It uses an L2 regularization if `is_l2_regularized` is true, else it uses an entropic (kl) regularization. @@ -52,11 +53,12 @@ It uses an L2 regularization if `is_l2_regularized` is true, else it uses an ent Reference # Fields -- `ε::Float64`: size of the regularization -- `rev::Bool`: sort in ascending order if false +$TYPEDFIELDS """ struct SoftSort{is_l2_regularized} <: AbstractOptimizationLayer + "size of the regularization" ε::Float64 + "sort in ascending order if false" rev::Bool end @@ -78,7 +80,7 @@ end (l::SoftSort{false})(θ; ε=l.ε, rev=l.rev) = soft_sort_kl(θ; ε, rev) """ - soft_sort(θ::AbstractVector; ε=1.0, rev::Bool=false, regularization=:l2) +$TYPEDSIGNATURES Fast differentiable sort of vector θ. @@ -103,7 +105,7 @@ function soft_sort(θ::AbstractVector; ε=1.0, rev::Bool=false, regularization=: end """ - soft_rank(θ::AbstractVector; ε=1.0, rev::Bool=false) +$TYPEDSIGNATURES Fast differentiable ranking of vector θ. @@ -128,7 +130,7 @@ function soft_rank(θ::AbstractVector; ε=1.0, rev::Bool=false, regularization=: end """ - soft_sort_l2(θ::AbstractVector; ε=1.0, rev::Bool=false) +$TYPEDSIGNATURES Sort vector `θ` with l2 regularization. """ @@ -138,7 +140,7 @@ function soft_sort_l2(θ::AbstractVector; ε=1.0, rev::Bool=false) end """ - soft_rank_l2(θ::AbstractVector; ε=1.0, rev::Bool=false) +$TYPEDSIGNATURES Rank vector `θ` with l2 regularization. """ @@ -148,7 +150,7 @@ function soft_rank_l2(θ::AbstractVector; ε=1.0, rev::Bool=false) end """ - soft_sort_kl(θ::AbstractVector; ε=1.0, rev::Bool=false) +$TYPEDSIGNATURES Sort vector `θ` with kl regularization. """ @@ -158,7 +160,7 @@ function soft_sort_kl(θ::AbstractVector; ε=1.0, rev::Bool=false) end """ - soft_rank_kl(θ::AbstractVector; ε=1.0, rev::Bool=false) +$TYPEDSIGNATURES Rank vector `θ` with kl regularization. """ diff --git a/src/regularized/sparse_argmax.jl b/src/regularized/sparse_argmax.jl index 30925c8..70e6a0d 100644 --- a/src/regularized/sparse_argmax.jl +++ b/src/regularized/sparse_argmax.jl @@ -1,5 +1,5 @@ """ - SparseArgmax <: AbstractRegularized +$TYPEDEF Compute the Euclidean projection of the vector `z` onto the probability simplex. @@ -10,6 +10,9 @@ struct SparseArgmax <: AbstractRegularized end (::SparseArgmax)(z::AbstractVector; kwargs...) = sparse_argmax(z) compute_regularization(::SparseArgmax, y) = sparse_argmax_regularization(y) +""" +$TYPEDSIGNATURES +""" function sparse_argmax(z::AbstractVector; kwargs...) p, _ = simplex_projection_and_support(z) return p @@ -20,7 +23,7 @@ function sparse_argmax_regularization(y::AbstractVector) end """ - simplex_projection_and_support(z) +$TYPEDSIGNATURES Compute the Euclidean projection `p` of `z` on the probability simplex (also called `sparse_argmax`), and the indicators `s` of its support. diff --git a/src/simple/identity.jl b/src/simple/identity.jl index 3f68218..2676092 100644 --- a/src/simple/identity.jl +++ b/src/simple/identity.jl @@ -1,16 +1,17 @@ """ - IdentityRelaxation <: AbstractOptimizationLayer +$TYPEDEF Naive relaxation of a black-box optimizer where constraints are simply forgotten. Consider (centering and) normalizing `θ` before applying it. -# Fields -- `maximizer`: underlying argmax function - Reference: + +# Fields +$TYPEDFIELDS """ struct IdentityRelaxation{F} <: AbstractOptimizationLayer + "underlying argmax function" maximizer::F end diff --git a/src/simple/interpolation.jl b/src/simple/interpolation.jl index 4897372..e99e66d 100644 --- a/src/simple/interpolation.jl +++ b/src/simple/interpolation.jl @@ -1,16 +1,17 @@ """ - Interpolation <: AbstractOptimizationLayer +$TYPEDEF Piecewise-linear interpolation of a black-box optimizer. -# Fields -- `maximizer`: underlying argmax function -- `λ::Float64`: smoothing parameter (smaller = more faithful approximation, larger = more informative gradients) - Reference: + +# Fields +$TYPEDFIELDS """ struct Interpolation{F} <: AbstractOptimizationLayer + "underlying argmax function" maximizer::F + "smoothing parameter (smaller = more faithful approximation, larger = more informative gradients)" λ::Float64 end diff --git a/src/utils/generalized_maximizer.jl b/src/utils/generalized_maximizer.jl index e1a4384..68f2bba 100644 --- a/src/utils/generalized_maximizer.jl +++ b/src/utils/generalized_maximizer.jl @@ -1,5 +1,5 @@ """ - GeneralizedMaximizer{F,G,H} +$TYPEDEF Wrapper for generalized maximizers `maximizer` of the form argmax_y θᵀg(y) + h(y). It is compatible with the following layers @@ -26,7 +26,7 @@ function (f::GeneralizedMaximizer)(θ::AbstractArray{<:Real}; kwargs...) end """ - objective_value(f, θ, y, kwargs...) +$TYPEDSIGNATURES Computes the objective value of given GeneralizedMaximizer `f`, knowing weights `θ` and solution `y`. """ diff --git a/src/utils/probability_distribution.jl b/src/utils/probability_distribution.jl index 0fdc21a..7465951 100644 --- a/src/utils/probability_distribution.jl +++ b/src/utils/probability_distribution.jl @@ -1,16 +1,17 @@ """ - FixedAtomsProbabilityDistribution{A,W} +$TYPEDEF Encodes a probability distribution with finite support and fixed atoms. See [`compute_expectation`](@ref) to understand the name of this struct. # Fields -- `atoms::Vector{A}`: elements of the support -- `weights::Vector{W}`: probability values for each atom (must sum to 1) +$TYPEDFIELDS """ struct FixedAtomsProbabilityDistribution{A,W} + "elements of the support" atoms::Vector{A} + "probability values for each atom (must sum to 1)" weights::Vector{W} function FixedAtomsProbabilityDistribution( @@ -25,7 +26,7 @@ end Base.length(probadist::FixedAtomsProbabilityDistribution) = length(probadist.atoms) """ - rand([rng,] probadist) +$TYPEDSIGNATURES Sample from the atoms of `probadist` according to their weights. """ @@ -37,7 +38,7 @@ end Base.rand(probadist::FixedAtomsProbabilityDistribution) = rand(GLOBAL_RNG, probadist) """ - apply_on_atoms(post_processing, probadist) +$TYPEDSIGNATURES Create a new distribution by applying the function `post_processing` to each atom of `probadist` (the weights remain the same). """ diff --git a/src/utils/pushforward.jl b/src/utils/pushforward.jl index ddd915b..d7d878f 100644 --- a/src/utils/pushforward.jl +++ b/src/utils/pushforward.jl @@ -1,18 +1,19 @@ """ - Pushforward <: AbstractLayer +$TYPEDEF Differentiable pushforward of a probabilistic optimization layer with an arbitrary function post-processing function. `Pushforward` can be used for direct regret minimization (aka learning by experience) when the post-processing returns a cost. # Fields -- `optimization_layer::AbstractOptimizationLayer`: probabilistic optimization layer -- `post_processing`: callable +$TYPEDFIELDS See also: [`FixedAtomsProbabilityDistribution`](@ref). """ struct Pushforward{O<:AbstractOptimizationLayer,P} <: AbstractLayer + "probabilistic optimization layer" optimization_layer::O + "callable post-processing cost" post_processing::P end @@ -22,7 +23,7 @@ function Base.show(io::IO, pushforward::Pushforward) end """ - compute_probability_distribution(pushforward, θ) +$TYPEDSIGNATURES Output the distribution of `pushforward.post_processing(X)`, where `X` follows the distribution defined by `pushforward.optimization_layer` applied to `θ`. diff --git a/src/utils/some_functions.jl b/src/utils/some_functions.jl index 4512ab2..c70870d 100644 --- a/src/utils/some_functions.jl +++ b/src/utils/some_functions.jl @@ -1,26 +1,26 @@ """ - positive_part(x) +$SIGNATURES Compute `max(x,0)`. """ positive_part(x) = x >= zero(x) ? x : zero(x) """ - isproba(x) +$SIGNATURES Check whether `x ∈ [0,1]`. """ isproba(x::Real) = zero(x) <= x <= one(x) """ - isprobadist(p) +$TYPEDSIGNATURES Check whether the elements of `p` are nonnegative and sum to 1. """ isprobadist(p::AbstractVector{R}) where {R<:Real} = all(isproba, p) && sum(p) ≈ one(R) """ - half_square_norm(x) +$TYPEDSIGNATURES Compute the squared Euclidean norm of `x` and divide it by 2. """ @@ -29,7 +29,7 @@ function half_square_norm(x::AbstractArray) end """ - shannon_entropy(p) +$TYPEDSIGNATURES Compute the Shannon entropy of a probability distribution: `H(p) = -∑ pᵢlog(pᵢ)`. """ @@ -43,10 +43,13 @@ function shannon_entropy(p::AbstractVector{R}) where {R<:Real} return H end +""" +$TYPEDSIGNATURES +""" negative_shannon_entropy(p::AbstractVector) = -shannon_entropy(p) """ - one_hot_argmax(z) +$TYPEDSIGNATURES One-hot encoding of the argmax function. """ @@ -57,7 +60,7 @@ function one_hot_argmax(z::AbstractVector{R}; kwargs...) where {R<:Real} end """ - ranking(θ[; rev]) +$TYPEDSIGNATURES Compute the vector `r` such that `rᵢ` is the rank of `θᵢ` in `θ`. """