From 6f482ff3bac34c6e84c199e2cf623c4268ac3566 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Thu, 21 Sep 2023 15:47:38 -0400 Subject: [PATCH] Add correct dispatches for NonlinearLeastSquaresProblem --- Project.toml | 2 +- src/solve.jl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index d5f7303c3..aa69dfe5f 100644 --- a/Project.toml +++ b/Project.toml @@ -76,7 +76,7 @@ PrecompileTools = "1" RecursiveArrayTools = "2" Reexport = "1.0" Requires = "1.0" -SciMLBase = "1.93.3" +SciMLBase = "2" SciMLOperators = "0.2, 0.3" Setfield = "0.8, 1" Static = "0.7, 0.8" diff --git a/src/solve.jl b/src/solve.jl index e9be9265a..232f4668e 100644 --- a/src/solve.jl +++ b/src/solve.jl @@ -1089,6 +1089,12 @@ function get_concrete_problem(prob::NonlinearProblem, isadapt; kwargs...) remake(prob; u0 = u0) end +function get_concrete_problem(prob::NonlinearLeastSquaresProblem, isadapt; kwargs...) + u0 = get_concrete_u0(prob, isadapt, nothing, kwargs) + u0 = promote_u0(u0, prob.p, nothing) + remake(prob; u0 = u0) +end + function get_concrete_problem(prob::AbstractEnsembleProblem, isadapt; kwargs...) prob end