stan-dev / posteriordb

Database with posteriors of interest for Bayesian inference
182 stars 36 forks source link

Extract model inputs directly from the compiler #198

Open MansMeg opened 4 years ago

MansMeg commented 4 years ago

This is an issue started from the following PR #192

Ping @mandel.

mandel commented 4 years ago

Thank you for opening this issue.

I have updated the fork of the Stan compiler to add an option --info which outputs on the standard output a JSON object containing information about the model. It currently generates an object a field inputs containing a dictionary where each entry corresponds to a variable in the data block. To each variable is associated an object with two fields:

The code is available in the info branch of the fork: https://github.com/mandel/stanc3/tree/info

MansMeg commented 4 years ago

Thanks! I will try to add this to the documentation somehow. Thanks!