Per default, when calling benchmark() or resample(), the models are in unmarshaled form.
When calling $score() and $aggregate() it is checked whether the measure needs access to the model, and if so, a good error message is given that informs the user that:
a) He needs to $unmarshal() the object
b) After doing so, he needs to $marshal() again to be able to save the object
TODOs:
we can save one cycle when using callr encapsulation + parallelization by not discarding the marshalled model before the predict step.
This is useful for learners that e.g. rely on external pointers and that need processing of the model to be serializable.
Addresses https://github.com/mlr-org/mlr3/issues/891
Suggestion:
benchmark()
orresample()
, the models are in unmarshaled form.$score()
and$aggregate()
it is checked whether the measure needs access to the model, and if so, a good error message is given that informs the user that: a) He needs to$unmarshal()
the object b) After doing so, he needs to$marshal()
again to be able to save the objectTODOs:
Points for discussion:
This is useful for learners that e.g. rely on external pointers and that need processing of the model to be serializable. Addresses https://github.com/mlr-org/mlr3/issues/891
Input checks on the measure (check that model is not marshaleld when accessing the model) only work partially (https://github.com/mlr-org/mlr3/issues/1000)
TODOs: