pymc.backends.zarr.ZarrTrace.to_inferencedata#

ZarrTrace.to_inferencedata(save_warmup=False, eager=False)[source]#

Convert ZarrTrace to DataTree with arviz attributes.

This converts all the groups in the ZarrTrace.root hierarchy into an DataTree object with the arviz inference library attributes applied. The only exception is that _sampling_state is excluded.

Parameters:
save_warmupbool

If True, all of the warmup groups are stored in the inference data object.

eagerbool

If True, all of the data is loaded into memory. If False, the data is lazily loaded when accessed.

Notes

xarray and in turn arviz require the zarr groups to have consolidated metadata. See to_datatree() for more details.