Closed berndbischl closed 4 years ago
I don't get it - I use emoa::
at two spots in the nds_selection
function.
The same way as mlr3tuning uses GenSA in TunerGenSA.
Is GenSA also called somewhere else? I can't find it.
@mllg do we HAVE to load the suggested package / import the namespace? or is this enough?
emoa
should be listed in Suggests and its namespace should be loaded with requireNamespace()
or mlr3misc::require_namespaces()
in nds_selection()
. The later is not technically required but considered to be good practice.
implemented as @mllg suggested
actually......
a) GenSA DOES require_namespace its package. its done in the superclass Tuner. look at it. b) you could actually add the emoa package into the "packages-slot" of every tuner thats multicrit. not sure whats best. maybe lets stay as we are?
the cleanest solution would actually be to have a Tuner sublass for multi-crit tuning. and add the emoa package in the constructor of TunerMultiCrit to the package slot
at the moment we have a package slot in Tuner
but we don't load packages, and we specifically have documented that packages are not automatically loaded by any method of the Tuner
class.
pls have a look how we do this for eg GenSA in mlr3tuning