Open mb706 opened 1 year ago
library("mlr3") rsmp("holdout", x = 1) #> Error: object of type 'closure' is not subsettable #> Environment: #> 1: rsmp("holdout", x = 1) #> 2: dictionary_sugar_get(mlr_resamplings, .key, ...) #> 3: stopf("Cannot set argument '%s' for '%s' (not a constructor argument, not a #> 4: stop(simpleError(str_wrap(sprintf(msg, ...), width = wrap), call = NULL)) #> 5: simpleError(str_wrap(sprintf(msg, ...), width = wrap), call = NULL) #> 6: structure(list(message = as.character(message), call = call), class = class #> 7: str_wrap(sprintf(msg, ...), width = wrap) #> 8: sprintf(msg, ...) #> 9: did_you_mean(nn, c(constructor_args, param_ids, fields(obj$value))) #> 10: unique(candidates) #> 11: fields(obj$value) #> 12: setdiff(names(x$public_methods), c("initialize", "clone", "print", "format" #> 13: as.vector(x)
problem seems to be that rsmp()-entries are functions and not R6-constructors, which is explicitly allowed for dictionaries.
rsmp()
R6
(expected behaviour: "Error Cannot set argument 'x' for 'holdout' ...")
"Error Cannot set argument 'x' for 'holdout' ..."
problem seems to be that
rsmp()
-entries are functions and notR6
-constructors, which is explicitly allowed for dictionaries.