Skip to content

Conversation

@aloctavodia
Copy link
Member

Description

This makes the changes to use arviz 1.0. Not all tests are passing yet.

Checklist

  • Checked that the pre-commit linting/style checks pass
  • Included tests that prove the fix is effective or that the new feature works
  • Added necessary documentation (docstrings and/or example notebooks)

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@aloctavodia
Copy link
Member Author

Tests are passing locally, except for test_mcbackend. mcbackend needs to be updated to use DataTree instead of InferenceData.

Copy link
Member

@OriolAbril OriolAbril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't finished to go over all the files, will try to finish soon

dependencies:
# Base dependencies
- arviz>=0.13.0
- arviz>=1.0.0rc0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we need to run the test suite before we make the stable 1.0 release we can add arviz-plots here in the conda section and then this arviz indicator with the release candidate on the pip section. If we use the rc part in the version pin for pip it should automatically take pre-releases into account.

"Covariance": ":mod:`Covariance <pymc.gp.cov>`",
"Mean": ":mod:`Mean <pymc.gp.mean>`",
"InferenceData": ":class:`~arviz.InferenceData`",
"DataTree": ":class:`~xarray.DataTree`",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also something I am unsure about for arviz docs but we might want to keep the alias around for InferenceData and maybe point to the schema page or a page about the schema implementation in python arviz. All "InferenceData" objects are compatible with DataTree but not the other way around so I think there is still value in using "InferenceData" in docs as in addition to saying the python type is xarray.DataTree it also says it will follow the schema (i.e. if a posterior group is present it has a specific meaning, log_likelihood group has that other meaning, fit_info group could also be there but has no convention agreed-on meaning)

Comment on lines 84 to +90
# FIXME: Would be better to drop coordinates altogether, but arviz defaults to `np.arange(var_length)`
return dict_to_dataset(vars_dict, *args, dims=dims, coords=safe_coords, **kwargs)
return dict_to_dataset(
vars_dict, *args, dims=dims, coords=safe_coords, sample_dims=sample_dims, **kwargs
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this fixme is related to arviz-devs/arviz-base#79 in case someone wants to lend a hand.

_zarr_available = False


WARMUP_TAG = "warmup_"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we keep this variable somewhere in arviz-base even if we delete the custom InferenceData class?

Comment on lines -989 to +991
idata.extend(idata_pp)
idata.update(idata_pp)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think update has the opposite behaviour extend used to have. The default in extend was a "left join". That is, whenever a group was present in both inputs the one in idata was kept, ignoring the one in idata_pp. update will take all groups in idata_pp and add them to idata, overwriting already present groups in idata. If this happens for observed_data which will generally be the conflicting one it doesn't matter in most cases but it might be worth to think about how we want things to behave while doing the update.

aloctavodia and others added 3 commits January 7, 2026 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants