nirs4all.pipeline.dagml.methods_replay module
Native Methods N4MM replay callbacks for a loaded DAG-ML package.
This module is deliberately narrow. It is the Python host adapter for an
already-validated, portable n4m_model artifact: DAG-ML owns package,
identity, replay scheduling and output validation; pls4all owns N4MM
import and numerical prediction. It neither decodes model bytes nor
reimplements PLS.
The callback pair matches dag_ml.replay_loaded_predictor_package’s
op_callback / artifact_callback contracts. It supports a target-free
PREDICT task only. FIT/CV/REFIT, host sidecars, transforms and unknown
artifact kinds are intentionally refused rather than routed through legacy
PipelineRunner.
- class nirs4all.pipeline.dagml.methods_replay.MethodsN4mmReplayCallbacks(resolver: FeatureMaterializationResolver, *, target_names_by_node: dict[str, list[str]], fallback: Callable[[dict[str, Any]], dict[str, Any]] | None = None, context_type: type[Any] | None = None, model_type: type[Any] | None = None)[source]
Bases:
objectOwn invocation-local N4MM handles for a Methods-only PREDICT replay.
fallbackis used only for non-model graph nodes (the normal DAG-ML passthrough data nodes). A model without one exact hydrated N4MM handle is always refused.context_typeandmodel_typeare injectable solely for host-contract tests; production resolves them from the officialpls4allbinding lazily.
- exception nirs4all.pipeline.dagml.methods_replay.MethodsPortableReplayError[source]
Bases:
RuntimeErrorA portable Methods replay cannot be executed by this host adapter.