cmdstanr icon indicating copy to clipboard operation
cmdstanr copied to clipboard

Store and expose `stanc_options`

Open martinmodrak opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe. In development of the SBC package I need somewhat reliable way to see if a model has changed from a previous version. I'd like to be able to also check if stanc options differ from previous compilation.

Describe the solution you'd like CmdStanModel already has a $stanc_options_ member, so presumably this was planned at some point. The member should store the stanc options used for the latest compilation (including all automatic modifications done in $compile())

Describe alternatives you've considered Alternatively, we could have CmdStan provide an "info" method for a compile model that lets us retrieve the stanc and C++ options used for compilation. This would be more reliable, but requires changes to CmdStan.

martinmodrak avatar Aug 09 '23 15:08 martinmodrak

I should also note that if an agreement on how this should be implemented is made, I am happy to prepare a pull request.

martinmodrak avatar Aug 09 '23 16:08 martinmodrak

Alternatively, we could have CmdStan provide an "info" method for a compile model that lets us retrieve the stanc and C++ options used for compilation. This would be more reliable, but requires changes to CmdStan.

Yeah this does seem more reliable and could also be used by CmdStanPy and other CmdStan wrappers. But if it seems unlikely to get into CmdStan anytime soon (I’m not sure) then we could do something in CmdStanR.

jgabry avatar Aug 09 '23 16:08 jgabry

Started a CmdStan issue at https://github.com/stan-dev/cmdstan/issues/1178 - we'll see if there's agreement to implement this.

martinmodrak avatar Aug 10 '23 08:08 martinmodrak