Hey @bgoodri, @jonah - you all were interested in metadata methods that return size and type information about Stan parameters, transformed parameters, and generated quantities. Here’s my proposed implementation with an example:
In that example, it’s printing things like "<< K >>" to indicate that we will do string interpolation on those sizes later on, so the output would actually be filled in with whatever K is set to in the data or transformed data block.
How’s that look? If that works, it should be merged soon and in the next release candidate if you all want to start playing with it.
The PR didn’t have a description or a link to an issue.
I looked through cpp.expected in the PR and as far as I can tell, the difference aside from implementation is two new methods:
Yep, those are the two new methods talked about in the roadmap draft. I also linked to a specific line with actual example string output. The C++ interpolates the json string with the actual size information (present only after the model has been instantiated). I’m not sure where R string manipulation or exec comes in - it’s all happening in C++. A normal JSON string is returned.
I can change the name to get_constrained_sizedtypes().