Until a clever solution is available, a stupid way to serialize the model object is to save the textmodel_transformer object with the whole directory of output_dir. When deserialize, extract the directory into a temp. directory and then rewrite output_dir to that temp directory.
The current
textmodel_transformer
is not portable across machine due to the hardcoding ofoutput_dir
https://github.com/chainsawriot/grafzahl/blob/e8b2f81ac47d026c95b3a069a94e075da6cceb21/R/train.R#L52
Until a clever solution is available, a stupid way to serialize the model object is to save the
textmodel_transformer
object with the whole directory ofoutput_dir
. When deserialize, extract the directory into a temp. directory and then rewriteoutput_dir
to that temp directory.