nirs4all.pipeline.dagml.multimodal_contracts module

Input and dependency contracts for captured multimodal Python predictors.

nirs4all.pipeline.dagml.multimodal_contracts.archive_metadata(estimator: Any, *, artifact: dict[str, Any] | None = None) → dict[str, Any][source]

Expose retained input contracts and the original verified REFIT anchor.

nirs4all.pipeline.dagml.multimodal_contracts.bind_dense_concat_input_contract(estimator: Any, source_layout: dict[str, Any]) → None[source]

Retain the original dense source layout with a fitted source projection.

nirs4all.pipeline.dagml.multimodal_contracts.bind_input_contract(estimator: Any, dataset: Any, source_index: int | None = None) → None[source]

Record semantic source contracts alongside fitted host state.

nirs4all.pipeline.dagml.multimodal_contracts.emit_late_partial_refit_origin(task: dict[str, Any], estimator: Any, *, graph_node: dict[str, Any], dataset: Any, fit_sample_ids: list[str], target_names: list[str], source_name: str | None, availability: dict[str, Any], target_decoder: Any = None) → dict[str, Any][source]

Seal one completed native REFIT component, including its exact validity.

nirs4all.pipeline.dagml.multimodal_contracts.generated_input_schema_sha256(schema: dict[str, Any]) → str[source]

Hash the explicit prediction input schema before any model load.

nirs4all.pipeline.dagml.multimodal_contracts.generated_prediction_contract(estimator: Any) → dict[str, Any] | None[source]

Qualify a captured generated-view model for explicit-cohort prediction.

nirs4all.pipeline.dagml.multimodal_contracts.late_partial_archive_contract(manifest: dict[str, Any]) → dict[str, Any] | None[source]

Validate the independent closure and input declaration before joblib.

nirs4all.pipeline.dagml.multimodal_contracts.late_partial_stack_contract(estimator: Any) → dict[str, Any] | None[source]

Compose a closure from verified original component anchors only.

nirs4all.pipeline.dagml.multimodal_contracts.named_archive_artifact(manifest: dict[str, Any]) → dict[str, Any] | None[source]

Read the original native named REFIT anchor, never create a new one.

nirs4all.pipeline.dagml.multimodal_contracts.stacking_source_presence_contract(estimator: Any) → dict[str, Any] | None[source]

Validate fitted source presence separately from authentic predictions.

nirs4all.pipeline.dagml.multimodal_contracts.validate_dependencies(manifest: dict[str, Any]) → None[source]

Diagnose incompatible declared host packages before deserializing state.

nirs4all.pipeline.dagml.multimodal_contracts.validate_input_contract(estimator: Any, dataset: Any) → None[source]

Reject shape, axis, unit or feature-schema drift before prediction.

nirs4all.pipeline.dagml.multimodal_contracts.validate_late_partial_archive_contract(manifest: dict[str, Any], estimator: Any) → dict[str, Any] | None[source]

Link the verified archive declaration to every loaded fitted component.

nirs4all.pipeline.dagml.multimodal_contracts.validate_late_partial_refit_origin(bundle: dict[str, Any], artifact: dict[str, Any] | None = None) → dict[str, Any][source]

Check the original component state and anchor; never reattest it.

nirs4all.pipeline.dagml.multimodal_contracts.validate_late_partial_stack(estimator: Any, expected: dict[str, Any] | None = None) → dict[str, Any] | None[source]

Compare current closure state with its independently retained anchor.

nirs4all.pipeline.dagml.multimodal_contracts.validate_named_archive_contract(manifest: dict[str, Any], model: Any) → dict[str, Any] | None[source]

Bind an independent archive anchor to the fitted object after load.

nirs4all.pipeline.dagml.multimodal_contracts.validate_stacking_archive_contract(manifest: dict[str, Any], estimator: Any) → None[source]

Bind the declared source-presence layout to the verified fitted payload.