mlr-org / mlr3mbo

Flexible Bayesian Optimization in R
https://mlr3mbo.mlr-org.com
24 stars 1 forks source link

SurrogateMultiCritLearners should assert during initialization that the list of learners holds unique (w.r.t to the objects) learners #45

Closed sumny closed 3 years ago

sumny commented 3 years ago

e.g. currently it is possible to do:

learner = lrn("regr.ranger")
surrogate = SurrogateMultiCritLearners$new(learner = list(learner, learner))

During calling $update() both updates will be called but the first learner$model object now "points" to the second trained model because both learners are virtually the same object and not deep clones.