Closed mb706 closed 4 years ago
pls provide a mini example, so we can work against that
inst = TuningInstance$new(tsk("iris"),
po("select") %>>% lrn("classif.rpart"),
rsmp("holdout"), msr("classif.ce"),
paradox::ParamSet$new(list(
paradox::ParamInt$new("classif.rpart.minsplit", 1, 1))),
term("evals", n_evals=1))
tnr("random_search")$tune(inst)
inst$archive("params")
gives
Error in rbindlist(x[[col]], fill = TRUE, use.names = TRUE) :
cannot coerce type 'closure' to vector of type 'logical'
well its very obvious and unsurprising what happens. "params" contains non-scalar entries (tune_x can only contain scalar entries, because we decided on this restriction for paradox)
in your case that is the "selector", which is a function, as you mentioned.
and mlr3misc::unnest fails.
now tell me what you want as a result? "selector" in a list-column? then you have to open up the issue in mlr3misc
@mllg
michels PR in mlr3misc solvd the problem, for good measure we can still add a test here when mergen then close
e.g. when tuning a pipeine which contains a PipeOpSelect, with the
selector
argument which takes function values. This is the case even if this selector argument is not the one bein tuned.