mlr-org/mlr3

fallback learner should maybe be a warning

sebffischer opened this issue · 3 comments

Currently, the fallback learner log info is only shown during debug mode:

mlr3/R/worker.R

Lines 94 to 102 in dc2a983

lg$debug("Calling train method of fallback '%s' on task '%s' with %i observations",
fb$id, task$id, task$nrow, learner = fb$clone())
fb = assert_learner(as_learner(fb))
require_namespaces(fb$packages)
fb$train(task)
learner$state$fallback_state = fb$state
lg$debug("Fitted fallback learner '%s'",

maybe this should be a warning?

Maybe relates more to the 'encapsulate' machinery than the fallback learner -- what to do if something that was encapsulated fails? Or is there a way for the fallback learner to be invoked without the encapsulation noticing?

make this info

learner = lrn("classif.debug", error_train = 1, fallback = lrn("classif.featureless"))

learner$train(tsk("spam"))