Skip to content

Commit

Permalink
Relax type of alg in ensemble solve for optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavdixit02 committed Oct 30, 2023
1 parent 6b0a385 commit 8c17212
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ensemble/basic_ensemble_solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ function __solve(prob::EnsembleProblem{<:AbstractVector{<:AbstractSciMLProblem}}
end

function __solve(prob::AbstractEnsembleProblem,
alg::Union{AbstractDEAlgorithm, Nothing},
alg::A,
ensemblealg::BasicEnsembleAlgorithm;
trajectories, batch_size = trajectories,
pmap_batch_size = batch_size ÷ 100 > 0 ? batch_size ÷ 100 : 1, kwargs...)
pmap_batch_size = batch_size ÷ 100 > 0 ? batch_size ÷ 100 : 1, kwargs...) where {A}
num_batches = trajectories ÷ batch_size
num_batches < 1 &&
error("trajectories ÷ batch_size cannot be less than 1, got $num_batches")
Expand Down

0 comments on commit 8c17212

Please sign in to comment.