nirs4all.pipeline.storage.target_domain_summary module

Store-v5 provenance for native fold-local target summaries.

These functions copy owner-produced context/scalars. They never pool predictions or calculate metrics across fitted target domains.

exception nirs4all.pipeline.storage.target_domain_summary.TargetDomainComparisonError[source]

Bases: ValueError

Stored results cannot be compared across captured target domains.

nirs4all.pipeline.storage.target_domain_summary.chain_contexts(connection: Connection, chain_ids: list[str]) → dict[str, dict[str, Any] | None][source]

Validate macro provenance before any ranking or summary reconstruction.

nirs4all.pipeline.storage.target_domain_summary.copy_macro_summary(connection: Connection, chain_id: str) → None[source]

Copy the native score-only report, with exact JSON and no averaging.

nirs4all.pipeline.storage.target_domain_summary.merge_contexts(summary: dict[str, Any], incoming: dict[str, Any]) → dict[str, Any][source]

Merge chain-keyed metadata without dropping another pipeline’s context.

nirs4all.pipeline.storage.target_domain_summary.validate_comparison(contexts: dict[str, dict[str, Any] | None]) → None[source]

Require the exact SDK context for every candidate before ORDER/LIMIT.