Skip to content

Resume a cmdstanpy.CmdStanModel.sample() run into a cmdstanpy.CmdStanMCMC object after finishing the python execution #365

@jmaronas

Description

@jmaronas

Summary:

Is there a way to resume a cmdstanpy.CmdStanModel.sample() run into a cmdstanpy.CmdStanMCMC object after finishing the python execution?

Description:

After running a cmdstanpy.CmdStanModel.sample() in a e.g cluster, one would like to be able to obtain the associated cmdstanpy.CmdStanMCMC from the files generated during sampling, once these files are copied from the cluster into the local machine.

In this way, one can use e.g arviz to obtain the same inference data from the CmdStanMCMC object that we would obtain if an arviz.inference object is created just after the .sample() execution finishes. At the moment, one can only load files generated through cmdstanpy by using arviz to load cmdstan files (and in this way we miss some of the attributes that are load when directly loading a CmdStanMCMC into arviz).

Also, another (more interesting) user case would be if we would like to resume the sampling, from the last element in the chain and using the already precomputed parameters during warm up (which is usually the most time consuming step).

Current Version:

0.9.68

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