← Back to all sparks
C

cmdstanpy

ANALYTICS
Velocity0.0

Python interface to CmdStan for Bayesian models

CmdStanPy is clearing deprecations ahead of a 2.0 it keeps announcing.

bayesianstanmcmcdeprecationspython
Current state
CmdStanPy is at v1.3.0, which added a diagnose method on CmdStanModel, sampler timing information, create_inits() across the stanfit classes, and much faster MCMC CSV parsing. Every release in this window opens with the same notice: the next non-bugfix release will be 2.0 and will remove existing deprecations. In line with that, 1.3.0 drops Python 3.8 and renames the metric argument to inv_metric.
Where it's heading
The package tracks upstream Stan and prepares for its own break. New inference methods arrive as Stan ships them — Laplace with Stan 2.32, Pathfinder with 2.33 — while the interface work is mostly deprecation staging and CSV input-output performance. The repeated 2.0 warning across two years of releases suggests the cut has been deferred more than once.
Prediction
The notice at the top of every release points to 2.0 as the next non-bugfix version, removing the deprecations staged here including the metric argument.

Recent moves

  1. 9mo ago

    diagnose method, sampler timings and faster CSV parsing

    Adds a diagnose method on CmdStanModel, sampler timing output and create_inits() on the other stanfit classes, alongside notably faster MCMC CSV parsing. Python 3.8 support ends and metric is deprecated in favour of inv_metric, staging the 2.0 break.

    View source ↗
  2. 2y ago

    Fixes from_csv() for CmdStan 2.35 and later

    Two fixes, the substantive one restoring from_csv() for files written by CmdStan 2.35 and later. Keeps output readable after an upstream change.

    View source ↗
  3. 2y ago

    CmdStan 2.35 test fixes and multi-chain profile output

    Test fixes for CmdStan 2.35 and a correction to profile output when several chains run in one process. Maintenance.

    View source ↗
  4. 2y ago

    pyproject.toml build and pathfinder() argument fixes

    Moves the build to pyproject.toml, adds a num_threads argument to pathfinder() and fixes pathfinder() rejecting multiple initial values. Packaging plus two small corrections.

    View source ↗
  5. 2y ago

    New Pathfinder arguments and warmup without adaptation

    Adds new Pathfinder arguments, allows warmup iterations when not adapting, lets draws_pd filter new columns, and fixes unit_e output parsing for Stan 2.34. Follows the upstream Stan release rather than leading it.

    View source ↗
  6. 2y ago

    Laplace method and Pathfinder exposed from upstream Stan

    Exposes two inference methods as Stan ships them — the Laplace method from Stan 2.32 and Pathfinder from 2.33 — and adds chain, iteration and draw columns to draws_pd. Input-output munging moves to an external package.

    View source ↗