nirs4all.controllers.controller module
Base class for pipeline operator controllers.
- class nirs4all.controllers.controller.OperatorController[source]
Bases:
ABCBase class for pipeline operators.
- abstractmethod execute(step_info: ParsedStep, dataset: SpectroDataset, context: ExecutionContext, runtime_context: RuntimeContext, source: int = -1, mode: str = 'train', loaded_binaries: List[Tuple[str, Any]] | None = None, prediction_store: Any | None = None) Tuple[ExecutionContext, Any][source]
Run the operator with the given parameters and context.
- Parameters:
step_info – Parsed step containing operator, keyword, and metadata
dataset – Dataset to operate on
context – Pipeline execution context
runtime_context – Runtime infrastructure context
source – Data source index
mode – Execution mode (“train” or “predict”)
loaded_binaries – Pre-loaded binary objects for prediction mode
prediction_store – External prediction store for model predictions
- Returns:
Tuple of (updated_context, StepOutput)
- abstractmethod classmethod matches(step: Any, operator: Any, keyword: str) bool[source]
Check if the operator matches the step and keyword.