Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract model inputs directly from the compiler #198

Open
MansMeg opened this issue Sep 28, 2020 · 2 comments
Open

Extract model inputs directly from the compiler #198

MansMeg opened this issue Sep 28, 2020 · 2 comments

Comments

@MansMeg
Copy link
Collaborator

MansMeg commented Sep 28, 2020

This is an issue started from the following PR #192

Ping @mandel.

@mandel
Copy link

mandel commented Sep 28, 2020

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:

  • type: the base type of the variable ("int" or "real").
  • dimensions: the number of dimensions (0 for a scalar, 1 for a vector or row vector, etc.).

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

@MansMeg
Copy link
Collaborator Author

MansMeg commented Sep 30, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants