Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating ParameterEstimation Benchmarks #1160

Merged
merged 15 commits into from
Jan 31, 2025

Conversation

ParamThakkar123
Copy link
Contributor

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

@ParamThakkar123
Copy link
Contributor Author

The build for ParameterEstimation and PINNErrorVsTime hasn't started on the CI since the last 10 hours

@ParamThakkar123
Copy link
Contributor Author

ParamThakkar123 commented Jan 24, 2025

@ChrisRackauckas in LotkaVolterraParameterEstimation.jmd

I got the following error on running the code which seems to be related to the blackbox optim

@btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(), maxiters = 4e3) 
Error: MethodError: no method matching iterate(::BlackBoxOptim.ContinuousRe ctSearchSpace) Closest candidates are: iterate(!Matched::LibGit2.GitRevWalker) @ LibGit2 /cache/julia-buildkite-plugin/julia_installs/bin/linux/x64/1.1 0/julia-1.10-latest-linux-x86_64/share/julia/stdlib/v1.10/LibGit2/src/walke r.jl:29 iterate(!Matched::LibGit2.GitRevWalker, !Matched::Any) @ LibGit2 /cache/julia-buildkite-plugin/julia_installs/bin/linux/x64/1.1 0/julia-1.10-latest-linux-x86_64/share/julia/stdlib/v1.10/LibGit2/src/walke r.jl:29 iterate(!Matched::Tables.DictRowTable) @ Tables /cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4 d2d937f953/packages/Tables/8p03y/src/dicts.jl:122 ...

Any fixes you might suggest for this??

@ParamThakkar123
Copy link
Contributor Author

@ChrisRackauckas in LotkaVolterraParameterEstimation.jmd

I got the following error on running the code which seems to be related to the blackbox optim

@btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(), maxiters = 4e3) 
Error: MethodError: no method matching iterate(::BlackBoxOptim.ContinuousRe ctSearchSpace) Closest candidates are: iterate(!Matched::LibGit2.GitRevWalker) @ LibGit2 /cache/julia-buildkite-plugin/julia_installs/bin/linux/x64/1.1 0/julia-1.10-latest-linux-x86_64/share/julia/stdlib/v1.10/LibGit2/src/walke r.jl:29 iterate(!Matched::LibGit2.GitRevWalker, !Matched::Any) @ LibGit2 /cache/julia-buildkite-plugin/julia_installs/bin/linux/x64/1.1 0/julia-1.10-latest-linux-x86_64/share/julia/stdlib/v1.10/LibGit2/src/walke r.jl:29 iterate(!Matched::Tables.DictRowTable) @ Tables /cache/julia-buildkite-plugin/depots/5b300254-1738-4989-ae0a-f4 d2d937f953/packages/Tables/8p03y/src/dicts.jl:122 ...

Any fixes you might suggest for this??

@ChrisRackauckas ??

@ChrisRackauckas
Copy link
Member

Do you have the latest version of OptimizationBBO and Optimization? Can you try and make an MWE?

@ParamThakkar123
Copy link
Contributor Author

ParamThakkar123 commented Jan 26, 2025

Do you have the latest version of OptimizationBBO and Optimization? Can you try and make an MWE?

@ChrisRackauckas

Yes. I am using the latest version of OptimizationBBO and Optimization.

Here's the code for the MWE:

using ParameterizedFunctions, OrdinaryDiffEq, DiffEqParamEstim, Optimization, ForwardDiff
using OptimizationBBO, OptimizationNLopt, Plots, RecursiveArrayTools, BenchmarkTools
using ModelingToolkit: t_nounits as t, D_nounits as D
gr(fmt=:png)

loc_bounds = Tuple{Float64, Float64}[(0, 5), (0, 5), (0, 5), (0, 5)]
glo_bounds = Tuple{Float64, Float64}[(0, 10), (0, 10), (0, 10), (0, 10)]
loc_init = [1,0.5,3.5,1.5]
glo_init = [5,5,5,5]

@mtkmodel LotkaVolterraTest begin
    @parameters begin
        a = 1.5  # Growth rate of prey
        b = 1.0  # Predation rate
        c = 3.0  # Death rate of predators
        d = 1.0  # Reproduction rate of predators
        e = 0.0  # Additional parameter (if needed)
    end
    @variables begin
        x(t) = 1.0  # Population of prey with initial condition
        y(t) = 1.0  # Population of predators with initial condition
    end
    @equations begin
        D(x) ~ a * x - b * x * y
        D(y) ~ -c * y + d * x * y
    end
end

@mtkbuild f = LotkaVolterraTest()

u0 = [1.0,1.0]                          #initial values
tspan = (0.0,10.0)
p = [1.5,1.0,3.0,1,0]                   #parameters used, these need to be estimated from the data
tspan = (0.0, 30.0)                     # sample of 3000 observations over the (0,30) timespan
prob = ODEProblem(f, u0, tspan,p)
tspan2 = (0.0, 3.0)                     # sample of 3000 observations over the (0,30) timespan
prob_short = ODEProblem(f, u0, tspan2,p)

dt = 30.0/3000
tf = 30.0
tinterval = 0:dt:tf
time_points  = collect(tinterval)

h = 0.01
M = 300
tstart = 0.0
tstop = tstart + M * h
tinterval_short = 0:h:tstop
t_short = collect(tinterval_short)

#Generate Data
data_sol_short = solve(prob_short,Tsit5(),saveat=t_short,reltol=1e-9,abstol=1e-9)
data_short = convert(Array, data_sol_short)
data_sol = solve(prob,Tsit5(),saveat=time_points,reltol=1e-9,abstol=1e-9)
data = convert(Array, data_sol)

t_concrete = collect(0.0:dt:tf)
obj = build_loss_objective(prob,Vern9(),L2Loss(t_concrete,data),tstops=t_concrete,reltol=1e-9,abstol=1e-9)
optprob = OptimizationProblem(obj, glo_init, lb = first.(glo_bounds), ub = last.(glo_bounds))

@btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(), maxiters = 4e3)

The error:

MethodError: no method matching iterate(::BlackBoxOptim.ContinuousRectSearchSpace)

Closest candidates are:
  iterate(!Matched::Core.Compiler.InstructionStream, !Matched::Int64)
   @ Base show.jl:2778
  iterate(!Matched::Core.Compiler.InstructionStream)
   @ Base show.jl:2778
  iterate(!Matched::Plots.NaNSegmentsIterator)
   @ Plots C:\Users\Hp\.julia\packages\Plots\Ec1L1\src\utils.jl:175
  ...


Stacktrace:
  [1] in(x::Vector{Int64}, itr::BlackBoxOptim.ContinuousRectSearchSpace)
    @ Base .\operators.jl:1292
  [2] bboptimize(optctrl::BlackBoxOptim.OptController{BlackBoxOptim.DiffEvoOpt{BlackBoxOptim.FitPopulation{Float64}, BlackBoxOptim.SimpleSelector, BlackBoxOptim.AdaptiveDiffEvoRandBin{3}, BlackBoxOptim.RandomBound{BlackBoxOptim.ContinuousRectSearchSpace}}, BlackBoxOptim.FunctionBasedProblem{OptimizationBBO.var"#20#22"{OptimizationCache{OptimizationFunction{true, SciMLBase.NoAD, DiffEqParamEstim.var"#29#30"{Nothing, typeof(DiffEqParamEstim.STANDARD_PROB_GENERATOR), @Kwargs{tstops::Vector{Float64}, reltol::Float64, abstol::Float64}, ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, MTKParameters{Vector{Float64}, Tuple{}, Tuple{}, Tuple{}, Tuple{}}, ODEFunction{true, SciMLBase.AutoSpecialize, ModelingToolkit.var"#f#1091"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x08977a5c, 0x3a633a74, 0x1496a8db, 0xe3a61987, 0x89ed0229), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x59ccc78c, 0xf5eb1331, 0x81e324aa, 0x4258f3a1, 0xbe6ad381), Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, ModelingToolkit.ObservedFunctionCache{ODESystem}, Nothing, ODESystem, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, Vern9{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), Static.False}, L2Loss{Vector{Float64}, Matrix{Float64}, Nothing, Nothing, Nothing}, Nothing, Tuple{}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, OptimizationBase.ReInitCache{Vector{Int64}, SciMLBase.NullParameters}, Vector{Float64}, Vector{Float64}, Nothing, Nothing, Nothing, BBO_adaptive_de_rand_1_bin, Bool, OptimizationBase.NullCallback, Nothing}}, BlackBoxOptim.ScalarFitnessScheme{true}, BlackBoxOptim.ContinuousRectSearchSpace, Nothing}}, x0::Vector{Int64}; kwargs::@Kwargs{})
    @ BlackBoxOptim C:\Users\Hp\.julia\packages\BlackBoxOptim\lZtsr\src\bboptimize.jl:77
  [3] bboptimize(optctrl::BlackBoxOptim.OptController{BlackBoxOptim.DiffEvoOpt{BlackBoxOptim.FitPopulation{Float64}, BlackBoxOptim.SimpleSelector, BlackBoxOptim.AdaptiveDiffEvoRandBin{3}, BlackBoxOptim.RandomBound{BlackBoxOptim.ContinuousRectSearchSpace}}, BlackBoxOptim.FunctionBasedProblem{OptimizationBBO.var"#20#22"{OptimizationCache{OptimizationFunction{true, SciMLBase.NoAD, DiffEqParamEstim.var"#29#30"{Nothing, typeof(DiffEqParamEstim.STANDARD_PROB_GENERATOR), @Kwargs{tstops::Vector{Float64}, reltol::Float64, abstol::Float64}, ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, MTKParameters{Vector{Float64}, Tuple{}, Tuple{}, Tuple{}, Tuple{}}, ODEFunction{true, SciMLBase.AutoSpecialize, ModelingToolkit.var"#f#1091"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x08977a5c, 0x3a633a74, 0x1496a8db, 0xe3a61987, 0x89ed0229), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x59ccc78c, 0xf5eb1331, 0x81e324aa, 0x4258f3a1, 0xbe6ad381), Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, ModelingToolkit.ObservedFunctionCache{ODESystem}, Nothing, ODESystem, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, Vern9{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), Static.False}, L2Loss{Vector{Float64}, Matrix{Float64}, Nothing, Nothing, Nothing}, Nothing, Tuple{}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, OptimizationBase.ReInitCache{Vector{Int64}, SciMLBase.NullParameters}, Vector{Float64}, Vector{Float64}, Nothing, Nothing, Nothing, BBO_adaptive_de_rand_1_bin, Bool, OptimizationBase.NullCallback, Nothing}}, BlackBoxOptim.ScalarFitnessScheme{true}, BlackBoxOptim.ContinuousRectSearchSpace, Nothing}}, x0::Vector{Int64})
    @ BlackBoxOptim C:\Users\Hp\.julia\packages\BlackBoxOptim\lZtsr\src\bboptimize.jl:64
  [4] __solve(cache::OptimizationCache{OptimizationFunction{true, SciMLBase.NoAD, DiffEqParamEstim.var"#29#30"{Nothing, typeof(DiffEqParamEstim.STANDARD_PROB_GENERATOR), @Kwargs{tstops::Vector{Float64}, reltol::Float64, abstol::Float64}, ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, MTKParameters{Vector{Float64}, Tuple{}, Tuple{}, Tuple{}, Tuple{}}, ODEFunction{true, SciMLBase.AutoSpecialize, ModelingToolkit.var"#f#1091"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x08977a5c, 0x3a633a74, 0x1496a8db, 0xe3a61987, 0x89ed0229), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x59ccc78c, 0xf5eb1331, 0x81e324aa, 0x4258f3a1, 0xbe6ad381), Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, ModelingToolkit.ObservedFunctionCache{ODESystem}, Nothing, ODESystem, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, Vern9{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), Static.False}, L2Loss{Vector{Float64}, Matrix{Float64}, Nothing, Nothing, Nothing}, Nothing, Tuple{}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, OptimizationBase.ReInitCache{Vector{Int64}, SciMLBase.NullParameters}, Vector{Float64}, Vector{Float64}, Nothing, Nothing, Nothing, BBO_adaptive_de_rand_1_bin, Bool, OptimizationBase.NullCallback, Nothing})
    @ OptimizationBBO C:\Users\Hp\.julia\packages\OptimizationBBO\UYBCT\src\OptimizationBBO.jl:165
  [5] solve!
    @ C:\Users\Hp\.julia\packages\SciMLBase\tWwhl\src\solve.jl:187 [inlined]
  [6] #solve#725
    @ C:\Users\Hp\.julia\packages\SciMLBase\tWwhl\src\solve.jl:95 [inlined]
...
    @ C:\Users\Hp\.julia\packages\BenchmarkTools\1i1mY\src\execution.jl:288 [inlined]
 [17] tune!(b::BenchmarkTools.Benchmark)
    @ BenchmarkTools C:\Users\Hp\.julia\packages\BenchmarkTools\1i1mY\src\execution.jl:288
 [18] top-level scope
    @ C:\Users\Hp\.julia\packages\BenchmarkTools\1i1mY\src\execution.jl:728

@ParamThakkar123
Copy link
Contributor Author

All packages updated with the manifest resolved.

@ParamThakkar123
Copy link
Contributor Author

Do you have the latest version of OptimizationBBO and Optimization? Can you try and make an MWE?

@ChrisRackauckas

Yes. I am using the latest version of OptimizationBBO and Optimization.

Here's the code for the MWE:

using ParameterizedFunctions, OrdinaryDiffEq, DiffEqParamEstim, Optimization, ForwardDiff
using OptimizationBBO, OptimizationNLopt, Plots, RecursiveArrayTools, BenchmarkTools
using ModelingToolkit: t_nounits as t, D_nounits as D
gr(fmt=:png)

loc_bounds = Tuple{Float64, Float64}[(0, 5), (0, 5), (0, 5), (0, 5)]
glo_bounds = Tuple{Float64, Float64}[(0, 10), (0, 10), (0, 10), (0, 10)]
loc_init = [1,0.5,3.5,1.5]
glo_init = [5,5,5,5]

@mtkmodel LotkaVolterraTest begin
    @parameters begin
        a = 1.5  # Growth rate of prey
        b = 1.0  # Predation rate
        c = 3.0  # Death rate of predators
        d = 1.0  # Reproduction rate of predators
        e = 0.0  # Additional parameter (if needed)
    end
    @variables begin
        x(t) = 1.0  # Population of prey with initial condition
        y(t) = 1.0  # Population of predators with initial condition
    end
    @equations begin
        D(x) ~ a * x - b * x * y
        D(y) ~ -c * y + d * x * y
    end
end

@mtkbuild f = LotkaVolterraTest()

u0 = [1.0,1.0]                          #initial values
tspan = (0.0,10.0)
p = [1.5,1.0,3.0,1,0]                   #parameters used, these need to be estimated from the data
tspan = (0.0, 30.0)                     # sample of 3000 observations over the (0,30) timespan
prob = ODEProblem(f, u0, tspan,p)
tspan2 = (0.0, 3.0)                     # sample of 3000 observations over the (0,30) timespan
prob_short = ODEProblem(f, u0, tspan2,p)

dt = 30.0/3000
tf = 30.0
tinterval = 0:dt:tf
time_points  = collect(tinterval)

h = 0.01
M = 300
tstart = 0.0
tstop = tstart + M * h
tinterval_short = 0:h:tstop
t_short = collect(tinterval_short)

#Generate Data
data_sol_short = solve(prob_short,Tsit5(),saveat=t_short,reltol=1e-9,abstol=1e-9)
data_short = convert(Array, data_sol_short)
data_sol = solve(prob,Tsit5(),saveat=time_points,reltol=1e-9,abstol=1e-9)
data = convert(Array, data_sol)

t_concrete = collect(0.0:dt:tf)
obj = build_loss_objective(prob,Vern9(),L2Loss(t_concrete,data),tstops=t_concrete,reltol=1e-9,abstol=1e-9)
optprob = OptimizationProblem(obj, glo_init, lb = first.(glo_bounds), ub = last.(glo_bounds))

@btime res1 = solve(optprob, BBO_adaptive_de_rand_1_bin(), maxiters = 4e3)

The error:

MethodError: no method matching iterate(::BlackBoxOptim.ContinuousRectSearchSpace)

Closest candidates are:
  iterate(!Matched::Core.Compiler.InstructionStream, !Matched::Int64)
   @ Base show.jl:2778
  iterate(!Matched::Core.Compiler.InstructionStream)
   @ Base show.jl:2778
  iterate(!Matched::Plots.NaNSegmentsIterator)
   @ Plots C:\Users\Hp\.julia\packages\Plots\Ec1L1\src\utils.jl:175
  ...


Stacktrace:
  [1] in(x::Vector{Int64}, itr::BlackBoxOptim.ContinuousRectSearchSpace)
    @ Base .\operators.jl:1292
  [2] bboptimize(optctrl::BlackBoxOptim.OptController{BlackBoxOptim.DiffEvoOpt{BlackBoxOptim.FitPopulation{Float64}, BlackBoxOptim.SimpleSelector, BlackBoxOptim.AdaptiveDiffEvoRandBin{3}, BlackBoxOptim.RandomBound{BlackBoxOptim.ContinuousRectSearchSpace}}, BlackBoxOptim.FunctionBasedProblem{OptimizationBBO.var"#20#22"{OptimizationCache{OptimizationFunction{true, SciMLBase.NoAD, DiffEqParamEstim.var"#29#30"{Nothing, typeof(DiffEqParamEstim.STANDARD_PROB_GENERATOR), @Kwargs{tstops::Vector{Float64}, reltol::Float64, abstol::Float64}, ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, MTKParameters{Vector{Float64}, Tuple{}, Tuple{}, Tuple{}, Tuple{}}, ODEFunction{true, SciMLBase.AutoSpecialize, ModelingToolkit.var"#f#1091"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x08977a5c, 0x3a633a74, 0x1496a8db, 0xe3a61987, 0x89ed0229), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x59ccc78c, 0xf5eb1331, 0x81e324aa, 0x4258f3a1, 0xbe6ad381), Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, ModelingToolkit.ObservedFunctionCache{ODESystem}, Nothing, ODESystem, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, Vern9{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), Static.False}, L2Loss{Vector{Float64}, Matrix{Float64}, Nothing, Nothing, Nothing}, Nothing, Tuple{}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, OptimizationBase.ReInitCache{Vector{Int64}, SciMLBase.NullParameters}, Vector{Float64}, Vector{Float64}, Nothing, Nothing, Nothing, BBO_adaptive_de_rand_1_bin, Bool, OptimizationBase.NullCallback, Nothing}}, BlackBoxOptim.ScalarFitnessScheme{true}, BlackBoxOptim.ContinuousRectSearchSpace, Nothing}}, x0::Vector{Int64}; kwargs::@Kwargs{})
    @ BlackBoxOptim C:\Users\Hp\.julia\packages\BlackBoxOptim\lZtsr\src\bboptimize.jl:77
  [3] bboptimize(optctrl::BlackBoxOptim.OptController{BlackBoxOptim.DiffEvoOpt{BlackBoxOptim.FitPopulation{Float64}, BlackBoxOptim.SimpleSelector, BlackBoxOptim.AdaptiveDiffEvoRandBin{3}, BlackBoxOptim.RandomBound{BlackBoxOptim.ContinuousRectSearchSpace}}, BlackBoxOptim.FunctionBasedProblem{OptimizationBBO.var"#20#22"{OptimizationCache{OptimizationFunction{true, SciMLBase.NoAD, DiffEqParamEstim.var"#29#30"{Nothing, typeof(DiffEqParamEstim.STANDARD_PROB_GENERATOR), @Kwargs{tstops::Vector{Float64}, reltol::Float64, abstol::Float64}, ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, MTKParameters{Vector{Float64}, Tuple{}, Tuple{}, Tuple{}, Tuple{}}, ODEFunction{true, SciMLBase.AutoSpecialize, ModelingToolkit.var"#f#1091"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x08977a5c, 0x3a633a74, 0x1496a8db, 0xe3a61987, 0x89ed0229), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x59ccc78c, 0xf5eb1331, 0x81e324aa, 0x4258f3a1, 0xbe6ad381), Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, ModelingToolkit.ObservedFunctionCache{ODESystem}, Nothing, ODESystem, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, Vern9{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), Static.False}, L2Loss{Vector{Float64}, Matrix{Float64}, Nothing, Nothing, Nothing}, Nothing, Tuple{}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, OptimizationBase.ReInitCache{Vector{Int64}, SciMLBase.NullParameters}, Vector{Float64}, Vector{Float64}, Nothing, Nothing, Nothing, BBO_adaptive_de_rand_1_bin, Bool, OptimizationBase.NullCallback, Nothing}}, BlackBoxOptim.ScalarFitnessScheme{true}, BlackBoxOptim.ContinuousRectSearchSpace, Nothing}}, x0::Vector{Int64})
    @ BlackBoxOptim C:\Users\Hp\.julia\packages\BlackBoxOptim\lZtsr\src\bboptimize.jl:64
  [4] __solve(cache::OptimizationCache{OptimizationFunction{true, SciMLBase.NoAD, DiffEqParamEstim.var"#29#30"{Nothing, typeof(DiffEqParamEstim.STANDARD_PROB_GENERATOR), @Kwargs{tstops::Vector{Float64}, reltol::Float64, abstol::Float64}, ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, MTKParameters{Vector{Float64}, Tuple{}, Tuple{}, Tuple{}, Tuple{}}, ODEFunction{true, SciMLBase.AutoSpecialize, ModelingToolkit.var"#f#1091"{RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x08977a5c, 0x3a633a74, 0x1496a8db, 0xe3a61987, 0x89ed0229), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :t), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x59ccc78c, 0xf5eb1331, 0x81e324aa, 0x4258f3a1, 0xbe6ad381), Nothing}}, LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, ModelingToolkit.ObservedFunctionCache{ODESystem}, Nothing, ODESystem, Nothing, Nothing}, @Kwargs{}, SciMLBase.StandardODEProblem}, Vern9{typeof(OrdinaryDiffEqCore.trivial_limiter!), typeof(OrdinaryDiffEqCore.trivial_limiter!), Static.False}, L2Loss{Vector{Float64}, Matrix{Float64}, Nothing, Nothing, Nothing}, Nothing, Tuple{}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED_NO_TIME), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, OptimizationBase.ReInitCache{Vector{Int64}, SciMLBase.NullParameters}, Vector{Float64}, Vector{Float64}, Nothing, Nothing, Nothing, BBO_adaptive_de_rand_1_bin, Bool, OptimizationBase.NullCallback, Nothing})
    @ OptimizationBBO C:\Users\Hp\.julia\packages\OptimizationBBO\UYBCT\src\OptimizationBBO.jl:165
  [5] solve!
    @ C:\Users\Hp\.julia\packages\SciMLBase\tWwhl\src\solve.jl:187 [inlined]
  [6] #solve#725
    @ C:\Users\Hp\.julia\packages\SciMLBase\tWwhl\src\solve.jl:95 [inlined]
...
    @ C:\Users\Hp\.julia\packages\BenchmarkTools\1i1mY\src\execution.jl:288 [inlined]
 [17] tune!(b::BenchmarkTools.Benchmark)
    @ BenchmarkTools C:\Users\Hp\.julia\packages\BenchmarkTools\1i1mY\src\execution.jl:288
 [18] top-level scope
    @ C:\Users\Hp\.julia\packages\BenchmarkTools\1i1mY\src\execution.jl:728

The MWE code will probably now give the following error

Error: MethodError: no method matching iterate(::BlackBoxOptim.ContinuousRe
ctSearchSpace)

Closest candidates are:
  iterate(!Matched::ChainRulesCore.NotImplemented)
   @ ChainRulesCore /cache/julia-buildkite-plugin/depots/5b300254-1738-4989
-ae0a-f4d2d937f953/packages/ChainRulesCore/U6wNx/src/tangent_types/notimple
mented.jl:62
  iterate(!Matched::ChainRulesCore.NotImplemented, !Matched::Any)
   @ ChainRulesCore /cache/julia-buildkite-plugin/depots/5b300254-1738-4989
-ae0a-f4d2d937f953/packages/ChainRulesCore/U6wNx/src/tangent_types/notimple
mented.jl:63
  iterate(!Matched::LibGit2.GitRevWalker)
   @ LibGit2 /cache/julia-buildkite-plugin/julia_installs/bin/linux/x64/1.1
0/julia-1.10-latest-linux-x86_64/share/julia/stdlib/v1.10/LibGit2/src/walke
r.jl:29

@ChrisRackauckas
Copy link
Member

Only one built?

@ParamThakkar123
Copy link
Contributor Author

Only one built?

Actually, I modified the code for all the three and all three were building on the CI but since the past few runs and commits, I found that only one was building on the CI, for some reason

@ParamThakkar123
Copy link
Contributor Author

@ChrisRackauckas All the errors here have been fixed and all the three algorithms have been built successfully. Can you please review ?? I think we are ready to merge this.

@ChrisRackauckas ChrisRackauckas merged commit 3faddf0 into SciML:master Jan 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants