nirs4all.pipeline.execution.fitted module

Captured Python-host fitted dependency graphs; replay never fits or opens a workspace.

class nirs4all.pipeline.execution.fitted.FittedNode(operation: str, inputs: tuple[FittedNode, ...] = (), state: Any = None, artifact_id: str = '', target_transformer: Any = None, target_processing: str = 'numeric', input_dtype: Any = None)[source]

Bases: object

One immutable dependency in the actual fitted raw-input execution graph.

__deepcopy__(memo: dict[int, Any]) → FittedNode[source]

Contexts may share already captured, read-only fitted dependencies.

artifact_id: str = ''
evaluate(X: ndarray, cache: dict[int, ndarray]) → ndarray[source]

Evaluate this dependency using only its captured owner states.

input_dtype: Any = None
inputs: tuple[FittedNode, ...] = ()
operation: str
state: Any = None
target_processing: str = 'numeric'
target_transformer: Any = None
class nirs4all.pipeline.execution.fitted.FittedPredictor(root: FittedNode, training_steps: list[Any] | None = None)[source]

Bases: object

Self-contained Python-host predictor over an actually captured fitted graph.

property class_labels_: ndarray

Decode that numeric vocabulary with the captured original target codec.

property classes_: ndarray

Expose the exact fitted final classifier column vocabulary.

fit(X: Any, y: Any = None) → None[source]

Refuse refitting a captured predictor; replay its original training recipe.

predict(X: ndarray) → ndarray[source]

Predict raw rows without fitting, selecting models, or reading a workspace.

predict_proba(X: ndarray) → ndarray[source]

Keep the fitted final classifier’s probability columns and vocabulary.

profile: str = 'nirs4all.python.fitted_predictor.v1'
root: FittedNode
training_steps: list[Any] | None = None
nirs4all.pipeline.execution.fitted.capture_fitted_step(step: Any, dataset: Any, before: Any, after: Any, runtime: Any, predictions: Any, output: Any, input_node: FittedNode, replay: PreprocessingReplay | None, *, is_model: bool, is_meta: bool) → None[source]

Capture the actual fitted controller output, without changing its computation.

nirs4all.pipeline.execution.fitted.is_sequential_meta_pipeline(steps: list[Any]) → bool[source]

Identify the declared sequential MetaModel profile without admitting branches.

nirs4all.pipeline.execution.fitted.is_source_concat_pipeline(steps: list[Any]) → bool[source]

Identify one declared by-source feature concat with its exact source graph.

nirs4all.pipeline.execution.fitted.prepare_fitted_input(dataset: Any, context: Any, runtime: Any) → FittedNode | None[source]

Start the explicitly captured CV or refit inference dependency graph.

nirs4all.pipeline.execution.fitted.prepare_sequential_fitted_capture(steps: list[Any], runtime: Any) → bool[source]

Start a pipeline-local inference capture, independently of CV fitting.