io#

Read and write DataTree inference data as netCDF or Zarr.

The format of a path follows its suffix: .zarr (or an existing directory) is a Zarr store, anything else is netCDF. save_idata() and load_idata() are the only places that dispatch on the format; ModelIO and the MLflow integration call them.

Functions

check_zarr_writer()

Write a two-value tree with a string coordinate to a temporary Zarr store.

idata_format_from_path(path)

Return the inference-data format implied by path.

idata_from_zarr(store)

Open a Zarr store written by idata_to_zarr() as a lazy DataTree.

idata_to_zarr(idata, store[, groups])

Write a DataTree to a Zarr directory store.

load_idata(path)

Open inference data in the format implied by path.

remove_idata(path)

Delete a netCDF file or a Zarr store.

require_zarr(*[, writing])

Raise ImportError with an install hint when Zarr stores cannot be used.

save_idata(idata, path, *[, groups])

Write idata in the format implied by path.

Classes

IdataFormat(*values)

Inference-data formats save_idata() writes.