nirs4all.pipeline.execution.result module

Result types for pipeline execution.

class nirs4all.pipeline.execution.result.ArtifactMeta(name: str, content_hash: str, path: str, format: str, format_version: str = '', nirs4all_version: str = '', metadata: Dict[str, ~typing.Any]=<factory>)[source]

Bases: object

Metadata about a persisted artifact.

name

Artifact identifier (e.g., ‘model’, ‘scaler’)

Type:

str

content_hash

Content-based hash for deduplication

Type:

str

path

Relative path from artifacts directory

Type:

str

format

Artifact format (e.g., ‘joblib’, ‘h5’, ‘safetensors’)

Type:

str

format_version

Version of the library used (e.g., ‘sklearn==1.3.0’)

Type:

str

nirs4all_version

Version of nirs4all used (e.g., ‘0.4.1’)

Type:

str

metadata

Additional artifact metadata

Type:

Dict[str, Any]

content_hash: str
format: str
format_version: str = ''
metadata: Dict[str, Any]
name: str
nirs4all_version: str = ''
path: str
class nirs4all.pipeline.execution.result.StepOutput(artifacts: Any, str, str | None]]=<factory>, outputs: Any, str, str]]=<factory>, metadata: Dict[str, ~typing.Any]=<factory>)[source]

Bases: object

Standardized output from a controller execution.

artifacts

Internal binaries (models, transformers) to be persisted for reproducibility. List of tuples: (object, name, format_hint).

Type:

List[Tuple[Any, str, str | None]]

outputs

User outputs (charts, reports) to be saved as files. List of tuples: (data_object, filename_hint, type_hint).

Type:

List[Tuple[Any, str, str]]

metadata

Metadata to be added to the context or logs.

Type:

Dict[str, Any]

artifacts: List[Tuple[Any, str, str | None]]
metadata: Dict[str, Any]
outputs: List[Tuple[Any, str, str]]
class nirs4all.pipeline.execution.result.StepResult(updated_context: ExecutionContext, artifacts: List[Any] = <factory>, outputs: List[Any] = <factory>, predictions: Predictions | None = None)[source]

Bases: object

Result of executing a single pipeline step.

updated_context

Updated execution context after step

Type:

nirs4all.pipeline.config.context.ExecutionContext

artifacts

List of artifacts persisted during step execution

Type:

List[Any]

outputs

List of output files saved during step execution

Type:

List[Any]

predictions

Optional predictions generated by this step

Type:

nirs4all.data.predictions.Predictions | None

artifacts: List[Any]
outputs: List[Any]
predictions: Predictions | None = None
updated_context: ExecutionContext