jaxdem.utils.h5#
HDF5 save/load utilities using the shared JaxDEM schema.
Design goals (no API changes):
Generic object round-trip for JaxDEM dataclasses and common containers.
Store importable callables by validated identity; loading is trusted input.
Schema evolution: warn on unknown fields, warn and use defaults for missing fields.
Enforce Python types for dataclass fields marked metadata={“static”: True} to keep JAX static hashing happy (e.g. NeighborList.max_neighbors).
Schema-3 files carry a shared top-level manifest. Unversioned files remain
readable through the schema-1 legacy path. Per-node tags (e.g. __kind__ and
__class__) preserve Python types inside the explicit payload envelope.
Functions
|
Load an object saved with |
|
- jaxdem.utils.h5.load(path: str, *, warn_missing: bool = True, warn_unknown: bool = True, state_shape: tuple[int, ...] | None = None) Any[source]#
Load an object saved with
save().state_shapeis an optional(N, dim)hint used to bootstrap aSystemskeleton when the file does not contain the datasets needed to infer it.