nirs4all.pipeline.dagml.raw_replay_lowerer module
Lower an X-only raw cohort into a strict Methods portable replay.
This is deliberately the PREDICT counterpart to raw_training_lowerer.
It does not reconstruct a training graph, reuse the training relation, invent a
target hash, or calculate TCV1 fingerprints in Python. The frozen Package V2
supplies the schema/plan requirements; the current cohort supplies only its
explicit identities, feature bytes and relations; DAG-ML signs the final replay
request.
- class nirs4all.pipeline.dagml.raw_replay_lowerer.RawArrayMethodsPortableRefitReplayCompiler(package: Any, outcome_id: str = 'outcome:nirs4all.raw_refit_predict', run_id: str = 'run:nirs4all.raw_refit_predict', request_id: str = 'replay:nirs4all.raw_refit_predict', dagml_module: str = 'dag_ml', methods_library_path: str | None = None)[source]
Bases:
objectCompile an identity-bound PREDICT request for one Package V3 child.
Package V3 is deliberately not coerced into the V2 predictor shape: it carries a fresh full-refit outcome and Core validates it through its dedicated replay entry point. This lowerer derives only current-cohort envelopes and numeric provider inputs; it never interprets N4MM bytes.
- compile_replay(_estimator: DagMLPipelineEstimator | None, X: Any, *, mode: str, identity_frame: DagMLPredictIdentityFrame) DagMLReplayExecution[source]
Return PREDICT-only native V3 replay inputs for the current cohort.
- exception nirs4all.pipeline.dagml.raw_replay_lowerer.RawArrayMethodsReplayError[source]
Bases:
RuntimeErrorA raw-array Methods replay package cannot be safely lowered.
- nirs4all.pipeline.dagml.raw_replay_lowerer.validate_native_methods_package(package: Any) dict[str, Any][source]
Return a package only when it carries replayable Methods evidence.
Training callers use this at their public boundary so a host-sidecar result cannot masquerade as a native raw pipeline and fail only during prediction or Archive V2 export.
- nirs4all.pipeline.dagml.raw_replay_lowerer.validate_native_methods_refit_package_v3(package: Any) dict[str, Any][source]
Return a Package V3 only after its native raw-refit shape is present.
DAG-ML remains the TCV1 authority. This Python boundary merely validates the narrowly required shape for lowering current, explicitly identified arrays and refuses V2 or host-sidecar substitution before replay.