ArviZ 1.0 release

We have been refactoring ArviZ to improve modularity and flexibility, while preserving a user-friendly interface that works well with minimal input. Following this effort, we have recently released ArviZ 1.0.

Modular structure

ArviZ is now composed of three smaller libraries:

  • arviz-base: data structures and converters from different PPLs

  • arviz-stats: statistical functions and diagnostics

  • arviz-plots: visualization built on top of arviz-base and arviz-stats

All functionality remains accessible through the main arviz namespace, and this is the recommended way to use ArviZ for most users. However, the modular structure allows accommodating a wider range of use cases and users. For instance, a developer may prefer to use arviz-stats via the array interface, with minimal dependencies (NumPy and SciPy) and minimal assumptions baked in. In contrast, an end user may prefer to use arviz-stats via the xarray interface following the InferenceData schema.

Plotting improvements

We have significantly redesigned the plotting API:

  • Simplified backend integration (Matplotlib, Bokeh, Plotly)

  • Reduced backend-specific code, making it easier to extend and maintain

  • More flexible API for different user needs (casual users, power users, developers)

  • Expanded set of batteries-included plots for common Bayesian workflow tasks. For example, we now have more specialized plots for predictive checking, new plots for prior/likelihood sensitivity analysis, and more. Check the gallery for an overview.

Documentation and learning resources

We have also improved the accessibility of documentation, especially for newcomers. In addition to expanded examples, we introduced Exploratory Analysis of Bayesian Models , which demonstrates how to use ArviZ in context.

For more details on design principles and motivation, see the new paper Journal of Open Source Software: ArviZ: a modular and flexible library for exploratory analysis of Bayesian models .

If you are already an ArviZ user, the ArviZ migration guide — ArviZ dev documentation offers help with the transition to the new version.

Compatibility with the PyMC ecosystem

As the new version of ArviZ introduces some breaking changes, we are working on adapting PyMC and other tools in the ecosystem to fully work with it.

7 Likes

I am trying to test ArviZ 1.0 in my conda PyMC environment:

arviz 1.0.0 pypi_0 pypi
arviz-base 1.0.0 pypi_0 pypi
arviz-plots 1.0.0 pypi_0 pypi
arviz-stats 1.0.0 pypi_0 pypi
pymc 5.28.4 h45ef27b_0 conda-forge
pymc-base 5.28.4 pyhc364b38_0 conda-forge
python 3.13.12 hb7b561f_100_cp313
python-dateutil 2.9.0.post0 pyhe01879c_2 conda-forge
python-graphviz 0.21 pyhbacfb6d_0 conda-forge
python_abi 3.13 3_cp313

However I am getting an incompatibility error:

 line 2, in <module>
    import pymc as pm
  File "/home/vital/anaconda3/envs/SpecsyConda/lib/python3.13/site-packages/pymc/__init__.py", line 50, in <module>
    from pymc import _version, gp, math, ode, sampling
  File "/home/vital/anaconda3/envs/SpecsyConda/lib/python3.13/site-packages/pymc/gp/__init__.py", line 17, in <module>
    from pymc.gp import cov, mean, util
  File "/home/vital/anaconda3/envs/SpecsyConda/lib/python3.13/site-packages/pymc/gp/cov.py", line 52, in <module>
    from pymc.pytensorf import constant_fold
  File "/home/vital/anaconda3/envs/SpecsyConda/lib/python3.13/site-packages/pymc/pytensorf.py", line 53, in <module>
    from pymc.util import makeiter
  File "/home/vital/anaconda3/envs/SpecsyConda/lib/python3.13/site-packages/pymc/util.py", line 244, in <module>
    def drop_warning_stat(idata: arviz.InferenceData) -> arviz.InferenceData:
                                 ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'arviz' has no attribute 'InferenceData'

But from the requirements file of pymc 5.28.4 it should be compatible… right?

arviz>=1.0.0,<2.0
cachetools>=4.2.1,<7
cloudpickle
numpy>=1.25.0
pandas>=0.24.0
pytensor @ git+https://github.com/pymc-devs/pytensor.git@v3
rich>=13.7.1
scipy>=1.4.1
threadpoolctl>=3.1.0,<4.0.0
typing-extensions>=3.7.4

PyMC v5 is not compatible with arviz 1.0. You will need to pip install pymc v6, similar to the way you did pytensor v3. We’re working hard on the next major release!

3 Likes

Thanks for the reply and sorry for the confusion! Is there a timeline estimation for the v6 release?

volunteer open source ¯\_(ツ)_/¯

We’re working actively on it, it’s a high priority.

3 Likes

Great work, looking forward to giving it a try!