nirs4all.pipeline.dagml.conformal_store module

Filesystem store for internal conformal calibration results.

class nirs4all.pipeline.dagml.conformal_store.ConformalStoreManifest(result_fingerprint: str, artifact_fingerprint: str, files: Mapping[str, str], schema_id: str = 'nirs4all.dagml.conformal_store.v1', version: int = 1)[source]

Bases: object

Manifest for a filesystem conformal result store.

artifact_fingerprint: str
files: Mapping[str, str]
property fingerprint: str

TCV1 fingerprint of the manifest summary.

classmethod from_dict(payload: Mapping[str, Any]) → ConformalStoreManifest[source]

Parse a conformal store manifest and verify its fingerprint.

classmethod load_json(path: str | Path) → ConformalStoreManifest[source]

Load and verify a conformal store manifest.

result_fingerprint: str
schema_id: str = 'nirs4all.dagml.conformal_store.v1'
to_dict() → dict[str, Any][source]

Return the deterministic JSON-like manifest form.

version: int = 1
nirs4all.pipeline.dagml.conformal_store.attach_conformal_result_to_bundle(model_bundle_path: str | Path, result: CalibratedRunResult, output_path: str | Path | None = None, *, overwrite: bool = False) → Path[source]

Copy a model .n4a bundle and attach a verified conformal sidecar.

The source bundle is left unchanged unless the caller explicitly passes the same path as output_path; in-place attachment is rejected to avoid corrupting ZIP archives during copy. Existing conformal sidecars are refused unless overwrite=True.

nirs4all.pipeline.dagml.conformal_store.export_conformal_result_bundle(result: CalibratedRunResult, path: str | Path, *, overwrite: bool = False) → Path[source]

Export a calibrated result store as a zipped .n4a archive.

nirs4all.pipeline.dagml.conformal_store.load_conformal_result_archive(path: str | Path) → CalibratedRunResult[source]

Load a conformal sidecar from a conformal-only or full model .n4a archive.

nirs4all.pipeline.dagml.conformal_store.load_conformal_result_bundle(path: str | Path) → CalibratedRunResult[source]

Load and verify a zipped conformal result .n4a archive.

nirs4all.pipeline.dagml.conformal_store.load_conformal_result_store(path: str | Path) → CalibratedRunResult[source]

Load and verify a filesystem conformal result store.

nirs4all.pipeline.dagml.conformal_store.save_conformal_result_store(result: CalibratedRunResult, path: str | Path, *, overwrite: bool = False) → Path[source]

Persist a calibrated result directory with manifest verification data.