mlr3
mlr3 copied to clipboard
Train task is stored during simple `$train()` but not during `resample()`
Is this intentional?
library(mlr3)
learner = lrn("regr.rpart")
task = tsk("mtcars")
learner$train(task)
learner$state$train_task
#> <TaskRegr:mtcars> (32 x 11): Motor Trends
#> * Target: mpg
#> * Properties: -
#> * Features (10):
#> - dbl (10): am, carb, cyl, disp, drat, gear, hp, qsec, vs, wt
rr = resample(task, learner, rsmp("holdout"), store_models = TRUE)
#> INFO [15:56:59.149] [mlr3] Applying learner 'regr.rpart' on task 'mtcars' (iter 1/1)
rr$learners[[1]]$state$train_task
#> NULL
Created on 2023-07-18 with reprex v2.0.2