I would like to save a cmdstanr object and use the serialisation done in save_object(), but I would like to wrap it myself. Hence, something like this:
obj <- fit$save_object()
saveRDS(list(obj, my_metadata=list(...)))
I think this would be done, e.g. by supplying format=NULL or similar in the current function?
|
save_object <- function(file, format = c("rds", "qs2"), ...) { |
I'm happy to open a PR for this if you think this is a good idea. Just tell me what you think would be a good API.
I would like to save a cmdstanr object and use the serialisation done in save_object(), but I would like to wrap it myself. Hence, something like this:
I think this would be done, e.g. by supplying format=NULL or similar in the current function?
cmdstanr/R/fit.R
Line 140 in cb6d218
I'm happy to open a PR for this if you think this is a good idea. Just tell me what you think would be a good API.