nirs4all.pipeline.trace.execution_trace module

Execution Trace V3 - Records the exact path through pipeline that produced a prediction.

This module provides the core data structures for recording execution traces, which enable deterministic prediction replay and pipeline extraction.

V3 improvements: - OperatorChain tracking for complete execution path - Per-branch and per-source artifact indexing - Support for nested branches and multi-source pipelines - Chain-based artifact lookup for deterministic replay

Key Classes:
  • StepArtifacts: Artifacts produced by a single step with V3 indexes

  • ExecutionStep: Record of a single step’s execution with chain tracking

  • ExecutionTrace: Complete trace of a pipeline execution path

Architecture:

During training, each step execution is recorded in the trace: 1. Step starts -> record step_index, operator info, input chain 2. Step completes -> record artifacts and output chains 3. Model produces prediction -> trace_id is attached to prediction

During prediction, the trace is used to: 1. Identify the minimal set of steps needed 2. Load the correct artifacts for each step via chain lookup 3. Execute only required steps via existing controllers