Open martinmodrak opened 1 year ago
I should also note that if an agreement on how this should be implemented is made, I am happy to prepare a pull request.
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.
Started a CmdStan issue at https://github.com/stan-dev/cmdstan/issues/1178 - we'll see if there's agreement to implement this.
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.