diff --git a/src/ensemble/basic_ensemble_solve.jl b/src/ensemble/basic_ensemble_solve.jl index bef2d4a5fb..522e487e83 100644 --- a/src/ensemble/basic_ensemble_solve.jl +++ b/src/ensemble/basic_ensemble_solve.jl @@ -119,18 +119,19 @@ function __solve(prob::AbstractEnsembleProblem, ensemblealg::BasicEnsembleAlgorithm; trajectories, batch_size = trajectories, progress_aggregate=true, pmap_batch_size = batch_size ÷ 100 > 0 ? batch_size ÷ 100 : 1, kwargs...) - logger = progress_aggregate ? AggregateLogger(current_logger()) : current_logger() + logger = progress_aggregate ? AggregateLogger(Logging.current_logger()) : Logging.current_logger() - with_logger(logger) do + Logging.with_logger(logger) do num_batches = trajectories ÷ batch_size num_batches < 1 && error("trajectories ÷ batch_size cannot be less than 1, got $num_batches") num_batches * batch_size != trajectories && (num_batches += 1) - ChainRulesCore.@ignore_derivatives if get(kwargs, :progress, false) + if get(kwargs, :progress, false) name = get(kwargs, :progress_name, "Ensemble") for i in 1:trajectories - Logging.@logmsg(LogLevel(-1), "$name #$i", _id=Symbol("SciMLBase_$i"), progress=0) + msg = "$name #$i" + Logging.@logmsg(LogLevel(-1), msg, _id=Symbol("SciMLBase_$i"), progress=0) end end