Skip to content

Commit 2327311

Browse files
Merge pull request #946 from SciML/fix-cma-verbosity
Add verbose parameter support to CMAEvolutionStrategyOpt
2 parents c0c3776 + 7a40fa9 commit 2327311

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/OptimizationCMAEvolutionStrategy/src/OptimizationCMAEvolutionStrategy.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ function __map_optimizer_args(prob::OptimizationCache, opt::CMAEvolutionStrategy
2020
maxiters::Union{Number, Nothing} = nothing,
2121
maxtime::Union{Number, Nothing} = nothing,
2222
abstol::Union{Number, Nothing} = nothing,
23-
reltol::Union{Number, Nothing} = nothing)
23+
reltol::Union{Number, Nothing} = nothing,
24+
verbose::Bool = false)
2425
if !isnothing(reltol)
2526
@warn "common reltol is currently not used by $(opt)"
2627
end
2728

2829
mapped_args = (; lower = prob.lb,
2930
upper = prob.ub,
3031
logger = CMAEvolutionStrategy.BasicLogger(prob.u0;
31-
verbosity = 0,
32+
verbosity = verbose ? 1 : 0,
3233
callback = callback))
3334

3435
if !isnothing(maxiters)

0 commit comments

Comments
 (0)