I have a child class of CmdStanModel that looks for an executable file of the same name as the stan file and passes it in as the exe argument if it finds one. I can certainly work around this with minor changes
It would be a huge convenience to be able to pass a Stan model toCmdStanModelas a string, rather than first having to write it to a file. Adding boilerplate code to write a string to a file from Python only to load it back for the model to use seems unnecessary from a user's sta...
CmdStanPy is a lightweight pure-Python interface to CmdStan which provides access to the Stan compiler and all inference algorithms. It supports both development and production workflows. Because model development and testing may require many iterations, the defaults favor development mode and therefore...
'bernoulli.data.json')# instantiate a model; compiles the Stan program by defaultmodel=CmdStanModel(stan_file=stan_file)# obtain a posterior sample from the model conditioned on the datafit=model.sample(chains=4,data=data_file)# summarize the results (wraps CmdStan `bin/stansummary`):fit....