File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,7 +201,11 @@ function check_stop_condition(ctrl::OptRunController)
201201 return " Max number of steps ($(ctrl. max_steps) ) reached"
202202 end
203203
204- return check_stop_condition (ctrl. evaluator, ctrl)
204+ eval_check = check_stop_condition (ctrl. evaluator, ctrl)
205+ isempty (eval_check) || return eval_check
206+
207+ optimizer_check = check_stop_condition (ctrl. optimizer, ctrl)
208+ return optimizer_check
205209
206210 return " " # empty string, no termination
207211end
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ Base abstract class for black-box optimization algorithms.
33"""
44abstract type Optimizer end
55
6+ # by default optimizer doesn't check for stopping conditions
7+ check_stop_condition (o:: Optimizer , ctrl) = " "
8+
69"""
710Optimizers derived from `SteppingOptimizer` implement classical iterative optimization scheme
811`step!()` → `step!()` → …
You can’t perform that action at this time.
0 commit comments