You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After spending more time with this, I think our best approach here will to wait for more machinery from mlr3 folks before implementing anything more principled. Prediction in a new session works fine, so this shouldn't be a pain point!
library(mlr3)
task<- tsk("mtcars")
fit<- lrn("regr.rpart")
# train a model of this learner for a subset of the taskfit$train(task, row_ids=1:26)
callr::r(
function(fit) {
library(mlr3)
predict(fit, mtcars[27:32,])
},
args=list(fit=fit)
)
#> [1] 27.71429 16.87368 16.87368 16.87368 16.87368 16.87368
I have started a discussion in mlr3 about serialization here: mlr-org/mlr3#891
If we implement something like this, adding a bundle method for mlr3 Learners should be straightforward! :)
Some work on the
mlr3branch already.