From 8c1721235c002d5d987d93d097a59983b0a5154e Mon Sep 17 00:00:00 2001 From: Vaibhav Dixit Date: Mon, 30 Oct 2023 12:51:28 -0400 Subject: [PATCH] Relax type of alg in ensemble solve for optimization --- src/ensemble/basic_ensemble_solve.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ensemble/basic_ensemble_solve.jl b/src/ensemble/basic_ensemble_solve.jl index e4dd54fac..245b3cf1e 100644 --- a/src/ensemble/basic_ensemble_solve.jl +++ b/src/ensemble/basic_ensemble_solve.jl @@ -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")