caput.memdata#
A backend format for in-memory or on-disk HDF5-like datasets.
It is useful to have a consistent API for data that is independent of whether that
data lives on disk or in memory. h5py provides this to a certain extent,
having h5py.Dataset objects that act very much like numpy arrays.
memdata extends this, providing in-memory containers, analogous to
h5py.Group, h5py.AttributeManager and h5py.Dataset objects.
In addition to these basic classes that copy the h5py API, a higher-level data
container is provided that utilizes these classes along with the h5py to provide
data that is transparently stored either in memory or on disk.
This also allows the creation and use of memdata objects which can hold
data distributed over a number of MPI processes. These MemDatasetDistributed
datasets hold MPIArray objects and can be written to, and
loaded from disk like normal memdata objects. Support for this must be
explicitly enabled in the root group at creation with the distributed=True flag.
Warning
It has been observed that the parallel write of distributed datasets can lock up. This was when using macOS using ompio of OpenMPI 3.0. Switching to romio as the MPI-IO backend helped here, but please report any further issues.
Submodules#
Classes#
In memory implementation of the |
|
Base class for an in memory implementation of |
|
In memory implementation of |
|
Parallel, in-memory implementation of |
|
Group whose data may either be stored on disk or in memory. |
|
In memory implementation of the |
|
Implement the majority of the Group interface. |
|
Mixin represents the identity of an in-memory h5py-like object. |
|
Underlying container that provides storage backing for in-memory groups. |
|
Root level of the storage tree. |
|
Manage a lock file around a file creation operation. |
|
A dict that is read-only to the user. |
Functions#
|
Copy attributes from one attribute-like object to another. |
|
Copy full data tree from one group to another. |
|
Checks if input is a zarr/h5py.File or filename and returns the former. |
|
Check if the object is a Group, which includes File objects. |