Skip to content

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

@MansMeg

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.

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