PyStan 3 prototype "pystan-next"


#1

I’ve pushed a working prototype of PyStan 3 to https://github.com/stan-dev/pystan-next . The plan is for this code to eventually replace https://github.com/stan-dev/pystan.

The main design difference between PyStan 3 and previous versions is that PyStan 3 is pure-Python. There’s no C++ code. All the heavy lifting (e.g., model compilation) is handled by httpstan. It’s all permissively licensed, respecting the result of a vote of pystan devs.

I’ll aim to align the user-facing API with RStan3’s and gradually port every test from pystan to pystan-next.

Some notable statistics:

PyStan 2: 5,625 lines of code, excluding tests
PyStan 3 and httpstan: 1,669 lines of code, excluding tests

The reduction in lines of code is achieved thanks to the stan::services C++ API. For example, thanks to the work on the C++ API the file stan_fit.hpp (1,559 LOC) is no longer needed.


#2

Wonderful!

Nice to see the code’s shrinking. Is that including httpstan? I didn’t even notice there was a new httpstan repo. I see the link to the ISC license is right at the top—fantastic.

How’s the performance with the HTTP interface?

And thanks to everyone who built stan::services—it’s so nice to see that paying off.