PyStan 3 Beta 2 is here. It works for many people. It uses Stan 2.24 and has useful features PyStan 2 lacks.
A release candidate for PyStan 3 will wait until RStan 3 is ready since harmonizing the interfaces’ user-facing APIs is a high-priority goal.
PyStan 2 works fine but is stuck on 2.19. PyStan 2 is no longer actively maintained.
This leaves us in an uncomfortable situation. PyStan 2 is not maintained but there is no official, non-beta-version replacement for PyStan 2. And there will be no official replacement until RStan 3 is ready. This post describes one proposed way of dealing with this situation.
People who can move to PyStan 3 Beta 2 should start doing so. For those using the default sampler, PyStan 3 Beta 2 works fine. If you can draw samples using code written for PyStan 2, you can very likely draw samples using PyStan 3 Beta 2.
People who can start using PyStan 3 Beta 2 right now:
- macOS and Linux users who have x86_64 hardware and who are drawing samples from models using the default sampler.
As for people who can’t move to or who depend on features missing from PyStan 3 Beta 2, there are some alternatives available.
People who cannot use PyStan 3 Beta 2 right now:
- Users who use variational inference, maximization algorithms (e.g., LBFGS), or samplers other than the default sampler.
- Users stuck on Python 2.
- Windows users who cannot use WSL2 to emulate Linux.
For these users it makes sense to switch over to a different Stan interface (e.g., CmdStanPy, CmdStan, RStan) or use a different NUTS implementation (e.g., PyMC3). PyStan 3’s set of supported platforms is unlikely to change before 2021. People using Stan for VI or posterior maximization can use packages such as jax and pytorch. jax and pytorch support a broader range of optimization algorithms. They also have multinational corporations supporting their development.
So there’s a path available for all Python users who want to use newer versions of the Stan C++ library. No Python user is left entirely without options.
With this in mind, We (@ariddell and @ahartikainen ) would like to propose doing the following over the coming months:
- Announce PyStan 3 Beta 2 in a variety of places in order to attract more testers.
- Indicate in a variety of places that PyStan 2 is no longer being developed and that folks should start exploring their options.