When an InferenceData object is read from a file, xarray will try to lazily load the underlying Dataset objects keeping an open connection to the underlying file in disk. xarray.Dataset provide the close method to release any resources attached to the open dataset, but arviz does not have something like that for InferenceData objects. That makes it quite complicated to actually release resources if one might need to overwrite the contents of the file that was originally read from disk.
Tell us about it
When an
InferenceData
object is read from a file,xarray
will try to lazily load the underlyingDataset
objects keeping an open connection to the underlying file in disk.xarray.Dataset
provide theclose
method to release any resources attached to the open dataset, butarviz
does not have something like that forInferenceData
objects. That makes it quite complicated to actually release resources if one might need to overwrite the contents of the file that was originally read from disk.