Skip to content

Enable fit$save_object also to serialise directly to R #1179

Description

@MansMeg

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions