mlr-org / bbotk

Black-box optimization framework for R.
https://bbotk.mlr-org.com
GNU Lesser General Public License v3.0
21 stars 9 forks source link

Remove is_terminated from OptimInstance #126

Closed mb706 closed 3 years ago

mb706 commented 3 years ago

I see no reason why the user sholdn't be allowed to change the termination criterion of a OptimInstance and then continue optimizatoin, possibly with a different tuner. Currently this is made unnecessarily difficult because the user also has to reset $is_terminated.

$is_terminated is currently also used for printing, but why not evaluate it dynamically (turn $is_terminated into an active binding)? It shouldn't be that expensive.

be-marc commented 3 years ago

Optimizer$optimize(instance) could set instance$is_terminated = FALSE. This is done before the first termination check is called. So the user does not have to change it manually anymore. Are you okay with that?

be-marc commented 3 years ago

But I am also unsure why we implemented this slot.

mb706 commented 3 years ago

Resetting in $optimize would still make archive$eval_batch() not work, imho even more confusing. I'd still vote for removing is_terminated.

berndbischl commented 3 years ago

i am fine with making this an AB. but the user needs to be able to ask? what is the current proposal / summary?

mb706 commented 3 years ago

https://github.com/mlr-org/bbotk/pull/127