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

Solving Ensemble problem requires ensemble algorithm (not the case for other ensemble solves) #889

Open
TorkelE opened this issue Mar 21, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@TorkelE
Copy link
Member

TorkelE commented Mar 21, 2025

E.g. this

opt_esol = solve(opt_eprob, Adam(5e-3); trajectories = n, maxiters = 10000)

yields a

ERROR: MethodError: no method matching __solve(::EnsembleProblem{…}, ::Adam{…}; trajectories::Int64, maxiters::Int64)
The function `__solve` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  __solve(::SciMLBase.AbstractEnsembleProblem, ::A, ::SciMLBase.BasicEnsembleAlgorithm; trajectories, batch_size, progress_aggregate, pmap_batch_size, kwargs...) where A
   @ SciMLBase ~/.julia/packages/SciMLBase/Ub9ub/src/ensemble/basic_ensemble_solve.jl:122
  __solve(::SciMLBase.AbstractDEProblem, ::Any...; default_set, second_time, kwargs...)
   @ DiffEqBase ~/.julia/packages/DiffEqBase/gGshU/src/solve.jl:1444
  __solve(::SciMLBase.AbstractEnsembleProblem, ::Union{Nothing, SciMLBase.AbstractDEAlgorithm}; kwargs...)
   @ SciMLBase ~/.julia/packages/SciMLBase/Ub9ub/src/ensemble/basic_ensemble_solve.jl:95
  ...

Stacktrace:
 [1] solve(prob::EnsembleProblem{…}, args::Adam{…}; kwargs::@Kwargs{…})
   @ SciMLBase ~/.julia/packages/SciMLBase/Ub9ub/src/solve.jl:104

while

opt_esol = solve(opt_eprob, Adam(5e-3), EnsembleThreads(); trajectories = n, maxiters = 10000)

works fine

@TorkelE TorkelE added the bug Something isn't working label Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant