jaxdem.utils.h5#
HDF5 save/load utilities (v2).
Design goals (no API changes):
Generic object round-trip for JaxDEM dataclasses and common containers.
Skip callables with a warning (user handles them explicitly, e.g. DP containers).
Robust schema evolution: warn on unknown fields, warn + default missing fields.
Enforce Python types for dataclass fields marked metadata={“static”: True} to keep JAX static hashing happy (e.g. NeighborList.max_neighbors).
This module intentionally does NOT add any top-level file format metadata. It does use minimal per-node tags (e.g. “__kind__”, “__class__”) required to round-trip Python types through HDF5.
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.