Serialises a pigauto_fit object to disk, including the torch
model state. The saved file can be loaded on any machine with the
same pigauto version.
Details
Standard saveRDS() does not work for pigauto fits because
torch tensor states cannot be serialised by R's native mechanism.
This function converts the model state to a portable raw format
before saving.
Examples
if (FALSE) { # \dontrun{
save_pigauto(fit, "my_model.pigauto")
fit2 <- load_pigauto("my_model.pigauto")
} # }
