nirs4all.pipeline.dagml.terminal_predict_lowerer module

Closed raw-array lowerer for the strict Methods terminal prediction facade.

This module intentionally does not reuse RawArrayDagMLTrainingCompiler. The published DAG-ML terminal facade accepts a smaller contract than the ordinary portable Methods lane: one raw numeric PLS model, an explicit unshuffled KFold, internal ephemeral OOF scoring, one full refit, and an X-only terminal cohort. Keeping that lowering separate makes it impossible for transforms, callbacks, HPO, calibration, group metadata, or retained OOF state to leak into the terminal call by accident.

class nirs4all.pipeline.dagml.terminal_predict_lowerer.StrictMethodsTerminalPredictionExecution(request: Mapping[str, Any], data_envelopes: Mapping[str, Mapping[str, Any]], relations: Mapping[str, Any], training_influence: Mapping[str, Any], methods_inputs: Mapping[str, Any], predict_envelope: Mapping[str, Any], predict_input: Mapping[str, Any], outcome_id: str, run_id: str, bundle_id: str, package_id: str, terminal_node_id: str, terminal_port: str, fit_identity_frame: DagMLFitIdentityFrame, predict_identity_frame: DagMLPredictIdentityFrame, n_features: int)[source]

Bases: object

Fully preflighted inputs for one callback-free terminal facade call.

There is deliberately no op_callback field. The executor transports only the returned contract bundle to dag_ml.execute_methods_cv_refit_terminal_predict.

The identity frames record the canonical input-row order for presentation by explicit sample id. They are local ordering data only: neither they nor any mapping in this object attests a terminal prediction. The native terminal result and its frozen receipt remain the sole authority.

bundle_id: str
data_envelopes: Mapping[str, Mapping[str, Any]]
fit_identity_frame: DagMLFitIdentityFrame
methods_inputs: Mapping[str, Any]
n_features: int
outcome_id: str
package_id: str
predict_envelope: Mapping[str, Any]
predict_identity_frame: DagMLPredictIdentityFrame
predict_input: Mapping[str, Any]
relations: Mapping[str, Any]
request: Mapping[str, Any]
run_id: str
terminal_node_id: str
terminal_port: str
training_influence: Mapping[str, Any]
nirs4all.pipeline.dagml.terminal_predict_lowerer.lower_strict_methods_terminal_prediction(pipeline: list[Any], X: Any, y: Any, *, sample_ids: Sequence[Any], terminal_predict: Mapping[str, Any], seed: int, dagml_module: str = 'dag_ml') → StrictMethodsTerminalPredictionExecution[source]

Lower exactly one raw PLS/KFold terminal prediction request.

Validation and canonical row ordering finish before a Methods runtime can be configured. DAG-ML then remains the authority that validates the signed request, native data inputs, CV/refit, Package V2 and the closed terminal receipt.