mlr-org / mlr3tuning

Hyperparameter optimization package of the mlr3 ecosystem
https://mlr3tuning.mlr-org.com/
GNU Lesser General Public License v3.0
53 stars 5 forks source link

Tuner$param_classes should be an AB that points to Optimizer$param_classes #289

Closed pfistfl closed 3 years ago

pfistfl commented 3 years ago

When trying to e.g. change the param_classes of a Tuner, I currently have to do the following:

  tuner$param_classes = c(tuner$param_classes, "ParamUty")
  tuner$`.__enclos_env__`$private$.optimizer$param_classes = tuner$param_classes

param_classes should either be immutable OR changes to param_classes should also affect the underlying Optimizer's param_classes.

be-marc commented 3 years ago

param_set, param_classes, properties and packages are immutable now.

@pfistfl Do you really need to change these after creating the tuner object? Or could you just create a new tuner with different properties?

pfistfl commented 3 years ago

was mostly due to https://github.com/mlr-org/bbotk/issues/123, so should be fine