I’m developing a CmdStan interface for Rust (see: orzAtalod/simple-cmdstan-rs; it’s still a work in progress). After getting some basic transformations working, I’m now aiming to build a more powerful and user-friendly interface.
One of the first challenges I’ve encountered is how to access the free parameters and data types defined in a Stan model. With this information, I could implement better argument checking and overall validation in Rust.
So my question is: Is there a way to access this kind of metadata directly via CmdStan, without having to manually parse the .stan file?
A lot of the interest in Stan in Rust has been around not using Stan’s algorithms, e.g. the nuts-rs project (which you can plug Stan models into using BridgeStan)
I thought that was nutpie-rs, but Brian’s right, it’s nuts-rs.
This is technically an implementation of @aseyboldt’s Nutpie, not the vanilla and chocolate NUTs we have in Stan (we moved from slice sampling to multinomial sampling and added more granularity to U-turn conditions and also added a lot of adaptation to what was in the original paper). From everything I can see, Nutpie’s adaptation is better than Stan’s. After adaptation, I believe they use the same version of NUTS—the multinomial sampling one (though I don’t know if Adrian caught the more granular U-turns, which look a bit like his more granular Phase II adaptation).