stan-dev / cmdstanpy

CmdStanPy is a lightweight interface to Stan for Python users which provides the necessary objects and functions to compile a Stan program and fit the model to data using CmdStan.
BSD 3-Clause "New" or "Revised" License
151 stars 69 forks source link

[Stan 2.34] expose sampler argument "save_metric" #713

Open mitzimorris opened 11 months ago

mitzimorris commented 11 months ago

Summary:

Add functionality to save metric as JSON to CmdStanPy.

Description:

CmdStan PR https://github.com/stan-dev/cmdstan/pull/1203 added new adaptive sampler argument save_metric. Make this available from CmdStanPy:

Current Version:

This will be available in 3.34

WardBrian commented 11 months ago

Should we expose it, or just always enable it by default?

The files are never that large relative to the output csvs

mitzimorris commented 11 months ago

always enable by default. what are we doing with save_config? we should be consistent.

WardBrian commented 11 months ago

I think save_cmdstan_config will always be enabled if it is supported. Eventually I think it makes sense to move essentially all the config logic to reading that file and then ignore the comments in the output csvs entirely.