From 6354731bd50d3c479b8ba95529210cbf335696f9 Mon Sep 17 00:00:00 2001 From: Hossein Pourbozorg Date: Sun, 25 Aug 2024 18:01:20 +0330 Subject: [PATCH 1/8] remove `StochasticDiffEq` --- Project.toml | 1 - src/SciMLSensitivity.jl | 1 - src/adjoint_common.jl | 12 ++++++------ src/backsolve_adjoint.jl | 8 ++++---- src/derivative_wrappers.jl | 14 +++++++------- src/interpolating_adjoint.jl | 6 +++--- src/sde_tools.jl | 2 +- 7 files changed, 21 insertions(+), 23 deletions(-) diff --git a/Project.toml b/Project.toml index b9cd35362..38e3a4473 100644 --- a/Project.toml +++ b/Project.toml @@ -39,7 +39,6 @@ SparseDiffTools = "47a9eef4-7e08-11e9-0b38-333d64bd3804" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5" Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" TruncatedStacktraces = "781d530d-4396-4725-bb49-402e4bee1e77" diff --git a/src/SciMLSensitivity.jl b/src/SciMLSensitivity.jl index d12bb98b0..293c2202c 100644 --- a/src/SciMLSensitivity.jl +++ b/src/SciMLSensitivity.jl @@ -6,7 +6,6 @@ import SciMLBase: AbstractNonlinearProblem using Adapt using LinearSolve using Parameters: @unpack -using StochasticDiffEq import DiffEqNoiseProcess import RandomNumbers: Xorshifts using Random diff --git a/src/adjoint_common.jl b/src/adjoint_common.jl index cc82cb4b1..247097ec5 100644 --- a/src/adjoint_common.jl +++ b/src/adjoint_common.jl @@ -199,7 +199,7 @@ function adjointdiffcache(g::G, sensealg, discrete, sol, dgdu::DG1, dgdp::DG2, f paramjac_config = tape end elseif noiseterm && - (!StochasticDiffEq.is_diagonal_noise(prob) || isnoisemixing(sensealg)) + (!SciMLBase.is_diagonal_noise(prob) || isnoisemixing(sensealg)) tape = nothing paramjac_config = tape else @@ -256,7 +256,7 @@ function adjointdiffcache(g::G, sensealg, discrete, sol, dgdu::DG1, dgdp::DG2, f if isinplace for i in 1:m function noisetape(indx) - if StochasticDiffEq.is_diagonal_noise(prob) + if SciMLBase.is_diagonal_noise(prob) ReverseDiff.GradientTape((y, _p, [_t])) do u, p, t du1 = p !== nothing && p !== DiffEqBase.NullParameters() ? similar(p, size(u)) : similar(u) @@ -283,7 +283,7 @@ function adjointdiffcache(g::G, sensealg, discrete, sol, dgdu::DG1, dgdp::DG2, f else for i in 1:m function noisetapeoop(indx) - if StochasticDiffEq.is_diagonal_noise(prob) + if SciMLBase.is_diagonal_noise(prob) ReverseDiff.GradientTape((y, _p, [_t])) do u, p, t unwrappedf(u, p, first(t))[indx] end @@ -303,7 +303,7 @@ function adjointdiffcache(g::G, sensealg, discrete, sol, dgdu::DG1, dgdp::DG2, f end elseif autojacvec isa Bool if isinplace - if StochasticDiffEq.is_diagonal_noise(prob) + if SciMLBase.is_diagonal_noise(prob) pf = DiffEqBase.ParamJacobianWrapper(unwrappedf, _t, y) if isnoisemixing(sensealg) uf = DiffEqBase.UJacobianWrapper(unwrappedf, _t, p) @@ -321,7 +321,7 @@ function adjointdiffcache(g::G, sensealg, discrete, sol, dgdu::DG1, dgdp::DG2, f paramjac_noise_config = build_param_jac_config( sensealg, pf, y, SciMLStructures.replace(Tunable(), p, tunables)) else - if StochasticDiffEq.is_diagonal_noise(prob) + if SciMLBase.is_diagonal_noise(prob) pf = ParamGradientWrapper(unwrappedf, _t, y) if isnoisemixing(sensealg) uf = DiffEqBase.UDerivativeWrapper(unwrappedf, _t, p) @@ -333,7 +333,7 @@ function adjointdiffcache(g::G, sensealg, discrete, sol, dgdu::DG1, dgdp::DG2, f paramjac_noise_config = nothing jac_noise_config = nothing end - if StochasticDiffEq.is_diagonal_noise(prob) + if SciMLBase.is_diagonal_noise(prob) pJ = similar(u0, numindvar, numparams) if isnoisemixing(sensealg) J = similar(u0, numindvar, numindvar) diff --git a/src/backsolve_adjoint.jl b/src/backsolve_adjoint.jl index 3fa92732f..98cf7d1fe 100644 --- a/src/backsolve_adjoint.jl +++ b/src/backsolve_adjoint.jl @@ -36,7 +36,7 @@ function (S::ODEBacksolveSensitivityFunction)(du, u, p, t) if S.noiseterm if length(u) == length(du) vecjacobian!(dλ, y, λ, p, t, S, dgrad = dgrad, dy = dy) - elseif length(u) != length(du) && StochasticDiffEq.is_diagonal_noise(prob) && + elseif length(u) != length(du) && SciMLBase.is_diagonal_noise(prob) && !isnoisemixing(S.sensealg) vecjacobian!(dλ, y, λ, p, t, S, dy = dy) jacNoise!(λ, y, p, t, S, dgrad = dgrad) @@ -82,7 +82,7 @@ function split_states(du, u, t, S::ODEBacksolveSensitivityFunction; update = tru dgrad = @view du[(idx + 1):(end - idx)] dy = @view du[(end - idx + 1):end] - elseif length(u) != length(du) && StochasticDiffEq.is_diagonal_noise(prob) && + elseif length(u) != length(du) && SciMLBase.is_diagonal_noise(prob) && !isnoisemixing(S.sensealg) # Diffusion term, diagonal noise, length(du) = u*m idx1 = [length(u) * (i - 1) + i for i in 1:idx] # for diagonal indices of [1:idx,1:idx] @@ -92,7 +92,7 @@ function split_states(du, u, t, S::ODEBacksolveSensitivityFunction; update = tru dgrad = @view du[(idx + 1):(end - idx), 1:idx] dy = @view du[idx2] - elseif length(u) != length(du) && StochasticDiffEq.is_diagonal_noise(prob) && + elseif length(u) != length(du) && SciMLBase.is_diagonal_noise(prob) && isnoisemixing(S.sensealg) # Diffusion term, diagonal noise, (as above but can handle mixing noise terms) idx2 = [(length(u) + 1) * i - idx for i in 1:idx] # for diagonal indices of [end-idx+1:end,1:idx] @@ -344,7 +344,7 @@ end _sol = deepcopy(sol) backwardnoise = reverse(_sol.W) - if StochasticDiffEq.is_diagonal_noise(sol.prob) && sol.W.u[end] isa Number + if SciMLBase.is_diagonal_noise(sol.prob) && sol.W.u[end] isa Number # scalar noise case noise_matrix = nothing else diff --git a/src/derivative_wrappers.jl b/src/derivative_wrappers.jl index 22d4401ef..8ae75574c 100644 --- a/src/derivative_wrappers.jl +++ b/src/derivative_wrappers.jl @@ -779,7 +779,7 @@ function _jacNoise!(λ, y, p, t, S::TS, isnoise::Bool, dgrad, dλ, end end - if StochasticDiffEq.is_diagonal_noise(prob) + if SciMLBase.is_diagonal_noise(prob) pJt = transpose(λ) .* transpose(pJ) recursive_copyto!(dgrad, pJt) else @@ -796,7 +796,7 @@ function _jacNoise!(λ, y, p, t, S::TS, isnoise::Bool, dgrad, dλ, end if dλ !== nothing && - (isnoisemixing(sensealg) || !StochasticDiffEq.is_diagonal_noise(prob)) + (isnoisemixing(sensealg) || !SciMLBase.is_diagonal_noise(prob)) @unpack J, uf, f_cache, jac_noise_config = S.diffcache if dy !== nothing if inplace_sensitivity(S) @@ -813,7 +813,7 @@ function _jacNoise!(λ, y, p, t, S::TS, isnoise::Bool, dgrad, dλ, if dy !== nothing ForwardDiff.jacobian!(J, uf, dy, y) else - if StochasticDiffEq.is_diagonal_noise(prob) + if SciMLBase.is_diagonal_noise(prob) dy = similar(y) else dy = similar(prob.noise_rate_prototype) @@ -832,7 +832,7 @@ function _jacNoise!(λ, y, p, t, S::TS, isnoise::Bool, dgrad, dλ, # jacobian!(J, uf, y, nothing, sensealg, nothing) end - if StochasticDiffEq.is_diagonal_noise(prob) + if SciMLBase.is_diagonal_noise(prob) Jt = transpose(λ) .* transpose(J) recursive_copyto!(dλ, Jt) else @@ -866,7 +866,7 @@ function _jacNoise!(λ, y, p, t, S::TS, isnoise::ReverseDiffVJP, dgrad, dλ, ReverseDiff.value!(tp, p) ReverseDiff.value!(tt, [t]) ReverseDiff.forward_pass!(tapei) - if StochasticDiffEq.is_diagonal_noise(prob) + if SciMLBase.is_diagonal_noise(prob) ReverseDiff.increment_deriv!(output, λ[i]) else ReverseDiff.increment_deriv!(output, λ) @@ -881,7 +881,7 @@ function _jacNoise!(λ, y, p, t, S::TS, isnoise::ReverseDiffVJP, dgrad, dλ, end ReverseDiff.pull_value!(output) - if StochasticDiffEq.is_diagonal_noise(prob) + if SciMLBase.is_diagonal_noise(prob) dλ !== nothing && (dλ[:, i] .= vec(ReverseDiff.deriv(tu))) dy !== nothing && (dy[i] = ReverseDiff.value(output)) else @@ -909,7 +909,7 @@ function _jacNoise!(λ, y, p, t, S::TS, isnoise::ZygoteVJP, dgrad, dλ, noise_rate_prototype = prob.noise_rate_prototype m = noise_rate_prototype === nothing ? length(y) : size(noise_rate_prototype)[2] - if StochasticDiffEq.is_diagonal_noise(prob) + if SciMLBase.is_diagonal_noise(prob) if VERSION < v"1.9" # pre "stack" function for i in 1:m if inplace_sensitivity(S) diff --git a/src/interpolating_adjoint.jl b/src/interpolating_adjoint.jl index 3318385c4..626d6ded1 100644 --- a/src/interpolating_adjoint.jl +++ b/src/interpolating_adjoint.jl @@ -127,7 +127,7 @@ function (S::ODEInterpolatingAdjointSensitivityFunction)(du, u, p, t) if S.noiseterm if length(u) == length(du) vecjacobian!(dλ, y, λ, p, t, S, dgrad = dgrad) - elseif length(u) != length(du) && StochasticDiffEq.is_diagonal_noise(prob) && + elseif length(u) != length(du) && SciMLBase.is_diagonal_noise(prob) && !isnoisemixing(S.sensealg) vecjacobian!(dλ, y, λ, p, t, S) jacNoise!(λ, y, p, t, S, dgrad = dgrad) @@ -245,7 +245,7 @@ function split_states(du, u, t, S::TS; dλ = @view du[1:idx] dgrad = @view du[(idx + 1):end] - elseif length(u) != length(du) && StochasticDiffEq.is_diagonal_noise(prob) && + elseif length(u) != length(du) && SciMLBase.is_diagonal_noise(prob) && !isnoisemixing(S.sensealg) idx1 = [length(u) * (i - 1) + i for i in 1:idx] # for diagonal indices of [1:idx,1:idx] @@ -519,7 +519,7 @@ end _sol = deepcopy(sol) backwardnoise = reverse(_sol.W) - if StochasticDiffEq.is_diagonal_noise(sol.prob) && sol.W.u[end] isa Number + if SciMLBase.is_diagonal_noise(sol.prob) && sol.W.u[end] isa Number # scalar noise case noise_matrix = nothing else diff --git a/src/sde_tools.jl b/src/sde_tools.jl index 467ef6022..d466b103d 100644 --- a/src/sde_tools.jl +++ b/src/sde_tools.jl @@ -12,7 +12,7 @@ end function StochasticTransformedFunction(sol, f, g, corfunc_analytical = nothing) @unpack prob = sol - if StochasticDiffEq.is_diagonal_noise(prob) + if SciMLBase.is_diagonal_noise(prob) gtmp = copy(sol.u[end]) else gtmp = similar(prob.p, size(prob.noise_rate_prototype)) From beb9e3dd831fa8ca6d2de0d6ba15c2393dd324a0 Mon Sep 17 00:00:00 2001 From: Hossein Pourbozorg Date: Sun, 25 Aug 2024 18:02:37 +0330 Subject: [PATCH 2/8] remove `OrdinaryDiffEq` --- Project.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/Project.toml b/Project.toml index 38e3a4473..74e8ae31a 100644 --- a/Project.toml +++ b/Project.toml @@ -23,7 +23,6 @@ GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae" Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a" -OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" Parameters = "d96e819e-fc66-5662-9728-84c9c7592b0a" PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46" QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" @@ -75,7 +74,6 @@ NLsolve = "4.5.1" NonlinearSolve = "3.0.1" Optimization = "3.19.3" OptimizationOptimisers = "0.1.6" -OrdinaryDiffEq = "6.81.1" Parameters = "0.12" Pkg = "1.10" PreallocationTools = "0.4.4" From 95b238aeda50d16a7c220288195ea9cf246b52d2 Mon Sep 17 00:00:00 2001 From: Hossein Pourbozorg Date: Sun, 25 Aug 2024 18:11:12 +0330 Subject: [PATCH 3/8] put `OrdinaryDiffEq` in test --- Project.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Project.toml b/Project.toml index 74e8ae31a..e714bd8fd 100644 --- a/Project.toml +++ b/Project.toml @@ -74,6 +74,7 @@ NLsolve = "4.5.1" NonlinearSolve = "3.0.1" Optimization = "3.19.3" OptimizationOptimisers = "0.1.6" +OrdinaryDiffEq = "6.81.1" Parameters = "0.12" Pkg = "1.10" PreallocationTools = "0.4.4" @@ -114,6 +115,7 @@ NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec" Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba" OptimizationOptimisers = "42dfb2eb-d2b4-4451-abcd-913932933ac1" +OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" From 09562f9028836f189acb23fbc3d21db5e80d8437 Mon Sep 17 00:00:00 2001 From: Hossein Pourbozorg Date: Sun, 25 Aug 2024 18:49:14 +0330 Subject: [PATCH 4/8] add `OrdinaryDiffEq` to test target --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index e714bd8fd..6ee41a7cc 100644 --- a/Project.toml +++ b/Project.toml @@ -124,4 +124,4 @@ StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["AlgebraicMultigrid", "Aqua", "Calculus", "ComponentArrays", "DelayDiffEq", "Distributed", "Lux", "ModelingToolkit", "NLsolve", "NonlinearSolve", "Optimization", "OptimizationOptimisers", "Pkg", "SafeTestsets", "SparseArrays", "SteadyStateDiffEq", "StochasticDiffEq", "Test"] +test = ["AlgebraicMultigrid", "Aqua", "Calculus", "ComponentArrays", "DelayDiffEq", "Distributed", "Lux", "ModelingToolkit", "NLsolve", "NonlinearSolve", "Optimization", "OptimizationOptimisers", "OrdinaryDiffEq", "Pkg", "SafeTestsets", "SparseArrays", "SteadyStateDiffEq", "StochasticDiffEq", "Test"] From d2fd2784228d7a21becf3259c6965ee8ea9f1d46 Mon Sep 17 00:00:00 2001 From: Hossein Pourbozorg Date: Sun, 25 Aug 2024 18:50:23 +0330 Subject: [PATCH 5/8] switch to `SciMLBase` --- src/backsolve_adjoint.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backsolve_adjoint.jl b/src/backsolve_adjoint.jl index 98cf7d1fe..736100141 100644 --- a/src/backsolve_adjoint.jl +++ b/src/backsolve_adjoint.jl @@ -288,7 +288,7 @@ end len = length(u0) + numparams λ = one(eltype(u0)) .* similar(tunables, len) - if StochasticDiffEq.alg_interpretation(sol.alg) == :Stratonovich + if SciMLBase.alg_interpretation(sol.alg) == :Stratonovich sense_drift = ODEBacksolveSensitivityFunction(g, sensealg, discrete, sol, dgdu_continuous, dgdp_continuous, sol.prob.f, alg) From 3106b21d677172179d2e3652448262de757b5500 Mon Sep 17 00:00:00 2001 From: Hossein Pourbozorg Date: Sun, 1 Sep 2024 22:22:20 +0330 Subject: [PATCH 6/8] update to new enum --- src/backsolve_adjoint.jl | 3 ++- test/sde_scalar_ito.jl | 3 ++- test/sde_stratonovich.jl | 21 +++++++++++++++------ test/sde_transformation_test.jl | 4 ++-- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/backsolve_adjoint.jl b/src/backsolve_adjoint.jl index 736100141..2ba969506 100644 --- a/src/backsolve_adjoint.jl +++ b/src/backsolve_adjoint.jl @@ -288,7 +288,8 @@ end len = length(u0) + numparams λ = one(eltype(u0)) .* similar(tunables, len) - if SciMLBase.alg_interpretation(sol.alg) == :Stratonovich + if SciMLBase.alg_interpretation(sol.alg) == + SciMLBase.AlgorithmInterpretation.Stratonovich sense_drift = ODEBacksolveSensitivityFunction(g, sensealg, discrete, sol, dgdu_continuous, dgdp_continuous, sol.prob.f, alg) diff --git a/test/sde_scalar_ito.jl b/test/sde_scalar_ito.jl index eae922edb..773c6b083 100644 --- a/test/sde_scalar_ito.jl +++ b/test/sde_scalar_ito.jl @@ -67,7 +67,8 @@ probStrat = SDEProblem(SDEFunction(fStrat, σ), ) # solve Strat sense -solStrat = solve(probStrat, RKMil(interpretation = :Stratonovich), dt = dt, +solStrat = solve(probStrat, + RKMil(interpretation = SciMLBase.AlgorithmInterpretation.Stratonovich), dt = dt, adaptive = false, save_noise = true, saveat = dt) # check that forward solution agrees diff --git a/test/sde_stratonovich.jl b/test/sde_stratonovich.jl index 272d227f1..374261c19 100644 --- a/test/sde_stratonovich.jl +++ b/test/sde_stratonovich.jl @@ -83,7 +83,9 @@ p2 = [1.01, 0.87] Random.seed!(seed) tmp_prob = remake(prob_oop_sde, u0 = eltype(p).(prob_oop_sde.u0), p = p, tspan = eltype(p).(prob_oop_sde.tspan)) - sol = solve(tmp_prob, RKMil(interpretation = :Stratonovich), dt = tend / 10000, + sol = solve(tmp_prob, + RKMil(interpretation = SciMLBase.AlgorithmInterpretation.Stratonovich), + dt = tend / 10000, adaptive = false, sensealg = DiffEqBase.SensitivityADPassThrough(), saveat = tarray) A = convert(Array, sol) @@ -109,7 +111,8 @@ end Random.seed!(seed) prob_oop_sde2 = SDEProblem(f_oop_linear, σ_oop_linear, u₀, trange, p2) - sol_oop_sde2 = solve(prob_oop_sde2, RKMil(interpretation = :Stratonovich), dt = dt1, + sol_oop_sde2 = solve(prob_oop_sde2, + RKMil(interpretation = SciMLBase.AlgorithmInterpretation.Stratonovich), dt = dt1, adaptive = false, save_noise = true) res_sde_u02, res_sde_p2 = adjoint_sensitivities(sol_oop_sde2, EulerHeun(), t = tarray, @@ -158,7 +161,9 @@ end tmp_prob = remake(prob_oop_sde2, u0 = eltype(p).(prob_oop_sde2.u0), p = p, tspan = eltype(p).(prob_oop_sde2.tspan) #,abstol=abstol, reltol=reltol ) - sol = solve(tmp_prob, RKMil(interpretation = :Stratonovich), dt = dt1, + sol = solve(tmp_prob, + RKMil(interpretation = SciMLBase.AlgorithmInterpretation.Stratonovich), + dt = dt1, adaptive = false, sensealg = DiffEqBase.SensitivityADPassThrough(), saveat = tarray) A = convert(Array, sol) @@ -326,7 +331,9 @@ end function GSDE3(u) Random.seed!(seed) tmp_prob = remake(prob_oop_sde2, u0 = u) - sol = solve(tmp_prob, RKMil(interpretation = :Stratonovich), dt = dt1, + sol = solve(tmp_prob, + RKMil(interpretation = SciMLBase.AlgorithmInterpretation.Stratonovich), + dt = dt1, adaptive = false, saveat = tarray) A = convert(Array, sol) res = g(A, nothing, nothing) @@ -545,7 +552,9 @@ end Random.seed!(seed) tmp_prob = remake(prob_oop_sde, u0 = eltype(p).(prob_oop_sde.u0), p = p, tspan = eltype(p).(prob_oop_sde.tspan)) - sol = solve(tmp_prob, RKMil(interpretation = :Stratonovich), dt = 5e-4, + sol = solve(tmp_prob, + RKMil(interpretation = SciMLBase.AlgorithmInterpretation.Stratonovich), + dt = 5e-4, adaptive = false, sensealg = DiffEqBase.SensitivityADPassThrough(), saveat = tarray) A = convert(Array, sol) @@ -556,7 +565,7 @@ end Random.seed!(seed) res_sde_trackeru0, res_sde_trackerp = Zygote.gradient( (u0, p) -> sum(Array(solve(prob_oop_sde, - RKMil(interpretation = :Stratonovich), + RKMil(interpretation = SciMLBase.AlgorithmInterpretation.Stratonovich), dt = 5e-4, adaptive = false, u0 = u0, diff --git a/test/sde_transformation_test.jl b/test/sde_transformation_test.jl index f79caf71d..00df19497 100644 --- a/test/sde_transformation_test.jl +++ b/test/sde_transformation_test.jl @@ -45,7 +45,7 @@ prob_strat = SDEProblem{false}( tspan, p) Random.seed!(seed) -sol_strat = solve(prob_strat, RKMil(interpretation = :Stratonovich), adaptive = false, +sol_strat = solve(prob_strat, RKMil(interpretation = SciMLBase.AlgorithmInterpretation.Stratonovich), adaptive = false, dt = 0.0001, save_noise = true) prob_strat1 = SDEProblem{false}( SDEFunction((u, p, t) -> transformed_function(u, p, t) .+ @@ -56,7 +56,7 @@ prob_strat1 = SDEProblem{false}( tspan, p) Random.seed!(seed) -sol_strat1 = solve(prob_strat1, RKMil(interpretation = :Stratonovich), adaptive = false, +sol_strat1 = solve(prob_strat1, RKMil(interpretation = SciMLBase.AlgorithmInterpretation.Stratonovich), adaptive = false, dt = 0.0001, save_noise = true) # Test if we recover Ito solution in Stratonovich sense From 4072cd74c5df11114ae6b20cf975ef95a79dcbc6 Mon Sep 17 00:00:00 2001 From: Hossein Pourbozorg Date: Mon, 2 Sep 2024 01:37:42 +0330 Subject: [PATCH 7/8] fix SciMLBase compat --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 3ba9c3e91..430a2e6f0 100644 --- a/Project.toml +++ b/Project.toml @@ -87,7 +87,7 @@ RecursiveArrayTools = "3.18.1" Reexport = "1.0" ReverseDiff = "1.15.1" SafeTestsets = "0.1.0" -SciMLBase = "2.39" +SciMLBase = "2.51" SciMLOperators = "0.3" SciMLStructures = "1.3" SparseArrays = "1.10" From 93dfba9e581b8d3f9ef8b9eb2d9614761aeafba4 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sun, 1 Sep 2024 22:44:17 -0400 Subject: [PATCH 8/8] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 84fc5d1dc..a82e25d07 100644 --- a/Project.toml +++ b/Project.toml @@ -97,7 +97,7 @@ StaticArrays = "1.8.0" StaticArraysCore = "1.4" Statistics = "1.10" SteadyStateDiffEq = "2.0.1" -StochasticDiffEq = "6.63.2" +StochasticDiffEq = "6.69" SymbolicIndexingInterface = "0.3.26" Test = "1.10" Tracker = "0.2.30"