I am happy to announce that the latest release candidates of Cmdstan and Stan are now available on Github!
This release cycle brings several improvements to the headline features of the last release - tuple types and the Pathfinder algorithm - new distributions, and other improvements.
You can find the release candidate for cmdstan here. Instructions for installing are given at the bottom of this post.
Please test the release candidate with your models and report if you experience any problems. We also kindly invite you to test the new features and provide feedback. If you feel some of the new features could be improved or should be changed before the release, please do not hesitate to comment.
The Stan development team appreciates your time and help in making Stan more efficient while maintaining a high level of reliability.
If everything goes according to plan, the 2.34 version will be released next week.
Below are some of the highlights of the new release.
A new feature has been added that will be familiar to users of Python and other languages. Tuple-like items can now appear on the left hand side of an
= in assignment, in a feature known as “unpacking”.
For example, the following is now valid:
matrix[N, M] A;
matrix[N, M] Q;
matrix[M, M] R;
(Q, R) = qr_thin(A); // qr_thin returns a tuple(matrix, matrix)
Several new output options are available for CmdStan to produce JSON files for easier processing.
output save_cmdstan_config=1will produce a JSON file which contains a serialized copy of the configuration for this run of CmdStan. This should be equivalent to what is currently printed as comments at the top of the CSV file.
- For sampling algorithms, the argument
adapt save_metric=1will produce a JSON file that contains the adapted step size and inverse metric. This file can be used with the pre-existing
metricargument to initialize later runs.
Additionally, several bugs in the way file names were constructed by CmdStan have been resolved. This should hopefully lead to a more predictable experience when using multi-chain sampling runs or when saving the outputs of individual paths of Pathfinder.
This release saw the addition of two new distributions to Stan.
The ability to use a
real value in a conditional was removed this version. To recreate the exact behavior, you can compare the value with 0 (e.g.
x != 0). However, we recommend pausing and re-considering such conditionals. Due to things like numerical error, it may be preferrable to instead test that
x is greater than some small value.
This release also contains a large number of bug fixes across all levels of the Stan ecosystem. Some details are available in the preliminary release notes
Download the tar.gz file from the link above, extract it and use it the way you use any Cmdstan release. We also have an online Cmdstan guide available at CmdStan User’s Guide
If you are using cmdstanpy you can install the release candidate using
With CmdStanR you can install the release candidate using
cmdstanr::install_cmdstan(version = "2.34.0-rc1", cores = 4)