noether.data.zarr_store.manifest¶
Manifest schema for the chunked/sharded Zarr CFD store.
The manifest is a small JSON sidecar written next to the per-sample Zarr groups. It records the global column layout (which field lives in which array and at which column offset) once, plus the per-sample chunk grid (point count, chunk size, shard size, number of chunks) for every domain.
The dataloader uses the manifest to:
pick random chunk indices per (sample, domain) without opening every array’s metadata first, and
map the fused value array columns back onto individual named fields.
Classes¶
Layout of a single per-field Zarr array. |
|
Per-field arrays of one domain. |
|
Per-sample chunk grid for one domain. |
|
Manifest entry for a single sample. |
|
Top-level manifest for a converted Zarr store. |
Module Contents¶
- class noether.data.zarr_store.manifest.ArrayLayout(/, **data)¶
Bases:
pydantic.BaseModelLayout of a single per-field Zarr array.
Every field is its own array (
<domain>/<name>) so fields can be read independently. The channel axis is never chunked, and each array is packed into a single whole-array shard, so the per-sample object count stays at one object per field while chunks remain individually range-readable.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class noether.data.zarr_store.manifest.DomainLayout(/, **data)¶
Bases:
pydantic.BaseModelPer-field arrays of one domain.
All arrays of a domain share the point axis, the shuffle permutation and the chunk grid, so chunk
caddresses the same physical points in every field.Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- arrays: dict[str, ArrayLayout]¶
Mapping
canonical_field -> array layout(includes the position array).
- class noether.data.zarr_store.manifest.DomainSample(/, **data)¶
Bases:
pydantic.BaseModelPer-sample chunk grid for one domain.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- class noether.data.zarr_store.manifest.SampleEntry(/, **data)¶
Bases:
pydantic.BaseModelManifest entry for a single sample.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- domains: dict[str, DomainSample]¶
Per-domain chunk grids.
- class noether.data.zarr_store.manifest.StoreManifest(/, **data)¶
Bases:
pydantic.BaseModelTop-level manifest for a converted Zarr store.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- domains: dict[str, DomainLayout]¶
Global column layout, shared by every sample.
- samples: dict[str, SampleEntry] = None¶
Per-sample chunk grids keyed by sample id.
- save(store_root)¶
Write the manifest to
<store_root>/manifest.json(local path or fsspec URL).- Parameters:
store_root (str | pathlib.Path)
- Return type:
- classmethod load(store_root)¶
Load the manifest from
<store_root>/manifest.json(local path or fsspec URL).- Parameters:
store_root (str | pathlib.Path)
- Return type: