pymc.backends.zarr.ZarrTrace.to_inferencedata — PyMC 5.22.0 documentation (original) (raw)
ZarrTrace.to_inferencedata(save_warmup=False)[source]#
Convert ZarrTrace
to InferenceData.
This converts all the groups in the ZarrTrace.root
hierarchy into anInferenceData
object. 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.
Notes
xarray
and in turn arviz
require the zarr groups to have consolidated metadata. To achieve this, a new consolidated store is constructed by callingzarr.consolidate_metadata() on the root’s store. This means that the returned InferenceData
object will operate on a different storage unit than the calling ZarrTrace
, so future changes to the ZarrTrace
won’t be automatically reflected in the returned InferenceData
object.