diff --git a/.gitignore b/.gitignore index f3fc3a6b4..80be6a962 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ *.jl.*.cov *.jl.mem Manifest.toml -/docs/build/ \ No newline at end of file +/docs/build/ +test/Manifest.toml +test/gpu/Manifest.toml \ No newline at end of file diff --git a/Project.toml b/Project.toml index f0798de00..6537184db 100644 --- a/Project.toml +++ b/Project.toml @@ -41,7 +41,6 @@ StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" TruncatedStacktraces = "781d530d-4396-4725-bb49-402e4bee1e77" Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" -ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444" [compat] ADTypes = "0.1, 0.2" @@ -81,5 +80,4 @@ StochasticDiffEq = "6.20" Tracker = "0.2" TruncatedStacktraces = "1.2" Zygote = "0.6" -ZygoteRules = "0.2" julia = "1.9" diff --git a/src/SciMLSensitivity.jl b/src/SciMLSensitivity.jl index ddc09ffac..e62dab353 100644 --- a/src/SciMLSensitivity.jl +++ b/src/SciMLSensitivity.jl @@ -9,7 +9,7 @@ using StochasticDiffEq import DiffEqNoiseProcess import RandomNumbers: Xorshifts using Random -import ZygoteRules, Zygote, ReverseDiff +import Zygote, ReverseDiff import ArrayInterface import Enzyme import GPUArraysCore @@ -27,8 +27,7 @@ using FunctionProperties: hasbranching using Markdown using Reexport -import ChainRulesCore: unthunk, @thunk, NoTangent, @not_implemented, Tangent, ProjectTo, - project_type, _eltype_projectto, rrule +import ChainRulesCore: unthunk, @thunk, NoTangent, @not_implemented abstract type SensitivityFunction end abstract type TransformedFunction end diff --git a/src/steadystate_adjoint.jl b/src/steadystate_adjoint.jl index 3585399f8..307125981 100644 --- a/src/steadystate_adjoint.jl +++ b/src/steadystate_adjoint.jl @@ -15,7 +15,7 @@ end TruncatedStacktraces.@truncate_stacktrace SteadyStateAdjointSensitivityFunction function SteadyStateAdjointSensitivityFunction(g, sensealg, alg, sol, dgdu, dgdp, f, - colorvec, needs_jac) + colorvec, needs_jac) @unpack p, u0 = sol.prob diffcache, y = adjointdiffcache(g, sensealg, false, sol, dgdu, dgdp, f, alg; @@ -30,26 +30,18 @@ function SteadyStateAdjointSensitivityFunction(g, sensealg, alg, sol, dgdu, dgdp end @noinline function SteadyStateAdjointProblem(sol, sensealg::SteadyStateAdjoint, alg, - dgdu::DG1 = nothing, dgdp::DG2 = nothing, - g::G = nothing; kwargs...) where {DG1, DG2, G} + dgdu::DG1 = nothing, dgdp::DG2 = nothing, g::G = nothing; + kwargs...) where {DG1, DG2, G} @unpack f, p, u0 = sol.prob - if sol.prob isa NonlinearProblem - f = ODEFunction(f) - end + sol.prob isa NonlinearProblem && (f = ODEFunction(f)) dgdu === nothing && dgdp === nothing && g === nothing && error("Either `dgdu`, `dgdp`, or `g` must be specified.") - needs_jac = if has_adjoint(f) - false - # TODO: What is the correct heuristic? Can we afford to compute Jacobian for - # cases where the length(u0) > 50 and if yes till what threshold - elseif sensealg.linsolve === nothing - length(u0) ≤ 50 - else - LinearSolve.needs_concrete_A(sensealg.linsolve) - end + needs_jac = ifelse(has_adjoint(f), false, + ifelse(sensealg.linsolve === nothing, length(u0) ≤ 50, + LinearSolve.needs_concrete_A(sensealg.linsolve))) p === DiffEqBase.NullParameters() && error("Your model does not have parameters, and thus it is impossible to calculate the derivative of the solution with respect to the parameters. Your model must have parameters to use parameter sensitivity calculations!") diff --git a/test/HybridNODE.jl b/test/HybridNODE.jl index 9f5a26b2a..33fd4f2de 100644 --- a/test/HybridNODE.jl +++ b/test/HybridNODE.jl @@ -1,4 +1,5 @@ -using SciMLSensitivity, OrdinaryDiffEq, DiffEqCallbacks, Flux +using SciMLSensitivity, OrdinaryDiffEq, DiffEqCallbacks, Lux, ComponentArrays +using Optimization, OptimizationOptimisers using Random, Test using Zygote @@ -9,10 +10,10 @@ function test_hybridNODE(sensealg) t = range(tspan[1], tspan[2], length = datalength) target = 3.0 * (1:datalength) ./ datalength # some dummy data to fit to cbinput = rand(1, datalength) #some external ODE contribution - pmodel = Chain(Dense(2, 10, init = zeros), - Dense(10, 2, init = zeros)) - p, re = Flux.destructure(pmodel) - dudt(u, p, t) = re(p)(u) + pmodel = Chain(Dense(2, 10, init_weight = zeros32), Dense(10, 2, init_weight = zeros32)) + ps, st = Lux.setup(Random.default_rng(), pmodel) + ps = ComponentArray{Float64}(ps) + dudt(u, p, t) = first(pmodel(u, p, st)) # callback changes the first component of the solution every time # t is an integer @@ -27,24 +28,23 @@ function test_hybridNODE(sensealg) function predict_n_ode(p) arr = Array(solve(prob, Tsit5(), - p = p, sensealg = sensealg, saveat = 2.0, callback = callback))[1, - 2:2:end] + p = p, sensealg = sensealg, saveat = 2.0, callback = callback))[1, 2:2:end] return arr[1:datalength] end - function loss_n_ode() + function loss_n_ode(p, _) pred = predict_n_ode(p) loss = sum(abs2, target .- pred) ./ datalength end - cb = function () #callback function to observe training - pred = predict_n_ode(p) - display(loss_n_ode()) + cb = function (p, l) #callback function to observe training + @show l + return false end @show sensealg - Flux.train!(loss_n_ode, Flux.params(p), Iterators.repeated((), 20), ADAM(0.005), - cb = cb) - @test loss_n_ode() < 0.5 + res = solve(OptimizationProblem(OptimizationFunction(loss_n_ode, AutoZygote()), ps), + Adam(0.005); callback = cb, maxiters = 200) + @test loss_n_ode(res.u, nothing) < 0.5 println(" ") end @@ -70,14 +70,15 @@ function test_hybridNODE2(sensealg) ode_data = Array(sol)[1:2, 1:end]' ## Make model - dudt2 = Chain(Dense(4, 50, tanh), - Dense(50, 2)) - p, re = Flux.destructure(dudt2) # use this p as the initial condition! + dudt2 = Chain(Dense(4, 50, tanh), Dense(50, 2)) + ps, st = Lux.setup(Random.default_rng(), dudt2) + ps = ComponentArray{Float32}(ps) + function affect!(integrator) integrator.u[3:4] = -3 * integrator.u[1:2] end function ODEfunc(dx, x, p, t) - dx[1:2] .= re(p)(x) + dx[1:2] .= first(dudt2(x, p, st)) dx[3:4] .= 0.0f0 end z0 = u0 @@ -86,34 +87,27 @@ function test_hybridNODE2(sensealg) initial_affect = true) ## Initialize learning functions - function predict_n_ode() - _prob = remake(prob, p = p) - Array(solve(_prob, Tsit5(), u0 = z0, p = p, callback = cb, save_everystep = false, - save_start = true, sensealg = sensealg))[1:2, - :] - end - function loss_n_ode() - pred = predict_n_ode()[1:2, 1:end]' + function predict_n_ode(ps) + Array(solve(prob, Tsit5(), u0 = z0, p = ps, callback = cb, save_everystep = false, + save_start = true, sensealg = sensealg))[1:2, :] + end + function loss_n_ode(ps, _) + pred = predict_n_ode(ps)[1:2, 1:end]' loss = sum(abs2, ode_data .- pred) loss end - loss_n_ode() # n_ode.p stores the initial parameters of the neural ODE - cba = function () #callback function to observe training - pred = predict_n_ode()[1:2, 1:end]' - display(sum(abs2, ode_data .- pred)) + + cba = function (p, loss) #callback function to observe training + @show loss return false end - cba() - - ## Learn - ps = Flux.params(p) - data = Iterators.repeated((), 25) @show sensealg - Flux.train!(loss_n_ode, ps, data, ADAM(0.0025), cb = cba) + res = solve(OptimizationProblem(OptimizationFunction(loss_n_ode, AutoZygote()), ps), + Adam(0.0025); callback = cba, maxiters = 200) - @test loss_n_ode() < 0.5 + @test loss_n_ode(res.u, nothing) < 0.5 println(" ") end @@ -142,14 +136,16 @@ function test_hybridNODE3(sensealg) true_data = reshape(ode_data, (2, length(t), 1)) true_data = convert.(Float32, true_data) callback_data = true_data * 1.0f-3 - train_dataloader = Flux.Data.DataLoader((true_data = true_data, - callback_data = callback_data), batchsize = 1) - dudt2 = Chain(Dense(2, 50, tanh), - Dense(50, 2)) - p, re = Flux.destructure(dudt2) + + data = (true_data[:, :, 1], callback_data[:, :, 1]) + dudt2 = Chain(Dense(2, 50, tanh), Dense(50, 2)) + ps, st = Lux.setup(Random.default_rng(), dudt2) + ps = ComponentArray{Float32}(ps) + function dudt(du, u, p, t) - du .= re(p)(u) + du .= first(dudt2(u, p, st)) end + z0 = Float32[2.0; 0.0] prob = ODEProblem(dudt, z0, tspan) @@ -159,42 +155,30 @@ function test_hybridNODE3(sensealg) DiscreteCallback(condition, affect!, save_positions = (false, false)) end - function predict_n_ode(true_data_0, callback_data, sense) + function predict_n_ode(p, true_data_0, callback_data, sense) _prob = remake(prob, p = p, u0 = true_data_0) solve(_prob, Tsit5(), callback = callback_(callback_data), saveat = t, sensealg = sense) end - function loss_n_ode(true_data, callback_data) - sol = predict_n_ode((vec(true_data[:, 1, :])), callback_data, sensealg) + function loss_n_ode(p, (true_data, callback_data)) + sol = predict_n_ode(p, (vec(true_data[:, 1, :])), callback_data, sensealg) pred = Array(sol) - loss = Flux.mse((true_data[:, :, 1]), pred) + loss = sum(abs2, true_data[:, :, 1] .- pred) loss end - ps = Flux.params(p) - opt = ADAM(0.1) - epochs = 10 - function cb1(true_data, callback_data) - display(loss_n_ode(true_data, callback_data)) + cba = function (p, loss) #callback function to observe training + @show loss return false end - function train!(loss, ps, data, opt, cb) - ps = Params(ps) - for (true_data, callback_data) in data - gs = gradient(ps) do - loss(true_data, callback_data) - end - Flux.update!(opt, ps, gs) - cb(true_data, callback_data) - end - return nothing - end + @show sensealg + + res = solve(OptimizationProblem(OptimizationFunction(loss_n_ode, AutoZygote()), ps, + data), Adam(0.01); maxiters = 200, callback = cba) + loss = loss_n_ode(res.u, (true_data, callback_data)) - Flux.@epochs epochs train!(loss_n_ode, Params(ps), train_dataloader, opt, cb1) - loss = loss_n_ode(true_data[:, :, 1], callback_data) - @info loss @test loss < 0.5 end diff --git a/test/Manifest.toml b/test/Manifest.toml new file mode 100644 index 000000000..843f76780 --- /dev/null +++ b/test/Manifest.toml @@ -0,0 +1,1665 @@ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.10.0-rc2" +manifest_format = "2.0" +project_hash = "cde57c7ba5a1f34b72fc8b2dcad106159cf4ae32" + +[[deps.ADTypes]] +git-tree-sha1 = "332e5d7baeff8497b923b730b994fa480601efc7" +uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" +version = "0.2.5" + +[[deps.AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.5.0" +weakdeps = ["ChainRulesCore", "Test"] + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" + +[[deps.AbstractTrees]] +git-tree-sha1 = "faa260e4cb5aba097a73fab382dd4b5819d8ec8c" +uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" +version = "0.4.4" + +[[deps.Accessors]] +deps = ["CompositionsBase", "ConstructionBase", "Dates", "InverseFunctions", "LinearAlgebra", "MacroTools", "Test"] +git-tree-sha1 = "a7055b939deae2455aa8a67491e034f735dd08d3" +uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" +version = "0.1.33" + + [deps.Accessors.extensions] + AccessorsAxisKeysExt = "AxisKeys" + AccessorsIntervalSetsExt = "IntervalSets" + AccessorsStaticArraysExt = "StaticArrays" + AccessorsStructArraysExt = "StructArrays" + + [deps.Accessors.weakdeps] + AxisKeys = "94b1ba4f-4ee9-5380-92f1-94cde586c3c5" + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + Requires = "ae029012-a4dd-5104-9daa-d747884805df" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "cde29ddf7e5726c9fb511f340244ea3481267608" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "3.7.2" +weakdeps = ["StaticArrays"] + + [deps.Adapt.extensions] + AdaptStaticArraysExt = "StaticArrays" + +[[deps.AlgebraicMultigrid]] +deps = ["CommonSolve", "LinearAlgebra", "LinearSolve", "Printf", "Reexport", "SparseArrays"] +git-tree-sha1 = "eb3dbbca423d8e8a1d4061b890f775dcd31b8d7c" +uuid = "2169fc97-5a83-5252-b627-83903c6c433c" +version = "0.6.0" + +[[deps.Aqua]] +deps = ["Compat", "Pkg", "Test"] +git-tree-sha1 = "497d933e5998358c2626f782c99a8d4b90af2dd0" +uuid = "4c88cf16-eb10-579e-8560-4a9242c79595" +version = "0.8.4" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.1" + +[[deps.ArnoldiMethod]] +deps = ["LinearAlgebra", "Random", "StaticArrays"] +git-tree-sha1 = "62e51b39331de8911e4a7ff6f5aaf38a5f4cc0ae" +uuid = "ec485272-7323-5ecc-a04f-4719b315124d" +version = "0.2.0" + +[[deps.ArrayInterface]] +deps = ["Adapt", "LinearAlgebra", "Requires", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "247efbccf92448be332d154d6ca56b9fcdd93c31" +uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" +version = "7.6.1" + + [deps.ArrayInterface.extensions] + ArrayInterfaceBandedMatricesExt = "BandedMatrices" + ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" + ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" + ArrayInterfaceTrackerExt = "Tracker" + + [deps.ArrayInterface.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra"] +git-tree-sha1 = "af43df5704827c8618afd36eb56fcab20d3041ee" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "1.4.3" +weakdeps = ["SparseArrays"] + + [deps.ArrayLayouts.extensions] + ArrayLayoutsSparseArraysExt = "SparseArrays" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" + +[[deps.Atomix]] +deps = ["UnsafeAtomics"] +git-tree-sha1 = "c06a868224ecba914baa6942988e2f2aade419be" +uuid = "a9b6321e-bd34-4604-b9c9-b65b8de01458" +version = "0.1.0" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" + +[[deps.BitTwiddlingConvenienceFunctions]] +deps = ["Static"] +git-tree-sha1 = "0c5f81f47bbbcf4aea7b2959135713459170798b" +uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" +version = "0.1.5" + +[[deps.CEnum]] +git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" +uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" +version = "0.5.0" + +[[deps.CPUSummary]] +deps = ["CpuId", "IfElse", "PrecompileTools", "Static"] +git-tree-sha1 = "601f7e7b3d36f18790e2caf83a882d88e9b71ff1" +uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" +version = "0.2.4" + +[[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", "SparseInverseSubset", "Statistics", "StructArrays", "SuiteSparse"] +git-tree-sha1 = "006cc7170be3e0fa02ccac6d4164a1eee1fc8c27" +uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2" +version = "1.58.0" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "e0af648f0692ec1691b5d094b8724ba1346281cf" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.18.0" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.CloseOpenIntervals]] +deps = ["Static", "StaticArrayInterface"] +git-tree-sha1 = "70232f82ffaab9dc52585e0dd043b5e0c6b714f1" +uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" +version = "0.1.12" + +[[deps.CommonSolve]] +git-tree-sha1 = "0eee5eb66b1cf62cd6ad1b460238e60e4b09400c" +uuid = "38540f10-b2f7-11e9-35d8-d573e4eb0ff2" +version = "0.2.4" + +[[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 = "886826d76ea9e72b35fcd000e535588f7b60f21d" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.10.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+1" + +[[deps.ComponentArrays]] +deps = ["ArrayInterface", "ChainRulesCore", "ForwardDiff", "Functors", "LinearAlgebra", "PackageExtensionCompat", "StaticArrayInterface", "StaticArraysCore"] +git-tree-sha1 = "d30eb4d89c791a64e698546c1e0e0e488cd99da5" +uuid = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" +version = "0.15.5" + + [deps.ComponentArrays.extensions] + ComponentArraysAdaptExt = "Adapt" + ComponentArraysConstructionBaseExt = "ConstructionBase" + ComponentArraysGPUArraysExt = "GPUArrays" + ComponentArraysRecursiveArrayToolsExt = "RecursiveArrayTools" + ComponentArraysReverseDiffExt = "ReverseDiff" + ComponentArraysSciMLBaseExt = "SciMLBase" + ComponentArraysTrackerExt = "Tracker" + ComponentArraysZygoteExt = "Zygote" + + [deps.ComponentArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" + GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" + RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.CompositionsBase]] +git-tree-sha1 = "802bb88cd69dfd1509f6670416bd4434015693ad" +uuid = "a33af91c-f02d-484b-be07-31d278c5ca2b" +version = "0.1.2" +weakdeps = ["InverseFunctions"] + + [deps.CompositionsBase.extensions] + CompositionsBaseInverseFunctionsExt = "InverseFunctions" + +[[deps.ConcreteStructs]] +git-tree-sha1 = "f749037478283d372048690eb3b5f92a79432b34" +uuid = "2569d6c7-a4a2-43d3-a901-331e8e4be471" +version = "0.2.3" + +[[deps.ConsoleProgressMonitor]] +deps = ["Logging", "ProgressMeter"] +git-tree-sha1 = "3ab7b2136722890b9af903859afcf457fa3059e8" +uuid = "88cd18e8-d9cc-4ea6-8889-5259c0d15c8b" +version = "0.1.2" + +[[deps.ConstructionBase]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "c53fc348ca4d40d7b371e71fd52251839080cbc9" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.5.4" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.CpuId]] +deps = ["Markdown"] +git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" +uuid = "adafc99b-e345-5852-983c-f28acb93d879" +version = "0.3.1" + +[[deps.DataAPI]] +git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.15.0" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "3dbd312d370723b6bb43ba9d02fc36abade4518d" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.15" + +[[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.DelayDiffEq]] +deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "LinearAlgebra", "Logging", "OrdinaryDiffEq", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SimpleNonlinearSolve", "SimpleUnPack"] +git-tree-sha1 = "41d2ba41a6b6a3111c26c5015de4873b3958cf76" +uuid = "bcd4f6db-9728-5f36-b5f7-82caef46ccdb" +version = "5.43.2" + +[[deps.DelimitedFiles]] +deps = ["Mmap"] +git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" +version = "1.9.1" + +[[deps.DiffEqBase]] +deps = ["ArrayInterface", "DataStructures", "DocStringExtensions", "EnumX", "EnzymeCore", "FastBroadcast", "ForwardDiff", "FunctionWrappers", "FunctionWrappersWrappers", "LinearAlgebra", "Logging", "Markdown", "MuladdMacro", "Parameters", "PreallocationTools", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Static", "StaticArraysCore", "Statistics", "Tricks", "TruncatedStacktraces"] +git-tree-sha1 = "4aff905c723e3f883064f00a4ba553b29372ce57" +uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" +version = "6.142.0" + + [deps.DiffEqBase.extensions] + DiffEqBaseChainRulesCoreExt = "ChainRulesCore" + DiffEqBaseDistributionsExt = "Distributions" + DiffEqBaseEnzymeExt = ["ChainRulesCore", "Enzyme"] + DiffEqBaseGeneralizedGeneratedExt = "GeneralizedGenerated" + DiffEqBaseMPIExt = "MPI" + DiffEqBaseMeasurementsExt = "Measurements" + DiffEqBaseMonteCarloMeasurementsExt = "MonteCarloMeasurements" + DiffEqBaseReverseDiffExt = "ReverseDiff" + DiffEqBaseTrackerExt = "Tracker" + DiffEqBaseUnitfulExt = "Unitful" + + [deps.DiffEqBase.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + GeneralizedGenerated = "6b9d7cbe-bcb9-11e9-073f-15a7a543e2eb" + MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.DiffEqCallbacks]] +deps = ["DataStructures", "DiffEqBase", "ForwardDiff", "Functors", "LinearAlgebra", "Markdown", "NLsolve", "Parameters", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"] +git-tree-sha1 = "4e4de57a0ac47b2f20aae62f132355b058e9f0cd" +uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def" +version = "2.34.0" + + [deps.DiffEqCallbacks.weakdeps] + OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" + Sundials = "c3572dad-4567-51f8-b174-8c6c989267f4" + +[[deps.DiffEqNoiseProcess]] +deps = ["DiffEqBase", "Distributions", "GPUArraysCore", "LinearAlgebra", "Markdown", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "Requires", "ResettableStacks", "SciMLBase", "StaticArraysCore", "Statistics"] +git-tree-sha1 = "57ed4597a309c5b2a10cab5f9813adcb78f92117" +uuid = "77a26b50-5914-5dd7-bc55-306e6241c503" +version = "5.19.0" +weakdeps = ["ReverseDiff"] + + [deps.DiffEqNoiseProcess.extensions] + DiffEqNoiseProcessReverseDiffExt = "ReverseDiff" + +[[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 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.15.1" + +[[deps.Distances]] +deps = ["LinearAlgebra", "Statistics", "StatsAPI"] +git-tree-sha1 = "66c4c81f259586e8f002eacebc177e1fb06363b0" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.11" +weakdeps = ["ChainRulesCore", "SparseArrays"] + + [deps.Distances.extensions] + DistancesChainRulesCoreExt = "ChainRulesCore" + DistancesSparseArraysExt = "SparseArrays" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" + +[[deps.Distributions]] +deps = ["FillArrays", "LinearAlgebra", "PDMats", "Printf", "QuadGK", "Random", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"] +git-tree-sha1 = "9242eec9b7e2e14f9952e8ea1c7e31a50501d587" +uuid = "31c24e10-a181-5473-b8eb-7969acd0382f" +version = "0.25.104" + + [deps.Distributions.extensions] + DistributionsChainRulesCoreExt = "ChainRulesCore" + DistributionsDensityInterfaceExt = "DensityInterface" + DistributionsTestExt = "Test" + + [deps.Distributions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DensityInterface = "b429d917-457f-4dbc-8f4c-0cc954292b1d" + Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[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.EnumX]] +git-tree-sha1 = "bdb1942cd4c45e3c678fd11569d5cccd80976237" +uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" +version = "1.0.4" + +[[deps.EnzymeCore]] +deps = ["Adapt"] +git-tree-sha1 = "2efe862de93cd87f620ad6ac9c9e3f83f1b2841b" +uuid = "f151be2c-9106-41f4-ab19-57ee4f262869" +version = "0.6.4" + +[[deps.ExponentialUtilities]] +deps = ["Adapt", "ArrayInterface", "GPUArraysCore", "GenericSchur", "LinearAlgebra", "PrecompileTools", "Printf", "SparseArrays", "libblastrampoline_jll"] +git-tree-sha1 = "602e4585bcbd5a25bc06f514724593d13ff9e862" +uuid = "d4d017d3-3776-5f7e-afef-a10c40355c18" +version = "1.25.0" + +[[deps.ExprTools]] +git-tree-sha1 = "27415f162e6028e81c72b82ef756bf321213b6ec" +uuid = "e2ba6199-217a-4e67-a87a-7c52f15ade04" +version = "0.1.10" + +[[deps.FastBroadcast]] +deps = ["ArrayInterface", "LinearAlgebra", "Polyester", "Static", "StaticArrayInterface", "StrideArraysCore"] +git-tree-sha1 = "a6e756a880fc419c8b41592010aebe6a5ce09136" +uuid = "7034ab61-46d4-4ed7-9d0f-46aef9175898" +version = "0.2.8" + +[[deps.FastClosures]] +git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef" +uuid = "9aa1b823-49e4-5ca5-8b0f-3971ec8bab6a" +version = "0.3.2" + +[[deps.FastLapackInterface]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "b12f05108e405dadcc2aff0008db7f831374e051" +uuid = "29a986be-02c6-4525-aec4-84b980013641" +version = "2.0.0" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" + +[[deps.FillArrays]] +deps = ["LinearAlgebra", "Random"] +git-tree-sha1 = "25a10f2b86118664293062705fd9c7e2eda881a2" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "1.9.2" +weakdeps = ["PDMats", "SparseArrays", "Statistics"] + + [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + +[[deps.FiniteDiff]] +deps = ["ArrayInterface", "LinearAlgebra", "Requires", "Setfield", "SparseArrays"] +git-tree-sha1 = "c6e4a1fbe73b31a3dea94b1da449503b8830c306" +uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" +version = "2.21.1" + + [deps.FiniteDiff.extensions] + FiniteDiffBandedMatricesExt = "BandedMatrices" + FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" + FiniteDiffStaticArraysExt = "StaticArrays" + + [deps.FiniteDiff.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "cf0fe81336da9fb90944683b8c41984b08793dad" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.36" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.FunctionWrappers]] +git-tree-sha1 = "d62485945ce5ae9c0c48f124a84998d755bae00e" +uuid = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e" +version = "1.1.3" + +[[deps.FunctionWrappersWrappers]] +deps = ["FunctionWrappers"] +git-tree-sha1 = "b104d487b34566608f8b4e1c39fb0b10aa279ff8" +uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf" +version = "0.1.3" + +[[deps.Functors]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "9a68d75d466ccc1218d0552a8e1631151c569545" +uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196" +version = "0.4.5" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" + +[[deps.GPUArrays]] +deps = ["Adapt", "GPUArraysCore", "LLVM", "LinearAlgebra", "Printf", "Random", "Reexport", "Serialization", "Statistics"] +git-tree-sha1 = "85d7fb51afb3def5dcb85ad31c3707795c8bccc1" +uuid = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7" +version = "9.1.0" + +[[deps.GPUArraysCore]] +deps = ["Adapt"] +git-tree-sha1 = "2d6ca471a6c7b536127afccfa7564b5b39227fe0" +uuid = "46192b85-c4d5-4398-a991-12ede77f4527" +version = "0.1.5" + +[[deps.GenericSchur]] +deps = ["LinearAlgebra", "Printf"] +git-tree-sha1 = "fb69b2a645fa69ba5f474af09221b9308b160ce6" +uuid = "c145ed77-6b09-5dd9-b285-bf645a82121e" +version = "0.5.3" + +[[deps.Graphs]] +deps = ["ArnoldiMethod", "Compat", "DataStructures", "Distributed", "Inflate", "LinearAlgebra", "Random", "SharedArrays", "SimpleTraits", "SparseArrays", "Statistics"] +git-tree-sha1 = "899050ace26649433ef1af25bc17a815b3db52b7" +uuid = "86223c79-3864-5bf0-83f7-82e725a168b6" +version = "1.9.0" + +[[deps.HostCPUFeatures]] +deps = ["BitTwiddlingConvenienceFunctions", "IfElse", "Libdl", "Static"] +git-tree-sha1 = "eb8fed28f4994600e29beef49744639d985a04b2" +uuid = "3e5b6fbb-0976-4d2c-9146-d79de83f2fb0" +version = "0.1.16" + +[[deps.HypergeometricFunctions]] +deps = ["DualNumbers", "LinearAlgebra", "OpenLibm_jll", "SpecialFunctions"] +git-tree-sha1 = "f218fe3736ddf977e0e772bc9a586b2383da2685" +uuid = "34004b35-14d8-5ef3-9330-4cdb6864b03a" +version = "0.3.23" + +[[deps.IRTools]] +deps = ["InteractiveUtils", "MacroTools", "Test"] +git-tree-sha1 = "8aa91235360659ca7560db43a7d57541120aa31d" +uuid = "7869d1d1-7146-5819-86e3-90919afe41df" +version = "0.4.11" + +[[deps.IfElse]] +git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" +uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" +version = "0.1.1" + +[[deps.Inflate]] +git-tree-sha1 = "ea8031dea4aff6bd41f1df8f2fdfb25b33626381" +uuid = "d25df0c9-e2be-5dd7-82c8-3ad0b3e990b9" +version = "0.1.4" + +[[deps.IntegerMathUtils]] +git-tree-sha1 = "b8ffb903da9f7b8cf695a8bead8e01814aa24b30" +uuid = "18e54dd8-cb9d-406c-a71d-865a43cbb235" +version = "0.1.2" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "31d6adb719886d4e32e38197aae466e98881320b" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2024.0.0+0" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" + +[[deps.InverseFunctions]] +deps = ["Test"] +git-tree-sha1 = "68772f49f54b479fa88ace904f6127f0a3bb2e46" +uuid = "3587e190-3f89-42d0-90ee-14403ec27112" +version = "0.1.12" + +[[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 = ["Artifacts", "Preferences"] +git-tree-sha1 = "7e5d6779a1e09a36db2a7b6cff50942a0a7d0fca" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.5.0" + +[[deps.JumpProcesses]] +deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "StaticArrays", "UnPack"] +git-tree-sha1 = "e047c47fca2ac1ac687e006a257f96632fb95a7b" +uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5" +version = "9.9.0" +weakdeps = ["FastBroadcast"] + + [deps.JumpProcesses.extensions] + JumpProcessFastBroadcastExt = "FastBroadcast" + +[[deps.KLU]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse_jll"] +git-tree-sha1 = "884c2968c2e8e7e6bf5956af88cb46aa745c854b" +uuid = "ef3ab10e-7fda-4108-b977-705223b18434" +version = "0.4.1" + +[[deps.KernelAbstractions]] +deps = ["Adapt", "Atomix", "InteractiveUtils", "LinearAlgebra", "MacroTools", "PrecompileTools", "Requires", "SparseArrays", "StaticArrays", "UUIDs", "UnsafeAtomics", "UnsafeAtomicsLLVM"] +git-tree-sha1 = "81de11f7b02465435aab0ed7e935965bfcb3072b" +uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" +version = "0.9.14" +weakdeps = ["EnzymeCore"] + + [deps.KernelAbstractions.extensions] + EnzymeExt = "EnzymeCore" + +[[deps.Krylov]] +deps = ["LinearAlgebra", "Printf", "SparseArrays"] +git-tree-sha1 = "8a6837ec02fe5fb3def1abc907bb802ef11a0729" +uuid = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7" +version = "0.9.5" + +[[deps.LLVM]] +deps = ["CEnum", "LLVMExtra_jll", "Libdl", "Preferences", "Printf", "Requires", "Unicode"] +git-tree-sha1 = "0678579657515e88b6632a3a482d39adcbb80445" +uuid = "929cbde3-209d-540e-8aea-75f648917ca0" +version = "6.4.1" + + [deps.LLVM.extensions] + BFloat16sExt = "BFloat16s" + + [deps.LLVM.weakdeps] + BFloat16s = "ab4f0b2a-ad5b-11e8-123f-65d77653426b" + +[[deps.LLVMExtra_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl", "TOML"] +git-tree-sha1 = "98eaee04d96d973e79c25d49167668c5c8fb50e2" +uuid = "dad2f222-ce93-54a1-a47d-0025e8a3acab" +version = "0.0.27+1" + +[[deps.LatticeRules]] +deps = ["Random"] +git-tree-sha1 = "7f5b02258a3ca0221a6a9710b0a0a2e8fb4957fe" +uuid = "73f95e8e-ec14-4e6a-8b18-0d2e271c4e55" +version = "0.0.1" + +[[deps.LayoutPointers]] +deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] +git-tree-sha1 = "62edfee3211981241b57ff1cedf4d74d79519277" +uuid = "10f19ff3-798f-405d-979b-55457f8fc047" +version = "0.1.15" + +[[deps.Lazy]] +deps = ["MacroTools"] +git-tree-sha1 = "1370f8202dac30758f3c345f9909b97f53d87d3f" +uuid = "50d2b5c4-7a5e-59d5-8109-a42b560f39c0" +version = "0.15.1" + +[[deps.LazyArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "MacroTools", "MatrixFactorizations", "SparseArrays"] +git-tree-sha1 = "08d56555410b0683cd7b48bff37aa59cbb0ea908" +uuid = "5078a376-72f3-5289-bfd5-ec5146d43c02" +version = "1.8.2" +weakdeps = ["StaticArrays"] + + [deps.LazyArrays.extensions] + LazyArraysStaticArraysExt = "StaticArrays" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" + +[[deps.LeftChildRightSiblingTrees]] +deps = ["AbstractTrees"] +git-tree-sha1 = "fb6803dafae4a5d62ea5cab204b1e657d9737e7f" +uuid = "1d6d02ad-be62-4b6b-8a6d-2f90e265016e" +version = "0.2.0" + +[[deps.LevyArea]] +deps = ["LinearAlgebra", "Random", "SpecialFunctions"] +git-tree-sha1 = "56513a09b8e0ae6485f34401ea9e2f31357958ec" +uuid = "2d8b4e74-eb68-11e8-0fb9-d5eb67b50637" +version = "1.0.0" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.4" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "8.4.0+0" + +[[deps.LibGit2]] +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" +version = "1.11.0+1" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" + +[[deps.LineSearches]] +deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "Printf"] +git-tree-sha1 = "7bbea35cec17305fc70a0e5b4641477dc0789d9d" +uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" +version = "7.2.0" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + +[[deps.LinearSolve]] +deps = ["ArrayInterface", "ConcreteStructs", "DocStringExtensions", "EnumX", "FastLapackInterface", "GPUArraysCore", "InteractiveUtils", "KLU", "Krylov", "Libdl", "LinearAlgebra", "MKL_jll", "PrecompileTools", "Preferences", "RecursiveFactorization", "Reexport", "Requires", "SciMLBase", "SciMLOperators", "Setfield", "SparseArrays", "Sparspak", "StaticArraysCore", "UnPack"] +git-tree-sha1 = "1961a307fae7aef8e2b331902c6072f0e90e5abb" +uuid = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" +version = "2.20.2" + + [deps.LinearSolve.extensions] + LinearSolveBandedMatricesExt = "BandedMatrices" + LinearSolveBlockDiagonalsExt = "BlockDiagonals" + LinearSolveCUDAExt = "CUDA" + LinearSolveEnzymeExt = ["Enzyme", "EnzymeCore"] + LinearSolveFastAlmostBandedMatricesExt = ["FastAlmostBandedMatrices"] + LinearSolveHYPREExt = "HYPRE" + LinearSolveIterativeSolversExt = "IterativeSolvers" + LinearSolveKernelAbstractionsExt = "KernelAbstractions" + LinearSolveKrylovKitExt = "KrylovKit" + LinearSolveMetalExt = "Metal" + LinearSolvePardisoExt = "Pardiso" + LinearSolveRecursiveArrayToolsExt = "RecursiveArrayTools" + + [deps.LinearSolve.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockDiagonals = "0a1fb500-61f7-11e9-3c65-f5ef3456f9f0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + FastAlmostBandedMatrices = "9d29842c-ecb8-4973-b1e9-a27b1157504e" + HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" + IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153" + KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" + KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77" + Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + Pardiso = "46dd5b70-b6fb-5a00-ae2d-e8fea33afaf2" + RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "7d6dd4e9212aebaeed356de34ccf262a3cd415aa" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.26" + + [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.LoggingExtras]] +deps = ["Dates", "Logging"] +git-tree-sha1 = "c1dd6d7978c12545b4179fb6153b9250c96b0075" +uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36" +version = "1.0.3" + +[[deps.LoopVectorization]] +deps = ["ArrayInterface", "CPUSummary", "CloseOpenIntervals", "DocStringExtensions", "HostCPUFeatures", "IfElse", "LayoutPointers", "LinearAlgebra", "OffsetArrays", "PolyesterWeave", "PrecompileTools", "SIMDTypes", "SLEEFPirates", "Static", "StaticArrayInterface", "ThreadingUtilities", "UnPack", "VectorizationBase"] +git-tree-sha1 = "0f5648fbae0d015e3abe5867bca2b362f67a5894" +uuid = "bdcacae8-1622-11e9-2a5c-532679323890" +version = "0.12.166" +weakdeps = ["ChainRulesCore", "ForwardDiff", "SpecialFunctions"] + + [deps.LoopVectorization.extensions] + ForwardDiffExt = ["ChainRulesCore", "ForwardDiff"] + SpecialFunctionsExt = "SpecialFunctions" + +[[deps.Lux]] +deps = ["ADTypes", "Adapt", "ChainRulesCore", "ConcreteStructs", "Functors", "LinearAlgebra", "LuxCore", "LuxDeviceUtils", "LuxLib", "MacroTools", "Markdown", "Optimisers", "PackageExtensionCompat", "Random", "Reexport", "Setfield", "SparseArrays", "Statistics", "TruncatedStacktraces", "WeightInitializers"] +git-tree-sha1 = "a8e84d2dec289f03ca054be3814de50f2312f0e1" +uuid = "b2108857-7c20-44ae-9111-449ecde12c47" +version = "0.5.10" + + [deps.Lux.extensions] + LuxChainRulesExt = "ChainRules" + LuxComponentArraysExt = "ComponentArrays" + LuxComponentArraysReverseDiffExt = ["ComponentArrays", "ReverseDiff"] + LuxFluxTransformExt = "Flux" + LuxLuxAMDGPUExt = "LuxAMDGPU" + LuxLuxCUDAExt = "LuxCUDA" + LuxTrackerExt = "Tracker" + LuxZygoteExt = "Zygote" + + [deps.Lux.weakdeps] + ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" + FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b" + Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c" + LuxAMDGPU = "83120cb1-ca15-4f04-bf3b-6967d2e6b60b" + LuxCUDA = "d0bbae9a-e099-4d5b-a835-1c6931763bda" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.LuxCore]] +deps = ["Functors", "Random", "Setfield"] +git-tree-sha1 = "6feb02e23f6d70f407af97ca270b3a337af5ae0f" +uuid = "bb33d45b-7691-41d6-9220-0943567d0623" +version = "0.1.6" + +[[deps.LuxDeviceUtils]] +deps = ["Adapt", "ChainRulesCore", "Functors", "LuxCore", "PackageExtensionCompat", "Preferences", "Random", "SparseArrays"] +git-tree-sha1 = "2d5e75ccdcb9c7a7e7da2e1d3fe979b1b62b76db" +uuid = "34f89e08-e1d5-43b4-8944-0b49ac560553" +version = "0.1.10" + + [deps.LuxDeviceUtils.extensions] + LuxDeviceUtilsFillArraysExt = "FillArrays" + LuxDeviceUtilsLuxAMDGPUExt = "LuxAMDGPU" + LuxDeviceUtilsLuxCUDAExt = "LuxCUDA" + LuxDeviceUtilsMetalExt = "Metal" + LuxDeviceUtilsZygoteExt = "Zygote" + + [deps.LuxDeviceUtils.weakdeps] + FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b" + LuxAMDGPU = "83120cb1-ca15-4f04-bf3b-6967d2e6b60b" + LuxCUDA = "d0bbae9a-e099-4d5b-a835-1c6931763bda" + Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.LuxLib]] +deps = ["ChainRulesCore", "KernelAbstractions", "Markdown", "NNlib", "PackageExtensionCompat", "PrecompileTools", "Random", "Reexport", "Statistics"] +git-tree-sha1 = "7dc09243c8b6b4b71d1bac27c8e4593b42379d2e" +uuid = "82251201-b29d-42c6-8e01-566dec8acb11" +version = "0.3.8" + + [deps.LuxLib.extensions] + LuxLibForwardDiffExt = "ForwardDiff" + LuxLibLuxCUDAExt = "LuxCUDA" + LuxLibLuxCUDATrackerExt = ["LuxCUDA", "Tracker"] + LuxLibReverseDiffExt = "ReverseDiff" + LuxLibTrackerExt = "Tracker" + + [deps.LuxLib.weakdeps] + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + LuxCUDA = "d0bbae9a-e099-4d5b-a835-1c6931763bda" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "72dc3cf284559eb8f53aa593fe62cb33f83ed0c0" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2024.0.0+0" + +[[deps.MacroTools]] +deps = ["Markdown", "Random"] +git-tree-sha1 = "9ee1618cbf5240e6d4e0371d6f24065083f60c48" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.11" + +[[deps.ManualMemory]] +git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" +uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667" +version = "0.1.8" + +[[deps.Markdown]] +deps = ["Base64"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" + +[[deps.MatrixFactorizations]] +deps = ["ArrayLayouts", "LinearAlgebra", "Printf", "Random"] +git-tree-sha1 = "78f6e33434939b0ac9ba1df81e6d005ee85a7396" +uuid = "a3b82374-2e81-5b9e-98ce-41277c0e4c87" +version = "2.1.0" + +[[deps.MaybeInplace]] +deps = ["ArrayInterface", "LinearAlgebra", "MacroTools", "SparseArrays"] +git-tree-sha1 = "a85c6a98c9e5a2a7046bc1bb89f28a3241e1de4d" +uuid = "bb5d69b7-63fc-4a16-80bd-7e42200c7bdb" +version = "0.1.1" + +[[deps.MbedTLS_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1" +version = "2.28.2+1" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "f66bdc5de519e8f8ae43bdc598782d35a25b1272" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.1.0" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2023.1.10" + +[[deps.MuladdMacro]] +git-tree-sha1 = "cac9cc5499c25554cba55cd3c30543cff5ca4fab" +uuid = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221" +version = "0.2.4" + +[[deps.NLSolversBase]] +deps = ["DiffResults", "Distributed", "FiniteDiff", "ForwardDiff"] +git-tree-sha1 = "a0b464d183da839699f4c79e7606d9d186ec172c" +uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" +version = "7.8.3" + +[[deps.NLsolve]] +deps = ["Distances", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"] +git-tree-sha1 = "019f12e9a1a7880459d0173c182e6a99365d7ac1" +uuid = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" +version = "4.5.1" + +[[deps.NNlib]] +deps = ["Adapt", "Atomix", "ChainRulesCore", "GPUArraysCore", "KernelAbstractions", "LinearAlgebra", "Pkg", "Random", "Requires", "Statistics"] +git-tree-sha1 = "ac86d2944bf7a670ac8bf0f7ec099b5898abcc09" +uuid = "872c559c-99b0-510c-b3b7-b6c96a88d5cd" +version = "0.9.8" + + [deps.NNlib.extensions] + NNlibAMDGPUExt = "AMDGPU" + NNlibCUDACUDNNExt = ["CUDA", "cuDNN"] + NNlibCUDAExt = "CUDA" + NNlibEnzymeCoreExt = "EnzymeCore" + + [deps.NNlib.weakdeps] + AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + cuDNN = "02a925ec-e4fe-4b08-9a7e-0d78e3d38ccd" + +[[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.NonlinearSolve]] +deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "EnumX", "FastBroadcast", "FiniteDiff", "ForwardDiff", "LazyArrays", "LineSearches", "LinearAlgebra", "LinearSolve", "MaybeInplace", "PrecompileTools", "Printf", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SimpleNonlinearSolve", "SparseArrays", "SparseDiffTools", "StaticArrays", "UnPack"] +git-tree-sha1 = "ec6577e2ebccf19797edcbf5951229598ad35650" +uuid = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" +version = "3.0.1" + + [deps.NonlinearSolve.extensions] + NonlinearSolveBandedMatricesExt = "BandedMatrices" + NonlinearSolveFastLevenbergMarquardtExt = "FastLevenbergMarquardt" + NonlinearSolveLeastSquaresOptimExt = "LeastSquaresOptim" + NonlinearSolveMINPACKExt = "MINPACK" + NonlinearSolveNLsolveExt = "NLsolve" + NonlinearSolveZygoteExt = "Zygote" + + [deps.NonlinearSolve.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + FastLevenbergMarquardt = "7a0df574-e128-4d35-8cbd-3d84502bf7ce" + LeastSquaresOptim = "0fc2ff8b-aaa3-5acd-a817-1944a5e08891" + MINPACK = "4854310b-de5a-5eb6-a2a5-c1dee2bd17f9" + NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.OffsetArrays]] +deps = ["Adapt"] +git-tree-sha1 = "2ac17d29c523ce1cd38e27785a7d23024853a4bb" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.12.10" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.23+2" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.1+2" + +[[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.Optim]] +deps = ["Compat", "FillArrays", "ForwardDiff", "LineSearches", "LinearAlgebra", "NLSolversBase", "NaNMath", "Parameters", "PositiveFactorizations", "Printf", "SparseArrays", "StatsBase"] +git-tree-sha1 = "01f85d9269b13fedc61e63cc72ee2213565f7a72" +uuid = "429524aa-4258-5aef-a3af-852621145aeb" +version = "1.7.8" + +[[deps.Optimisers]] +deps = ["ChainRulesCore", "Functors", "LinearAlgebra", "Random", "Statistics"] +git-tree-sha1 = "34205b1204cc83c43cd9cfe53ffbd3b310f6e8c5" +uuid = "3bd65402-5787-11e9-1adc-39752487f4e2" +version = "0.3.1" + +[[deps.Optimization]] +deps = ["ADTypes", "ArrayInterface", "ConsoleProgressMonitor", "DocStringExtensions", "LinearAlgebra", "Logging", "LoggingExtras", "Pkg", "Printf", "ProgressLogging", "Reexport", "Requires", "SciMLBase", "SparseArrays", "TerminalLoggers"] +git-tree-sha1 = "1aa7ffea6e171167e9cae620d749e16d5874414a" +uuid = "7f7a1694-90dd-40f0-9382-eb1efda571ba" +version = "3.19.3" + + [deps.Optimization.extensions] + OptimizationEnzymeExt = "Enzyme" + OptimizationFiniteDiffExt = "FiniteDiff" + OptimizationForwardDiffExt = "ForwardDiff" + OptimizationMTKExt = "ModelingToolkit" + OptimizationReverseDiffExt = "ReverseDiff" + OptimizationSparseDiffExt = ["SparseDiffTools", "Symbolics", "ReverseDiff"] + OptimizationTrackerExt = "Tracker" + OptimizationZygoteExt = "Zygote" + + [deps.Optimization.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseDiffTools = "47a9eef4-7e08-11e9-0b38-333d64bd3804" + Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.OptimizationOptimJL]] +deps = ["Optim", "Optimization", "Reexport", "SparseArrays"] +git-tree-sha1 = "bea24fb320d58cb639e3cbc63f8eedde6c667bd3" +uuid = "36348300-93cb-4f02-beb5-3c3902f8871e" +version = "0.1.14" + +[[deps.OptimizationOptimisers]] +deps = ["Optimisers", "Optimization", "Printf", "ProgressLogging", "Reexport"] +git-tree-sha1 = "69143c5e9b1533e9eab8d64cfe7813dfaf66c521" +uuid = "42dfb2eb-d2b4-4451-abcd-913932933ac1" +version = "0.1.6" + +[[deps.OrderedCollections]] +git-tree-sha1 = "dfdf5519f235516220579f949664f1bf44e741c5" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.6.3" + +[[deps.OrdinaryDiffEq]] +deps = ["ADTypes", "Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "ExponentialUtilities", "FastBroadcast", "FastClosures", "FiniteDiff", "ForwardDiff", "FunctionWrappersWrappers", "IfElse", "InteractiveUtils", "LineSearches", "LinearAlgebra", "LinearSolve", "Logging", "LoopVectorization", "MacroTools", "MuladdMacro", "NLsolve", "NonlinearSolve", "Polyester", "PreallocationTools", "PrecompileTools", "Preferences", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLNLSolve", "SciMLOperators", "SimpleNonlinearSolve", "SimpleUnPack", "SparseArrays", "SparseDiffTools", "StaticArrayInterface", "StaticArrays", "TruncatedStacktraces"] +git-tree-sha1 = "00047d53841f56b740ec9e33325b8704eee9f3f9" +uuid = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" +version = "6.60.0" + +[[deps.PDMats]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "949347156c25054de2db3b166c52ac4728cbad65" +uuid = "90014a1f-27ba-587c-ab20-58faa44d9150" +version = "0.11.31" + +[[deps.PackageExtensionCompat]] +git-tree-sha1 = "fb28e33b8a95c4cee25ce296c817d89cc2e53518" +uuid = "65ce6f38-6b18-4e1d-a461-8949797d7930" +version = "1.0.2" +weakdeps = ["Requires", "TOML"] + +[[deps.Parameters]] +deps = ["OrderedCollections", "UnPack"] +git-tree-sha1 = "34c0e9ad262e5f7fc75b10a9952ca7692cfc5fbe" +uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" +version = "0.12.3" + +[[deps.PartialFunctions]] +deps = ["MacroTools"] +git-tree-sha1 = "47b49a4dbc23b76682205c646252c0f9e1eb75af" +uuid = "570af359-4316-4cb7-8c74-252c00c2016b" +version = "1.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.10.0" + +[[deps.PoissonRandom]] +deps = ["Random"] +git-tree-sha1 = "a0f1159c33f846aa77c3f30ebbc69795e5327152" +uuid = "e409e4f3-bfea-5376-8464-e040bb5c01ab" +version = "0.4.4" + +[[deps.Polyester]] +deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Requires", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] +git-tree-sha1 = "fca25670784a1ae44546bcb17288218310af2778" +uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" +version = "0.7.9" + +[[deps.PolyesterWeave]] +deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] +git-tree-sha1 = "240d7170f5ffdb285f9427b92333c3463bf65bf6" +uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" +version = "0.2.1" + +[[deps.PositiveFactorizations]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "17275485f373e6673f7e7f97051f703ed5b15b20" +uuid = "85a6dd25-e78a-55b7-8502-1745935b8125" +version = "0.2.4" + +[[deps.PreallocationTools]] +deps = ["Adapt", "ArrayInterface", "ForwardDiff", "Requires"] +git-tree-sha1 = "f739b1b3cc7b9949af3b35089931f2b58c289163" +uuid = "d236fae5-4411-538c-8e31-a6e3d9e00b46" +version = "0.4.12" +weakdeps = ["ReverseDiff"] + + [deps.PreallocationTools.extensions] + PreallocationToolsReverseDiffExt = "ReverseDiff" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "03b4c25b43cb84cee5c90aa9b5ea0a78fd848d2f" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.2.0" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "00805cd429dcb4870060ff49ef443486c262e38e" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.4.1" + +[[deps.Primes]] +deps = ["IntegerMathUtils"] +git-tree-sha1 = "1d05623b5952aed1307bf8b43bec8b8d1ef94b6e" +uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae" +version = "0.5.5" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" + +[[deps.ProgressLogging]] +deps = ["Logging", "SHA", "UUIDs"] +git-tree-sha1 = "80d919dee55b9c50e8d9e2da5eeafff3fe58b539" +uuid = "33c8b6b6-d38a-422a-b730-caa89a2f386c" +version = "0.1.4" + +[[deps.ProgressMeter]] +deps = ["Distributed", "Printf"] +git-tree-sha1 = "00099623ffee15972c16111bcf84c58a0051257c" +uuid = "92933f4c-e287-5a05-a399-4b506db050ca" +version = "1.9.0" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "9ebcd48c498668c7fa0e97a9cae873fbee7bfee1" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.9.1" + +[[deps.QuasiMonteCarlo]] +deps = ["Accessors", "ConcreteStructs", "LatticeRules", "LinearAlgebra", "Primes", "Random", "Requires", "Sobol", "StatsBase"] +git-tree-sha1 = "cc086f8485bce77b6187141e1413c3b55f9a4341" +uuid = "8a4e6c94-4038-4cdc-81c3-7e6ffdb2a71b" +version = "0.3.3" +weakdeps = ["Distributions"] + + [deps.QuasiMonteCarlo.extensions] + QuasiMonteCarloDistributionsExt = "Distributions" + +[[deps.REPL]] +deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" + +[[deps.Random123]] +deps = ["Random", "RandomNumbers"] +git-tree-sha1 = "552f30e847641591ba3f39fd1bed559b9deb0ef3" +uuid = "74087812-796a-5b5d-8853-05524746bad3" +version = "1.6.1" + +[[deps.RandomNumbers]] +deps = ["Random", "Requires"] +git-tree-sha1 = "043da614cc7e95c703498a491e2c21f58a2b8111" +uuid = "e6cf234a-135c-5ec9-84dd-332b85af5143" +version = "1.5.3" + +[[deps.RealDot]] +deps = ["LinearAlgebra"] +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.RecursiveArrayTools]] +deps = ["Adapt", "ArrayInterface", "DocStringExtensions", "GPUArraysCore", "IteratorInterfaceExtensions", "LinearAlgebra", "RecipesBase", "Requires", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables"] +git-tree-sha1 = "d7087c013e8a496ff396bae843b1e16d9a30ede8" +uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" +version = "2.38.10" + + [deps.RecursiveArrayTools.extensions] + RecursiveArrayToolsMeasurementsExt = "Measurements" + RecursiveArrayToolsMonteCarloMeasurementsExt = "MonteCarloMeasurements" + RecursiveArrayToolsTrackerExt = "Tracker" + RecursiveArrayToolsZygoteExt = "Zygote" + + [deps.RecursiveArrayTools.weakdeps] + Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7" + MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.RecursiveFactorization]] +deps = ["LinearAlgebra", "LoopVectorization", "Polyester", "PrecompileTools", "StrideArraysCore", "TriangularSolve"] +git-tree-sha1 = "8bc86c78c7d8e2a5fe559e3721c0f9c9e303b2ed" +uuid = "f2c3362d-daeb-58d1-803e-2bc74f2840b4" +version = "0.2.21" + +[[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.ResettableStacks]] +deps = ["StaticArrays"] +git-tree-sha1 = "256eeeec186fa7f26f2801732774ccf277f05db9" +uuid = "ae5879a3-cd67-5da8-be7f-38c6eb64a37b" +version = "1.1.1" + +[[deps.ReverseDiff]] +deps = ["ChainRulesCore", "DiffResults", "DiffRules", "ForwardDiff", "FunctionWrappers", "LinearAlgebra", "LogExpFunctions", "MacroTools", "NaNMath", "Random", "SpecialFunctions", "StaticArrays", "Statistics"] +git-tree-sha1 = "d1235bdd57a93bd7504225b792b867e9a7df38d5" +uuid = "37e2e3b7-166d-5795-8a7a-e32c996b4267" +version = "1.15.1" + +[[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.RuntimeGeneratedFunctions]] +deps = ["ExprTools", "SHA", "Serialization"] +git-tree-sha1 = "6aacc5eefe8415f47b3e34214c1d79d2674a0ba2" +uuid = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47" +version = "0.5.12" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.SIMDTypes]] +git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" +uuid = "94e857df-77ce-4151-89e5-788b33177be4" +version = "0.1.0" + +[[deps.SLEEFPirates]] +deps = ["IfElse", "Static", "VectorizationBase"] +git-tree-sha1 = "3aac6d68c5e57449f5b9b865c9ba50ac2970c4cf" +uuid = "476501e8-09a2-5ece-8869-fb82de89a1fa" +version = "0.6.42" + +[[deps.SafeTestsets]] +git-tree-sha1 = "81ec49d645af090901120a1542e67ecbbe044db3" +uuid = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" +version = "0.1.0" + +[[deps.SciMLBase]] +deps = ["ADTypes", "ArrayInterface", "CommonSolve", "ConstructionBase", "Distributed", "DocStringExtensions", "EnumX", "FillArrays", "FunctionWrappersWrappers", "IteratorInterfaceExtensions", "LinearAlgebra", "Logging", "Markdown", "PrecompileTools", "Preferences", "Printf", "QuasiMonteCarlo", "RecipesBase", "RecursiveArrayTools", "Reexport", "RuntimeGeneratedFunctions", "SciMLOperators", "StaticArraysCore", "Statistics", "SymbolicIndexingInterface", "Tables", "TruncatedStacktraces"] +git-tree-sha1 = "d432b4c4cc922fb7b21b555c138aa87f9fb7beb8" +uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" +version = "2.9.1" + + [deps.SciMLBase.extensions] + SciMLBaseChainRulesCoreExt = "ChainRulesCore" + SciMLBasePartialFunctionsExt = "PartialFunctions" + SciMLBasePyCallExt = "PyCall" + SciMLBasePythonCallExt = "PythonCall" + SciMLBaseRCallExt = "RCall" + SciMLBaseZygoteExt = "Zygote" + + [deps.SciMLBase.weakdeps] + ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b" + PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0" + PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" + RCall = "6f49c342-dc21-5d91-9882-a32aef131414" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.SciMLNLSolve]] +deps = ["DiffEqBase", "LineSearches", "NLsolve", "Reexport", "SciMLBase"] +git-tree-sha1 = "765b788339abd7d983618c09cfc0192e2b6b15fd" +uuid = "e9a6253c-8580-4d32-9898-8661bb511710" +version = "0.1.9" + +[[deps.SciMLOperators]] +deps = ["ArrayInterface", "DocStringExtensions", "Lazy", "LinearAlgebra", "Setfield", "SparseArrays", "StaticArraysCore", "Tricks"] +git-tree-sha1 = "51ae235ff058a64815e0a2c34b1db7578a06813d" +uuid = "c0aeaf25-5076-4817-a8d5-81caf7dfa961" +version = "0.3.7" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" + +[[deps.Setfield]] +deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] +git-tree-sha1 = "e2cc6d8c88613c05e1defb55170bf5ff211fbeac" +uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" +version = "1.1.1" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" + +[[deps.SimpleNonlinearSolve]] +deps = ["ADTypes", "ArrayInterface", "ConcreteStructs", "DiffEqBase", "FiniteDiff", "ForwardDiff", "LinearAlgebra", "MaybeInplace", "PrecompileTools", "Reexport", "SciMLBase", "StaticArraysCore"] +git-tree-sha1 = "62b08ae70b9fe7e4dacffcf9cbb0e5c2d6688d09" +uuid = "727e6d20-b764-4bd8-a329-72de5adea6c7" +version = "1.0.2" + +[[deps.SimpleTraits]] +deps = ["InteractiveUtils", "MacroTools"] +git-tree-sha1 = "5d7e3f4e11935503d3ecaf7186eac40602e7d231" +uuid = "699a6c99-e7fa-54fc-8d76-47d257e15c1d" +version = "0.9.4" + +[[deps.SimpleUnPack]] +git-tree-sha1 = "58e6353e72cde29b90a69527e56df1b5c3d8c437" +uuid = "ce78b400-467f-4804-87d8-8f486da07d0a" +version = "1.1.0" + +[[deps.Sobol]] +deps = ["DelimitedFiles", "Random"] +git-tree-sha1 = "5a74ac22a9daef23705f010f72c81d6925b19df8" +uuid = "ed01d8cd-4d21-5b2a-85b4-cc3bdc58bad4" +version = "1.5.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "5165dfb9fd131cf0c6957a3a7605dede376e7b63" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.2.0" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.10.0" + +[[deps.SparseDiffTools]] +deps = ["ADTypes", "Adapt", "ArrayInterface", "Compat", "DataStructures", "FiniteDiff", "ForwardDiff", "Graphs", "LinearAlgebra", "PackageExtensionCompat", "Random", "Reexport", "SciMLOperators", "Setfield", "SparseArrays", "StaticArrayInterface", "StaticArrays", "Tricks", "UnPack", "VertexSafeGraphs"] +git-tree-sha1 = "ddea63e5de5405878d990a2cea4fc1daf2d52d41" +uuid = "47a9eef4-7e08-11e9-0b38-333d64bd3804" +version = "2.14.0" + + [deps.SparseDiffTools.extensions] + SparseDiffToolsEnzymeExt = "Enzyme" + SparseDiffToolsSymbolicsExt = "Symbolics" + SparseDiffToolsZygoteExt = "Zygote" + + [deps.SparseDiffTools.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.SparseInverseSubset]] +deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "91402087fd5d13b2d97e3ef29bbdf9d7859e678a" +uuid = "dc90abb0-5640-4711-901d-7e5b23a2fada" +version = "0.1.1" + +[[deps.Sparspak]] +deps = ["Libdl", "LinearAlgebra", "Logging", "OffsetArrays", "Printf", "SparseArrays", "Test"] +git-tree-sha1 = "342cf4b449c299d8d1ceaf00b7a49f4fbc7940e7" +uuid = "e56a9233-b9d6-4f03-8d0f-1825330902ac" +version = "0.3.9" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "e2cfc4012a19088254b3950b85c3c1d8882d864d" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.3.1" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.Static]] +deps = ["IfElse"] +git-tree-sha1 = "f295e0a1da4ca425659c57441bcb59abb035a4bc" +uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" +version = "0.8.8" + +[[deps.StaticArrayInterface]] +deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "Requires", "SparseArrays", "Static", "SuiteSparse"] +git-tree-sha1 = "03fec6800a986d191f64f5c0996b59ed526eda25" +uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" +version = "1.4.1" +weakdeps = ["OffsetArrays", "StaticArrays"] + + [deps.StaticArrayInterface.extensions] + StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" + StaticArrayInterfaceStaticArraysExt = "StaticArrays" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +git-tree-sha1 = "f903a6cd22540e44f2aefd4b755b52192da44210" +repo-rev = "ap/chainrules" +repo-url = "https://github.com/avik-pal/StaticArrays.jl" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.8.0" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.2" + +[[deps.Statistics]] +deps = ["LinearAlgebra", "SparseArrays"] +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.10.0" + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "1ff449ad350c9c4cbc756624d6f8a8c3ef56d3ed" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.7.0" + +[[deps.StatsBase]] +deps = ["DataAPI", "DataStructures", "LinearAlgebra", "LogExpFunctions", "Missings", "Printf", "Random", "SortingAlgorithms", "SparseArrays", "Statistics", "StatsAPI"] +git-tree-sha1 = "1d77abd07f617c4868c33d4f5b9e1dbb2643c9cf" +uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" +version = "0.34.2" + +[[deps.StatsFuns]] +deps = ["HypergeometricFunctions", "IrrationalConstants", "LogExpFunctions", "Reexport", "Rmath", "SpecialFunctions"] +git-tree-sha1 = "f625d686d5a88bcd2b15cd81f18f98186fdc0c9a" +uuid = "4c63d2b9-4356-54db-8cca-17b64c39e42c" +version = "1.3.0" +weakdeps = ["ChainRulesCore", "InverseFunctions"] + + [deps.StatsFuns.extensions] + StatsFunsChainRulesCoreExt = "ChainRulesCore" + StatsFunsInverseFunctionsExt = "InverseFunctions" + +[[deps.SteadyStateDiffEq]] +deps = ["ConcreteStructs", "DiffEqBase", "DiffEqCallbacks", "LinearAlgebra", "Reexport", "SciMLBase"] +git-tree-sha1 = "a735fd5053724cf4de31c81b4e2cc429db844be5" +uuid = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" +version = "2.0.1" + +[[deps.StochasticDiffEq]] +deps = ["Adapt", "ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqNoiseProcess", "DocStringExtensions", "FillArrays", "FiniteDiff", "ForwardDiff", "JumpProcesses", "LevyArea", "LinearAlgebra", "Logging", "MuladdMacro", "NLsolve", "OrdinaryDiffEq", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "SciMLOperators", "SparseArrays", "SparseDiffTools", "StaticArrays", "UnPack"] +git-tree-sha1 = "7a71f1e67cbcfcd5387707e6621431d1afff62a9" +uuid = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" +version = "6.63.2" + +[[deps.StrideArraysCore]] +deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] +git-tree-sha1 = "d6415f66f3d89c615929af907fdc6a3e17af0d8c" +uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da" +version = "0.5.2" + +[[deps.StructArrays]] +deps = ["Adapt", "ConstructionBase", "DataAPI", "GPUArraysCore", "StaticArraysCore", "Tables"] +git-tree-sha1 = "0a3db38e4cce3c54fe7a71f831cd7b6194a54213" +uuid = "09ab397b-f2b6-538f-b94a-2f83cf4a842a" +version = "0.6.16" + +[[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 = "7.2.1+1" + +[[deps.SymbolicIndexingInterface]] +deps = ["DocStringExtensions"] +git-tree-sha1 = "f8ab052bfcbdb9b48fad2c80c873aa0d0344dfe5" +uuid = "2efcf032-c050-4f8e-a9bb-153293bab1f5" +version = "0.2.2" + +[[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"] +git-tree-sha1 = "cb76cf677714c095e535e3501ac7954732aeea2d" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.11.1" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.TerminalLoggers]] +deps = ["LeftChildRightSiblingTrees", "Logging", "Markdown", "Printf", "ProgressLogging", "UUIDs"] +git-tree-sha1 = "f133fab380933d042f6796eda4e130272ba520ca" +uuid = "5d786b92-1e48-4d6f-9151-6b4477ca9bed" +version = "0.1.7" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" + +[[deps.ThreadingUtilities]] +deps = ["ManualMemory"] +git-tree-sha1 = "eda08f7e9818eb53661b3deb74e3159460dfbc27" +uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" +version = "0.5.2" + +[[deps.TriangularSolve]] +deps = ["CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "LoopVectorization", "Polyester", "Static", "VectorizationBase"] +git-tree-sha1 = "fadebab77bf3ae041f77346dd1c290173da5a443" +uuid = "d5829a12-d9aa-46ab-831f-fb7c9ab06edf" +version = "0.1.20" + +[[deps.Tricks]] +git-tree-sha1 = "eae1bb484cd63b36999ee58be2de6c178105112f" +uuid = "410a4b4d-49e4-4fbc-ab6d-cb71b17b3775" +version = "0.1.8" + +[[deps.TruncatedStacktraces]] +deps = ["InteractiveUtils", "MacroTools", "Preferences"] +git-tree-sha1 = "ea3e54c2bdde39062abf5a9758a23735558705e1" +uuid = "781d530d-4396-4725-bb49-402e4bee1e77" +version = "1.4.0" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" + +[[deps.UnPack]] +git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.2" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" + +[[deps.UnsafeAtomics]] +git-tree-sha1 = "6331ac3440856ea1988316b46045303bef658278" +uuid = "013be700-e6cd-48c3-b4a1-df204f14c38f" +version = "0.2.1" + +[[deps.UnsafeAtomicsLLVM]] +deps = ["LLVM", "UnsafeAtomics"] +git-tree-sha1 = "323e3d0acf5e78a56dfae7bd8928c989b4f3083e" +uuid = "d80eeb9a-aca5-4d75-85e5-170c8b632249" +version = "0.1.3" + +[[deps.VectorizationBase]] +deps = ["ArrayInterface", "CPUSummary", "HostCPUFeatures", "IfElse", "LayoutPointers", "Libdl", "LinearAlgebra", "SIMDTypes", "Static", "StaticArrayInterface"] +git-tree-sha1 = "7209df901e6ed7489fe9b7aa3e46fb788e15db85" +uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f" +version = "0.21.65" + +[[deps.VertexSafeGraphs]] +deps = ["Graphs"] +git-tree-sha1 = "8351f8d73d7e880bfc042a8b6922684ebeafb35c" +uuid = "19fa3120-7c27-5ec5-8db8-b0b0aa330d6f" +version = "0.2.0" + +[[deps.WeightInitializers]] +deps = ["PartialFunctions", "Random", "SpecialFunctions", "Statistics"] +git-tree-sha1 = "d74c34f55608b88d6646a29b32de47cb1c1675aa" +uuid = "d49dbf32-c5c2-4618-8acc-27bb2598ef2d" +version = "0.1.2" + + [deps.WeightInitializers.extensions] + WeightInitializersCUDAExt = "CUDA" + + [deps.WeightInitializers.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.2.13+1" + +[[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" +uuid = "e88e6eb3-aa80-5325-afca-941959d7151f" +version = "0.6.67" + + [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 = "9d749cd449fb448aeca4feee9a2f4186dbb5d184" +uuid = "700de1a5-db45-46bc-99cf-38207098b444" +version = "0.2.4" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.8.0+1" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.52.0+1" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.4.0+2" diff --git a/test/Project.toml b/test/Project.toml index dbc0b3842..247e4c152 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -4,46 +4,62 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" Calculus = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9" ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" DelayDiffEq = "bcd4f6db-9728-5f36-b5f7-82caef46ccdb" +DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e" +DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def" +DiffEqNoiseProcess = "77a26b50-5914-5dd7-bc55-306e6241c503" Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" -Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c" +ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196" +LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" Lux = "b2108857-7c20-44ae-9111-449ecde12c47" NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba" OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e" OptimizationOptimisers = "42dfb2eb-d2b4-4451-abcd-913932933ac1" +OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd" ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" -SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" SteadyStateDiffEq = "9672c7b4-1e72-59bd-8a11-6ac3964bc41f" +StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" [compat] AlgebraicMultigrid = "0.6.0" Aqua = "0.8.4" Calculus = "0.5.1" ComponentArrays = "0.15.5" -DelayDiffEq = "5.43.1" +DelayDiffEq = "5.43.2" +DiffEqBase = "6.142.0" +DiffEqCallbacks = "2.34.0" +DiffEqNoiseProcess = "5.19.0" Distributed = "<0.0.1, 1" -Flux = "0.14.7" +ForwardDiff = "0.10.36" Functors = "0.4.5" +LinearSolve = "2.20.2" Lux = "0.5.10" NLsolve = "4.5.1" NonlinearSolve = "3.0.1" Optimization = "3.19.3" OptimizationOptimJL = "0.1.14" OptimizationOptimisers = "0.1.6" +OrdinaryDiffEq = "6.60.0" Pkg = "<0.0.1, 1" +QuadGK = "2.9.1" Random = "<0.0.1, 1" +RecursiveArrayTools = "2.4.2" ReverseDiff = "1.15.1" SafeTestsets = "0.1.0" -SciMLSensitivity = "7.47.0" SparseArrays = "<0.0.1, 1" -StaticArrays = "1.7.0" +StaticArrays = "1.8.0" SteadyStateDiffEq = "2.0.1" +StochasticDiffEq = "6.63.2" Test = "<0.0.1, 1" +Zygote = "0.6.67" diff --git a/test/adjoint_oop.jl b/test/adjoint_oop.jl index 1e9aee892..f775be137 100644 --- a/test/adjoint_oop.jl +++ b/test/adjoint_oop.jl @@ -1,5 +1,4 @@ -using SciMLSensitivity, OrdinaryDiffEq, StaticArrays, QuadGK, ForwardDiff, - Zygote +using SciMLSensitivity, OrdinaryDiffEq, StaticArrays, QuadGK, ForwardDiff, Zygote using Test ##StaticArrays rrule @@ -59,20 +58,17 @@ sol = solve(prob, Tsit5(), saveat = tsteps, abstol = 1e-14, reltol = 1e-14) dg_disc(u, p, t, i; outtype = nothing) = u du0, dp = adjoint_sensitivities(sol, Tsit5(); t = tsteps, dgdu_discrete = dg_disc, - sensealg = QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, - autojacvec = ZygoteVJP())) + sensealg = QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, autojacvec = ZygoteVJP())) @test !iszero(du0) @test !iszero(dp) # adj_prob = ODEAdjointProblem(sol, - QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, - autojacvec = SciMLSensitivity.ZygoteVJP()), + QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, autojacvec = ZygoteVJP()), Tsit5(), tsteps, dg_disc) adj_sol = solve(adj_prob, Tsit5(), abstol = 1e-14, reltol = 1e-14) integrand = AdjointSensitivityIntegrand(sol, adj_sol, - QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, - autojacvec = SciMLSensitivity.ZygoteVJP())) + QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, autojacvec = ZygoteVJP())) res, err = quadgk(integrand, 0.0, 5.0, atol = 1e-14, rtol = 1e-14) @test adj_sol[end]≈du0 rtol=1e-12 @@ -96,9 +92,7 @@ function dg_disc(du, u, p, t, i) end du1, dp1 = adjoint_sensitivities(sol, Tsit5(); t = tsteps, dgdu_discrete = dg_disc, - sensealg = QuadratureAdjoint(abstol = 1e-14, - reltol = 1e-14, - autojacvec = ZygoteVJP())) + sensealg = QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, autojacvec = ZygoteVJP())) @test du0≈du1 rtol=1e-12 @test dp≈dp1 rtol=1e-12 @@ -145,20 +139,17 @@ function dg(u, p, t) end du0, dp = adjoint_sensitivities(sol, Tsit5(); dgdu_continuous = dg, g = g, - sensealg = QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, - autojacvec = ZygoteVJP())) + sensealg = QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, autojacvec = ZygoteVJP())) @test !iszero(du0) @test !iszero(dp) adj_prob = ODEAdjointProblem(sol, - QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, - autojacvec = SciMLSensitivity.ZygoteVJP()), + QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, autojacvec = ZygoteVJP()), Tsit5(), nothing, nothing, nothing, dg, nothing, g) adj_sol = solve(adj_prob, Tsit5(), abstol = 1e-14, reltol = 1e-14) integrand = AdjointSensitivityIntegrand(sol, adj_sol, - QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, - autojacvec = SciMLSensitivity.ZygoteVJP())) + QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, autojacvec = ZygoteVJP())) res, err = quadgk(integrand, 0.0, 5.0, atol = 1e-14, rtol = 1e-14) @test adj_sol[end]≈du0 rtol=1e-12 @@ -191,10 +182,8 @@ f_dp = ForwardDiff.gradient(G_p, p) ## concrete solve du0, dp = Zygote.gradient((u0, p) -> sum(concrete_solve(prob, Tsit5(), u0, p, - abstol = 1e-10, reltol = 1e-10, - saveat = tsteps, - sensealg = QuadratureAdjoint(abstol = 1e-14, - reltol = 1e-14, + abstol = 1e-10, reltol = 1e-10, saveat = tsteps, + sensealg = QuadratureAdjoint(abstol = 1e-14, reltol = 1e-14, autojacvec = ZygoteVJP()))), u0, p) diff --git a/test/adjoint_param.jl b/test/adjoint_param.jl index 5f5b9fdcd..fca3af9f5 100644 --- a/test/adjoint_param.jl +++ b/test/adjoint_param.jl @@ -1,9 +1,4 @@ -using Test -using OrdinaryDiffEq -using SciMLSensitivity -using ForwardDiff -using QuadGK -using Zygote +using Test, OrdinaryDiffEq, SciMLSensitivity, ForwardDiff, QuadGK, Zygote abstol = 1e-12 reltol = 1e-12 @@ -31,8 +26,7 @@ res_quad = adjoint_sensitivities(sol, Vern9(), dgdu_continuous = dgdu, reltol = reltol, sensealg = QuadratureAdjoint()) res_back = adjoint_sensitivities(sol, Vern9(), dgdu_continuous = dgdu, dgdp_continuous = dgdp, abstol = abstol, - reltol = reltol, - sensealg = BacksolveAdjoint(checkpointing = true)) # it's blowing up + reltol = reltol, sensealg = BacksolveAdjoint(checkpointing = true)) function G(p) tmp_prob = remake(prob, p = p, u0 = convert.(eltype(p), prob.u0)) diff --git a/test/adjoint_shapes.jl b/test/adjoint_shapes.jl index dc74dea11..0c6510a1f 100644 --- a/test/adjoint_shapes.jl +++ b/test/adjoint_shapes.jl @@ -21,16 +21,13 @@ end policy_params = ones(2, 2) z0 = zeros(3) fwd_sol = solve(ODEProblem(aug_dynamics!, z0, (0.0, 1.0), policy_params), - Tsit5(), - u0 = z0, - p = policy_params) + Tsit5(), u0 = z0, p = policy_params) sensealg = InterpolatingAdjoint() -sensealg = SciMLSensitivity.setvjp(sensealg, SciMLSensitivity.inplace_vjp(fwd_sol.prob, fwd_sol.prob.u0, fwd_sol.prob.p, true)) +sensealg = SciMLSensitivity.setvjp(sensealg, + SciMLSensitivity.inplace_vjp(fwd_sol.prob, fwd_sol.prob.u0, fwd_sol.prob.p, true)) -solve(ODEAdjointProblem(fwd_sol, - sensealg, - Tsit5(), +solve(ODEAdjointProblem(fwd_sol, sensealg, Tsit5(), [1.0], (out, x, p, t, i) -> (out .= 1)), Tsit5()) A = ones(2, 2) @@ -47,13 +44,8 @@ end policy_params = ones(2, 2) z0 = zeros(3) -fwd_sol = solve(ODEProblem(aug_dynamics!, z0, (0.0, 1.0), policy_params), - u0 = z0, +fwd_sol = solve(ODEProblem(aug_dynamics!, z0, (0.0, 1.0), policy_params), u0 = z0, p = policy_params, Tsit5()) -solve(ODEAdjointProblem(fwd_sol, - sensealg, - Tsit5(), - [1.0], - (out, x, p, t, i) -> (out .= 1)), - Tsit5()) +solve(ODEAdjointProblem(fwd_sol, sensealg, Tsit5(), [1.0], + (out, x, p, t, i) -> (out .= 1)), Tsit5()) diff --git a/test/callback_reversediff.jl b/test/callback_reversediff.jl index fcde31270..5d188468f 100644 --- a/test/callback_reversediff.jl +++ b/test/callback_reversediff.jl @@ -1,4 +1,5 @@ -using OrdinaryDiffEq, Flux, SciMLSensitivity, DiffEqCallbacks, Test +using OrdinaryDiffEq, Lux, ComponentArrays, SciMLSensitivity, DiffEqCallbacks, Test +using Optimization, OptimizationOptimisers, Zygote using Random Random.seed!(1234) @@ -28,13 +29,13 @@ t = range(tspan[1], tspan[2], length = datasize) prob = ODEProblem(trueODEfunc, u0, tspan) ode_data = Array(solve(prob, Tsit5(), callback = CallbackSet(cbPreTime, cbFctCall), saveat = t)) -dudt2 = Chain(Dense(2, 50, tanh), - Dense(50, 2)) -p, re = Flux.destructure(dudt2) # use this p as the initial condition! +dudt2 = Chain(Dense(2, 50, tanh), Dense(50, 2)) +ps, st = Lux.setup(Random.default_rng(), dudt2) +ps = ComponentArray(ps) function dudt(du, u, p, t) du[1:2] .= -u[1:2] - du[3:end] .= re(p)(u[1:2]) #re(p)(u[3:end]) + du[3:end] .= first(dudt2(u[1:2], p, st)) #re(p)(u[3:end]) end z0 = Float32[u0; u0] prob = ODEProblem(dudt, z0, tspan) @@ -42,33 +43,24 @@ prob = ODEProblem(dudt, z0, tspan) affect!(integrator) = integrator.u[1:2] .= integrator.u[3:end] cb = PresetTimeCallback(dosetimes, affect!, save_positions = (false, false)) -function predict_n_ode() - _prob = remake(prob, p = p) - Array(solve(_prob, Tsit5(), u0 = z0, p = p, callback = cb, saveat = t, - sensealg = ReverseDiffAdjoint()))[1:2, - :] - #Array(solve(prob,Tsit5(),u0=z0,p=p,saveat=t))[1:2,:] +function predict_n_ode(ps) + Array(solve(prob, Tsit5(), u0 = z0, p = ps, callback = cb, saveat = t, + sensealg = ReverseDiffAdjoint()))[1:2, :] end -function loss_n_ode() - pred = predict_n_ode() +function loss_n_ode(ps, _) + pred = predict_n_ode(ps) loss = sum(abs2, ode_data .- pred) loss end -loss_n_ode() # n_ode.p stores the initial parameters of the neural ODE +loss_n_ode(ps, nothing) -cba = function (; doplot = false) #callback function to observe training - pred = predict_n_ode() - display(sum(abs2, ode_data .- pred)) - # plot current prediction against data - #pl = scatter(t,ode_data[1,:],label="data") - #scatter!(pl,t,pred[1,:],label="prediction") - #display(plot(pl)) +cb1 = function (p, l) + @show l return false end -cba() -ps = Flux.params(p) -data = Iterators.repeated((), 200) -Flux.train!(loss_n_ode, ps, data, ADAM(0.05), cb = cba) -@test loss_n_ode() < 0.4 +res = solve(OptimizationProblem(OptimizationFunction(loss_n_ode, AutoZygote()), ps), + Adam(0.05); callback = cb1, maxiters = 100) + +@test loss_n_ode(res.u, nothing) < 0.4 diff --git a/test/complex_no_u.jl b/test/complex_no_u.jl index ed1d94f9e..ea449272d 100644 --- a/test/complex_no_u.jl +++ b/test/complex_no_u.jl @@ -1,21 +1,23 @@ -using OrdinaryDiffEq, SciMLSensitivity, LinearAlgebra, Optimization, OptimizationOptimisers, Flux +using OrdinaryDiffEq, ComponentArrays, + SciMLSensitivity, LinearAlgebra, Optimization, OptimizationOptimisers, Lux nn = Chain(Dense(1, 16), Dense(16, 16, tanh), Dense(16, 2)) |> f64 -initial, re = Flux.destructure(nn) +ps, st = Lux.setup(Random.default_rng(), nn) +ps = ComponentArray(ps) function ode2!(u, p, t) - f1, f2 = re(p)([t]) .+ im + f1, f2 = first(nn([t], p, st)) .+ im [-f1^2; f2] end tspan = (0.0, 10.0) -prob = ODEProblem(ode2!, Complex{Float64}[0; 0], tspan, initial) +prob = ODEProblem(ode2!, Complex{Float64}[0; 0], tspan, ps) -function loss(p) +loss = function (p) sol = last(solve(prob, Tsit5(), p = p, sensealg = BacksolveAdjoint(autojacvec = ZygoteVJP(allow_nothing = true)))) return norm(sol) end optf = Optimization.OptimizationFunction((x, p) -> loss(x), Optimization.AutoZygote()) -optprob = Optimization.OptimizationProblem(optf, initial) -res = Optimization.solve(optprob, ADAM(0.1), maxiters = 100) +optprob = Optimization.OptimizationProblem(optf, ps) +res = Optimization.solve(optprob, Adam(0.1), maxiters = 100) diff --git a/test/distributed.jl b/test/distributed.jl index 4f3908a8e..ffff46dea 100644 --- a/test/distributed.jl +++ b/test/distributed.jl @@ -1,4 +1,4 @@ -using Distributed, Flux +using Distributed, Optimization, OptimizationOptimisers addprocs(2) @everywhere begin @@ -8,7 +8,9 @@ addprocs(2) u0 = [3.0] end -function model4() +function model_distributed(pu0) + pa = pu0[1:1] + u0 = pu0[2:2] prob = ODEProblem((u, p, t) -> 1.01u .* p, u0, (0.0, 1.0), pa) function prob_func(prob, i, repeat) @@ -21,19 +23,16 @@ function model4() end # loss function -loss() = sum(abs2, 1.0 .- Array(model4())) +loss = (p, _) -> sum(abs2, 1.0 .- Array(model_distributed(p))) -data = Iterators.repeated((), 10) - -cb = function () # callback function to observe training - @show loss() +cb = function (p, l) # callback function to observe training + @info alg=alg loss=l + return false end -pa = [1.0] -u0 = [3.0] -opt = Flux.ADAM(0.1) -println("Starting to train") -l1 = loss() -Flux.@epochs 10 Flux.train!(loss, Flux.params([pa, u0]), data, opt; cb = cb) -l2 = loss() +l1 = loss([1.0, 3.0], nothing) +@show l1 +res = solve(OptimizationProblem(OptimizationFunction(loss, AutoZygote()), + [1.0, 3.0]), Adam(0.1); callback = cb, maxiters = 10) +l2 = loss(res.u, nothing) @test 10l2 < l1 diff --git a/test/ensembles.jl b/test/ensembles.jl index c0c997039..15edea4d1 100644 --- a/test/ensembles.jl +++ b/test/ensembles.jl @@ -1,81 +1,34 @@ -using Flux, OrdinaryDiffEq, Test - -pa = [1.0] -u0 = [3.0] -function model1() - prob = ODEProblem((u, p, t) -> 1.01u .* p, u0, (0.0, 1.0), pa) +using SciMLSensitivity, OrdinaryDiffEq, Optimization, OptimizationOptimisers, Test, Zygote +@testset "$(i): EnsembleAlg = $(alg)" for (i, alg) in enumerate((EnsembleSerial(), + EnsembleThreads(), EnsembleSerial())) function prob_func(prob, i, repeat) remake(prob, u0 = 0.5 .+ i / 100 .* prob.u0) end + function model(p) + prob = ODEProblem((u, p, t) -> 1.01u .* p, p[1:1], (0.0, 1.0), p[2:2]) - ensemble_prob = EnsembleProblem(prob, prob_func = prob_func) - sim = solve(ensemble_prob, Tsit5(), EnsembleSerial(), saveat = 0.1, trajectories = 100) -end - -# loss function -loss() = sum(abs2, 1.0 .- Array(model1())) - -data = Iterators.repeated((), 10) - -cb = function () # callback function to observe training - @show loss() -end - -opt = ADAM(0.1) -println("Starting to train") -l1 = loss() -Flux.@epochs 10 Flux.train!(loss, Flux.params([pa, u0]), data, opt; cb = cb) -l2 = loss() -@test 10l2 < l1 - -function model2() - prob = ODEProblem((u, p, t) -> 1.01u .* p, u0, (0.0, 1.0), pa) - - function prob_func(prob, i, repeat) - remake(prob, u0 = 0.5 .+ i / 100 .* prob.u0) + ensemble_prob = EnsembleProblem(prob, prob_func = prob_func) + sim = solve(ensemble_prob, Tsit5(), alg, saveat = 0.1, trajectories = 100) + return i == 3 ? sim.u : sim end - ensemble_prob = EnsembleProblem(prob, prob_func = prob_func) - sim = solve(ensemble_prob, Tsit5(), EnsembleSerial(), saveat = 0.1, - trajectories = 100).u -end -loss() = sum(abs2, [sum(abs2, 1.0 .- u) for u in model2()]) - -pa = [1.0] -u0 = [3.0] -opt = ADAM(0.1) -println("Starting to train") -l1 = loss() -Flux.@epochs 10 Flux.train!(loss, Flux.params([pa, u0]), data, opt; cb = cb) -l2 = loss() -@test 10l2 < l1 - -function model3() - prob = ODEProblem((u, p, t) -> 1.01u .* p, u0, (0.0, 1.0), pa) - - function prob_func(prob, i, repeat) - remake(prob, u0 = 0.5 .+ i / 100 .* prob.u0) + # loss function + loss = if i == 3 + (p, _) -> sum(abs2, [sum(abs2, 1.0 .- u) for u in model(p)]) + else + (p, _) -> sum(abs2, 1.0 .- Array(model(p))) end - ensemble_prob = EnsembleProblem(prob, prob_func = prob_func) - sim = solve(ensemble_prob, Tsit5(), EnsembleThreads(), saveat = 0.1, trajectories = 100) -end - -# loss function -loss() = sum(abs2, 1.0 .- Array(model3())) - -data = Iterators.repeated((), 10) + cb = function (p, l) # callback function to observe training + @info alg=alg loss=l + return false + end -cb = function () # callback function to observe training - @show loss() + l1 = loss([1.0, 3.0], nothing) + @show l1 + res = solve(OptimizationProblem(OptimizationFunction(loss, AutoZygote()), + [1.0, 3.0]), Adam(0.1); callback = cb, maxiters = 10) + l2 = loss(res.u, nothing) + @test 10l2 < l1 end - -pa = [1.0] -u0 = [3.0] -opt = ADAM(0.1) -println("Starting to train") -l1 = loss() -Flux.@epochs 10 Flux.train!(loss, Flux.params([pa, u0]), data, opt; cb = cb) -l2 = loss() -@test 10l2 < l1 diff --git a/test/forward_remake.jl b/test/forward_remake.jl index ff439a254..54b3c7108 100644 --- a/test/forward_remake.jl +++ b/test/forward_remake.jl @@ -1,5 +1,4 @@ -using SciMLSensitivity, ForwardDiff, Distributions, OrdinaryDiffEq, - LinearAlgebra, Test +using SciMLSensitivity, ForwardDiff, Distributions, OrdinaryDiffEq, LinearAlgebra, Test function fiip(du, u, p, t) du[1] = dx = p[1] * u[1] - p[2] * u[1] * u[2] diff --git a/test/gdp_regression_test.jl b/test/gdp_regression_test.jl index 828767392..2dd8fed45 100644 --- a/test/gdp_regression_test.jl +++ b/test/gdp_regression_test.jl @@ -1,4 +1,6 @@ -using SciMLSensitivity, Flux, OrdinaryDiffEq, LinearAlgebra, Test +using SciMLSensitivity, + OrdinaryDiffEq, LinearAlgebra, Test, Zygote, Optimization, + OptimizationOptimisers GDP = [ 11394358246872.6, @@ -76,76 +78,35 @@ if false else ## false crashes. that is when i am tracking the initial conditions prob = ODEProblem(monomial, u0, tspan, p) end -function predict_rd() # Our 1-layer neural network - Array(solve(prob, Tsit5(), p = p, saveat = 1.0:1.0:59.0, reltol = 1e-4, - sensealg = TrackerAdjoint())) -end -function loss_rd() ##L2 norm biases the newer times unfairly - ##Graph looks better if we minimize relative error squared - c = 0.0 - a = predict_rd() - d = 0.0 - for i in 1:59 - c += (a[i][1] / GDP[i] - 1)^2 ## L2 of relative error +@testset "sensealg: $(sensealg)" for sensealg in (TrackerAdjoint(), + InterpolatingAdjoint(autojacvec = ReverseDiffVJP(true))) + function predict_rd(pu0) # Our 1-layer neural network + p = pu0[1:6] + u0 = pu0[7:7] + Array(solve(prob, Tsit5(); p = p, u0 = u0, saveat = 1.0:1.0:59.0, reltol = 1e-4, + sensealg)) end - c + 3 * d -end - -data = Iterators.repeated((), 100) -opt = ADAM(0.01) - -peek = function () #callback function to observe training - #reduces training speed by a lot - println("Loss: ", loss_rd()) -end - -peek() -Flux.train!(loss_rd, Flux.params(p, u0), data, opt, cb = peek) -peek() - -@test loss_rd() < 0.2 - -function monomial(dcGDP, cGDP, parameters, t) - α1, β1, nu1, nu2, δ, δ2 = parameters - dcGDP[1] = α1 * ((cGDP[1]))^β1 -end - -GDP0 = GDP[1] -tspan = (1.0, 59.0) -p = [474.8501513113645, 0.7036417845990167, 0.0, 1e-10, 1e-10, 1e-10] -u0 = [GDP0] -if false - prob = ODEProblem(monomial, [GDP0], tspan, p) -else ## false crashes. that is when i am tracking the initial conditions - prob = ODEProblem(monomial, u0, tspan, p) -end -function predict_adjoint() # Our 1-layer neural network - Array(solve(prob, Tsit5(), p = p, saveat = 1.0, reltol = 1e-4, - sensealg = InterpolatingAdjoint(autojacvec = ReverseDiffVJP(true)))) -end + function loss_rd(pu0, _) ##L2 norm biases the newer times unfairly + ##Graph looks better if we minimize relative error squared + c = 0.0 + a = predict_rd(pu0) + d = 0.0 + for i in 1:59 + c += (a[i][1] / GDP[i] - 1)^2 ## L2 of relative error + end + c + 3 * d + end -function loss_adjoint() ##L2 norm biases the newer times unfairly - ##Graph looks better if we minimize relative error squared - c = 0.0 - a = predict_adjoint() - d = 0.0 - for i in 1:59 - c += (a[i][1] / GDP[i] - 1)^2 ## L2 of relative error + peek = function (p, l) #callback function to observe training + #reduces training speed by a lot + println("$(sensealg) Loss: ", l) + return false end - c + 3 * d -end -data = Iterators.repeated((), 100) -opt = ADAM(0.01) + res = solve(OptimizationProblem(OptimizationFunction(loss_rd, AutoZygote()), + vcat(p, u0)), Adam(0.01); callback = peek, maxiters = 100) -peek = function () #callback function to observe training - #reduces training speed by a lot - println("Loss: ", loss_adjoint()) + @test loss_rd(res.u, nothing) < 0.2 end - -peek() -Flux.train!(loss_adjoint, Flux.params(p, u0), data, opt, cb = peek) -peek() -@test loss_adjoint() < 0.2 diff --git a/test/gpu/Project.toml b/test/gpu/Project.toml index 4fae2fbbb..9e7a27ba9 100644 --- a/test/gpu/Project.toml +++ b/test/gpu/Project.toml @@ -2,10 +2,10 @@ CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" DiffEqCallbacks = "459566f4-90b8-5000-8ac3-15dfb0a30def" DiffEqFlux = "aae7a2af-3d4f-5e19-a356-7da93b79d9d0" -Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c" +LuxCUDA = "d0bbae9a-e099-4d5b-a835-1c6931763bda" [compat] CUDA = "3.12, 4, 5" DiffEqCallbacks = "2.24" -DiffEqFlux = "1.52, 2" -Flux = "0.13, 0.14" +DiffEqFlux = "3" +LuxCUDA = "0.3.1" diff --git a/test/gpu/diffeqflux_standard_gpu.jl b/test/gpu/diffeqflux_standard_gpu.jl index 5bb264b4d..d82086ff2 100644 --- a/test/gpu/diffeqflux_standard_gpu.jl +++ b/test/gpu/diffeqflux_standard_gpu.jl @@ -1,6 +1,10 @@ -using SciMLSensitivity, OrdinaryDiffEq, Flux, DiffEqFlux, CUDA, Zygote +using SciMLSensitivity, OrdinaryDiffEq, Lux, DiffEqFlux, LuxCUDA, Zygote, Random +using ComponentArrays CUDA.allowscalar(false) # Makes sure no slow operations are occuring +const gdev = gpu_device() +const cdev = cpu_device() + # Generate Data u0 = Float32[2.0; 0.0] datasize = 30 @@ -12,28 +16,22 @@ function trueODEfunc(du, u, p, t) end prob_trueode = ODEProblem(trueODEfunc, u0, tspan) # Make the data into a GPU-based array if the user has a GPU -ode_data = gpu(solve(prob_trueode, Tsit5(), saveat = tsteps)) - -dudt2 = Chain(x -> x .^ 3, - Dense(2, 50, tanh), - Dense(50, 2)) |> gpu -u0 = Float32[2.0; 0.0] |> gpu +ode_data = gdev(solve(prob_trueode, Tsit5(), saveat = tsteps)) -_p, re = Flux.destructure(dudt2) -p = gpu(_p) +dudt2 = Chain(x -> x .^ 3, Dense(2, 50, tanh), Dense(50, 2)) +u0 = Float32[2.0; 0.0] |> gdev prob_neuralode = NeuralODE(dudt2, tspan, Tsit5(), saveat = tsteps) +ps, st = Lux.setup(Random.default_rng(), dudt2) +ps = ComponentArray(ps) |> gdev function predict_neuralode(p) - gpu(prob_neuralode(u0, p)) + gdev(first(prob_neuralode(u0, p, st))) end function loss_neuralode(p) pred = predict_neuralode(p) loss = sum(abs2, ode_data .- pred) return loss end -# Callback function to observe training -list_plots = [] -iter = 0 -Zygote.gradient(loss_neuralode, p) +Zygote.gradient(loss_neuralode, ps) diff --git a/test/hybrid_de.jl b/test/hybrid_de.jl index 06cdc26a8..bfb0486fd 100644 --- a/test/hybrid_de.jl +++ b/test/hybrid_de.jl @@ -1,4 +1,5 @@ -using Flux, SciMLSensitivity, DiffEqCallbacks, OrdinaryDiffEq, Test # , Plots +using Lux, ComponentArrays, SciMLSensitivity, DiffEqCallbacks, OrdinaryDiffEq, Test # , Plots +using Optimization, OptimizationOptimisers, Zygote u0 = Float32[2.0; 0.0] datasize = 100 @@ -16,13 +17,13 @@ t = range(tspan[1], tspan[2], length = datasize) prob = ODEProblem(trueODEfunc, u0, tspan) ode_data = Array(solve(prob, Tsit5(), callback = cb_, saveat = t)) -dudt2 = Chain(Dense(2, 50, tanh), - Dense(50, 2)) -p, re = Flux.destructure(dudt2) # use this p as the initial condition! +dudt2 = Chain(Dense(2, 50, tanh), Dense(50, 2)) +ps, st = Lux.setup(Random.default_rng(), dudt2) +ps = ComponentArray(ps) function dudt(du, u, p, t) du[1:2] .= -u[1:2] - du[3:end] .= re(p)(u[1:2]) #re(p)(u[3:end]) + du[3:end] .= first(dudt2(u[1:2], p, st)) end z0 = Float32[u0; u0] prob = ODEProblem(dudt, z0, tspan) @@ -30,33 +31,23 @@ prob = ODEProblem(dudt, z0, tspan) affect!(integrator) = integrator.u[1:2] .= integrator.u[3:end] cb = PresetTimeCallback(dosetimes, affect!, save_positions = (false, false)) -function predict_n_ode() - _prob = remake(prob, p = p) - Array(solve(_prob, Tsit5(), u0 = z0, p = p, callback = cb, saveat = t, - sensealg = ReverseDiffAdjoint()))[1:2, - :] - # Array(solve(prob,Tsit5(),u0=z0,p=p,saveat=t))[1:2,:] +function predict_n_ode(ps) + Array(solve(prob, Tsit5(), u0 = z0, p = ps, callback = cb, saveat = t, + sensealg = ReverseDiffAdjoint()))[1:2, :] end -function loss_n_ode() - pred = predict_n_ode() +function loss_n_ode(ps, _) + pred = predict_n_ode(ps) loss = sum(abs2, ode_data .- pred) loss end -loss_n_ode() # n_ode.p stores the initial parameters of the neural ODE - -cba = function (; doplot = false) #callback function to observe training - pred = predict_n_ode() - display(sum(abs2, ode_data .- pred)) - # plot current prediction against data - # pl = scatter(t,ode_data[1,:],label="data") - # scatter!(pl,t,pred[1,:],label="prediction") - # display(plot(pl)) +loss_n_ode(ps, nothing) + +cba = function (p, l) #callback function to observe training + @show l return false end -cba() -ps = Flux.params(p) -data = Iterators.repeated((), 200) -Flux.train!(loss_n_ode, ps, data, ADAM(0.05), cb = cba) -loss_n_ode() < 1.0 +res = solve(OptimizationProblem(OptimizationFunction(loss_n_ode, AutoZygote()), + ps), Adam(0.05); callback = cba, maxiters = 200) +@test loss_n_ode(res.u, nothing) < 0.4 diff --git a/test/layers.jl b/test/layers.jl index 44eafb5f9..90fc97f83 100644 --- a/test/layers.jl +++ b/test/layers.jl @@ -1,4 +1,4 @@ -using SciMLSensitivity, Flux, Zygote, OrdinaryDiffEq, Test # , Plots +using SciMLSensitivity, Zygote, OrdinaryDiffEq, Test, Optimization, OptimizationOptimisers function lotka_volterra(du, u, p, t) x, y = u @@ -10,80 +10,27 @@ p = [2.2, 1.0, 2.0, 0.4] u0 = [1.0, 1.0] prob = ODEProblem(lotka_volterra, u0, (0.0, 10.0), p) -# Reverse-mode - -function predict_rd(p) - Array(solve(prob, Tsit5(), p = p, saveat = 0.1, reltol = 1e-4, - sensealg = TrackerAdjoint())) -end -loss_rd(p) = sum(abs2, x - 1 for x in predict_rd(p)) -loss_rd() = sum(abs2, x - 1 for x in predict_rd(p)) -loss_rd() - -grads = Zygote.gradient(loss_rd, p) -@test !iszero(grads[1]) - -opt = ADAM(0.1) -cb = function () - display(loss_rd()) - # display(plot(solve(remake(prob,p=p),Tsit5(),saveat=0.1),ylim=(0,6))) -end - -# Display the ODE with the current parameter values. -loss1 = loss_rd() -Flux.train!(loss_rd, Flux.params(p), Iterators.repeated((), 100), opt, cb = cb) -loss2 = loss_rd() -@test 10loss2 < loss1 - -# Forward-mode, R^n -> R^m layer - -p = [2.2, 1.0, 2.0, 0.4] -function predict_fd() - vec(Array(solve(prob, Tsit5(), p = p, saveat = 0.0:0.1:1.0, reltol = 1e-4, - sensealg = ForwardDiffSensitivity()))) -end -loss_fd() = sum(abs2, x - 1 for x in predict_fd()) -loss_fd() - -ps = Flux.params(p) -grads = Zygote.gradient(loss_fd, ps) -@test !iszero(grads[p]) - -data = Iterators.repeated((), 100) -opt = ADAM(0.1) -cb = function () - display(loss_fd()) - # display(plot(solve(remake(prob,p=p),Tsit5(),saveat=0.1),ylim=(0,6))) -end - -# Display the ODE with the current parameter values. -loss1 = loss_fd() -Flux.train!(loss_fd, ps, data, opt, cb = cb) -loss2 = loss_fd() -@test 10loss2 < loss1 - -# Adjoint sensitivity -p = [2.2, 1.0, 2.0, 0.4] -ps = Flux.params(p) -function predict_adjoint() - solve(remake(prob, p = p), Tsit5(), saveat = 0.1, reltol = 1e-4) +@testset "sensealg: $(sensealg)" for sensealg in (TrackerAdjoint(), + ForwardDiffSensitivity(), nothing) + function predict(pu0) + p = pu0[1:4] + u0 = pu0[5:6] + vec(Array(solve(prob, Tsit5(); p, u0, saveat = 0.1, reltol = 1e-4, sensealg))) + end + loss(pu0, _) = sum(abs2, x .- 1 for x in predict(pu0)) + + grads = Zygote.gradient(loss, [p; u0], nothing) + @test !iszero(grads[1]) + + cb = function (p, l) + @info sensealg loss=l + return false + end + + l1 = loss([p; u0], nothing) + @show l1 + res = solve(OptimizationProblem(OptimizationFunction(loss, AutoZygote()), + [p; u0]), Adam(0.1); callback = cb, maxiters = 100) + l2 = loss(res.u, nothing) + @test 10l2 < l1 end -loss_reduction(sol) = sum(abs2, x - 1 for x in vec(sol)) -loss_adjoint() = loss_reduction(predict_adjoint()) -loss_adjoint() - -grads = Zygote.gradient(loss_adjoint, ps) -@test !iszero(grads[p]) - -data = Iterators.repeated((), 100) -opt = ADAM(0.1) -cb = function () - display(loss_adjoint()) - # display(plot(solve(remake(prob,p=p),Tsit5(),saveat=0.1),ylim=(0,6))) -end - -# Display the ODE with the current parameter values. -loss1 = loss_adjoint() -Flux.train!(loss_adjoint, ps, data, opt, cb = cb) -loss2 = loss_adjoint() -@test 10loss2 < loss1 diff --git a/test/layers_dde.jl b/test/layers_dde.jl index bec7bf4dc..064c04415 100644 --- a/test/layers_dde.jl +++ b/test/layers_dde.jl @@ -1,4 +1,4 @@ -using SciMLSensitivity, Flux, Zygote, DelayDiffEq, Test +using SciMLSensitivity, Zygote, DelayDiffEq, Test ## Setup DDE to optimize function delay_lotka_volterra(du, u, h, p, t) @@ -12,8 +12,7 @@ prob = DDEProblem(delay_lotka_volterra, [1.0, 1.0], h, (0.0, 10.0), constant_lag p = [2.2, 1.0, 2.0, 0.4] function predict_fd_dde(p) solve(prob, MethodOfSteps(Tsit5()), p = p, saveat = 0.0:0.1:10.0, reltol = 1e-4, - sensealg = ForwardDiffSensitivity())[1, - :] + sensealg = ForwardDiffSensitivity())[1, :] end loss_fd_dde(p) = sum(abs2, x - 1 for x in predict_fd_dde(p)) loss_fd_dde(p) diff --git a/test/layers_sde.jl b/test/layers_sde.jl index dd13b1517..44c2295e9 100644 --- a/test/layers_sde.jl +++ b/test/layers_sde.jl @@ -1,4 +1,4 @@ -using SciMLSensitivity, Flux, Zygote, StochasticDiffEq, Test +using SciMLSensitivity, Zygote, StochasticDiffEq, Test function lotka_volterra(du, u, p, t) x, y = u diff --git a/test/sde_neural.jl b/test/sde_neural.jl index 30df97295..8356114c3 100644 --- a/test/sde_neural.jl +++ b/test/sde_neural.jl @@ -1,10 +1,6 @@ -using SciMLSensitivity, Flux, LinearAlgebra -using DiffEqNoiseProcess -using StochasticDiffEq -using Statistics -using SciMLSensitivity +using SciMLSensitivity, Lux, ComponentArrays, LinearAlgebra, DiffEqNoiseProcess, Test +using StochasticDiffEq, Statistics, SciMLSensitivity, Zygote using DiffEqBase.EnsembleAnalysis -using Zygote using Optimization, OptimizationOptimisers using Random @@ -48,13 +44,14 @@ Random.seed!(238248735) (truemean, truevar) = Array.(timeseries_steps_meanvar(solution)) ann = Chain(Dense(4, 32, tanh), Dense(32, 32, tanh), Dense(32, 2)) - α, re = Flux.destructure(ann) + α, st = Lux.setup(Random.default_rng(), ann) + α = ComponentArray(α) α = Float64.(α) function dudt_(du, u, p, t) r, e, μ, h, ph, z, i = p_ - MM = re(p)(u) + MM = first(ann(u, p, st)) du[1] = e * 0.5 * (5μ - u[1]) # nutrient input time series du[2] = e * 0.05 * (10μ - u[2]) # grazer density time series @@ -66,7 +63,7 @@ Random.seed!(238248735) function dudt_op(u, p, t) r, e, μ, h, ph, z, i = p_ - MM = re(p)(u) + MM = first(ann(u, p, st)) [e * 0.5 * (5μ - u[1]), # nutrient input time series e * 0.05 * (10μ - u[2]), # grazer density time series @@ -132,14 +129,14 @@ Random.seed!(238248735) optf = Optimization.OptimizationFunction((x, p) -> loss(x), Optimization.AutoZygote()) optprob = Optimization.OptimizationProblem(optf, α) - res1 = Optimization.solve(optprob, ADAM(0.001), callback = callback, maxiters = 200) + res1 = Optimization.solve(optprob, Adam(0.001), callback = callback, maxiters = 200) println("Test non-mutating form") optf = Optimization.OptimizationFunction((x, p) -> loss_op(x), Optimization.AutoZygote()) optprob = Optimization.OptimizationProblem(optf, α) - res2 = Optimization.solve(optprob, ADAM(0.001), callback = callback, maxiters = 200) + res2 = Optimization.solve(optprob, Adam(0.001), callback = callback, maxiters = 200) end @testset "Adaptive neural SDE" begin @@ -149,8 +146,9 @@ end # Define Neural Network for the control input input_size = x_size + 1 # size of the spatial dimensions PLUS one time dimensions nn_initial = Chain(Dense(input_size, v_size)) # The actual neural network - p_nn, model = Flux.destructure(nn_initial) - nn(x, p) = model(p)(x) + ps, st = Lux.setup(Random.default_rng(), nn_initial) + ps = ComponentArray(ps) + nn(x, p) = first(nn_initial(x, p, st)) # The neural network function # Define the right hand side of the SDE const_mat = zeros(Float64, (x_size, v_size)) @@ -171,10 +169,10 @@ end u0 = vec(rand(Float64, (x_size, 1))) tspan = (0.0, 1.0) ts = collect(0:0.1:1) - prob = SDEProblem{true}(f!, g!, u0, tspan, p_nn) + prob = SDEProblem{true}(f!, g!, u0, tspan, ps) W = WienerProcess(0.0, 0.0, 0.0) - probscalar = SDEProblem{true}(f!, g!, u0, tspan, p_nn, noise = W) + probscalar = SDEProblem{true}(f!, g!, u0, tspan, ps, noise = W) # Defining the loss function function loss(pars, prob, alg) @@ -189,8 +187,7 @@ end _sol = solve(ensembleprob, alg, EnsembleThreads(), sensealg = BacksolveAdjoint(autojacvec = ReverseDiffVJP()), - saveat = ts, trajectories = 10, - abstol = 1e-1, reltol = 1e-1) + saveat = ts, trajectories = 10, abstol = 1e-1, reltol = 1e-1) A = convert(Array, _sol) sum(abs2, A .- 1), mean(A) end @@ -209,16 +206,16 @@ end optf = Optimization.OptimizationFunction((p, _) -> loss(p, probscalar, LambaEM()), Optimization.AutoZygote()) - optprob = Optimization.OptimizationProblem(optf, p_nn) - res1 = Optimization.solve(optprob, ADAM(0.1), callback = callback, maxiters = 5) + optprob = Optimization.OptimizationProblem(optf, ps) + res1 = Optimization.solve(optprob, Adam(0.1), callback = callback, maxiters = 5) optf = Optimization.OptimizationFunction((p, _) -> loss(p, probscalar, SOSRI()), Optimization.AutoZygote()) - optprob = Optimization.OptimizationProblem(optf, p_nn) - res2 = Optimization.solve(optprob, ADAM(0.1), callback = callback, maxiters = 5) + optprob = Optimization.OptimizationProblem(optf, ps) + res2 = Optimization.solve(optprob, Adam(0.1), callback = callback, maxiters = 5) optf = Optimization.OptimizationFunction((p, _) -> loss(p, prob, LambaEM()), Optimization.AutoZygote()) - optprob = Optimization.OptimizationProblem(optf, p_nn) - res1 = Optimization.solve(optprob, ADAM(0.1), callback = callback, maxiters = 5) + optprob = Optimization.OptimizationProblem(optf, ps) + res1 = Optimization.solve(optprob, Adam(0.1), callback = callback, maxiters = 5) end diff --git a/test/size_handling_adjoint.jl b/test/size_handling_adjoint.jl index d8c139ef7..29579343d 100644 --- a/test/size_handling_adjoint.jl +++ b/test/size_handling_adjoint.jl @@ -1,4 +1,5 @@ -using SciMLSensitivity, Zygote, Flux, OrdinaryDiffEq, Test # , Plots +using SciMLSensitivity, Zygote, OrdinaryDiffEq, Test +using Optimization, OptimizationOptimisers p = [1.5 1.0; 3.0 1.0] function lotka_volterra(du, u, p, t) @@ -14,28 +15,23 @@ sol = solve(prob, Tsit5()) # plot(sol) -p = [2.2 1.0; 2.0 0.4] # Tweaked Initial Parameter Array -ps = Flux.params(p) +ps = [2.2 1.0; 2.0 0.4] # Tweaked Initial Parameter Array -function predict_adjoint() # Our 1-layer neural network +function predict_adjoint(p) # Our 1-layer neural network Array(solve(prob, Tsit5(), p = p, saveat = 0.0:0.1:10.0)) end -loss_adjoint() = sum(abs2, x - 1 for x in predict_adjoint()) +loss_adjoint(p, _) = sum(abs2, x - 1 for x in predict_adjoint(p)) -data = Iterators.repeated((), 100) -opt = ADAM(0.1) -cb = function () #callback function to observe training - display(loss_adjoint()) +cb = function (p, loss) #callback function to observe training + @show loss + return false end -predict_adjoint() +res = solve(OptimizationProblem(OptimizationFunction(loss_adjoint, AutoZygote()), ps), + Adam(0.1); callback = cb, maxiters = 200) -# Display the ODE with the initial parameter values. -cb() -Flux.train!(loss_adjoint, ps, data, opt, cb = cb) - -@test loss_adjoint() < 1 +@test loss_adjoint(res.u, nothing) < 1 tspan = (0, 1) tran = collect(0:0.1:1) @@ -70,4 +66,4 @@ dp6 = Zygote.pullback(x -> loss(x; vjp = false), p0)[2](1)[1] @test dp1 ≈ dp3 @test dp1 ≈ dp4 @test dp1 ≈ dp5 -@test dp1 ≈ dp6 \ No newline at end of file +@test dp1 ≈ dp6 diff --git a/test/sparse_adjoint.jl b/test/sparse_adjoint.jl index 253c343bf..0ce874c13 100644 --- a/test/sparse_adjoint.jl +++ b/test/sparse_adjoint.jl @@ -1,5 +1,5 @@ using SciMLSensitivity, OrdinaryDiffEq, LinearAlgebra, SparseArrays, Zygote, LinearSolve -using AlgebraicMultigrid: AlgebraicMultigrid +using AlgebraicMultigrid using Test foop(u, p, t) = jac(u, p, t) * u