Skip to content

Packaging: arviz floor 'arviz>=0.17' is too low for the diagnostics DataTree (ArviZ 1.x) code #42

Description

@aaronstevenwhite

Summary

The diagnostics and formulas optional-dependency groups pin arviz>=0.17, but quivers.diagnostics is written against the ArviZ 1.x API. The 1.x rewrite replaced the legacy InferenceData with an xarray.DataTree. On any arviz in [0.17, 1.0) the diagnostics code returns/consumes the wrong container type.

Evidence

pyproject.toml:

diagnostics = [ "arviz>=0.17", "xarray>=2025.1", "netcdf4>=1.7" ]
formulas    = [ ..., "arviz>=0.17", "xarray>=2025.1", "netcdf4>=1.7", "formulae>=0.6" ]

src/quivers/diagnostics/arviz_io.py returns xr.DataTree and its docstring states it is "the ArviZ 1.x replacement for the legacy InferenceData container"; comparison.py / predictive_checks.py call az.compare, az.loo, az.loo_pit with the 1.x DataTree contract. On arviz 0.17-0.x, az.from_dict(...) returns InferenceData, not DataTree, and idata.children / DataTree group access does not exist.

Verified working version

The shipped Docker image has arviz 1.2.0, and the full path (to_datatree -> az.loo) works there. The problem is only the declared floor.

Expected

Bump the floor to the first ArviZ release that ships the DataTree API (arviz>=1.0, likely >=1.2), in both the diagnostics and formulas extras.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions