CodeEntropy.levels.execution.scheduler module¶
Serial and Dask schedulers for frame-chunk map-reduce execution.
- class CodeEntropy.levels.execution.scheduler.FrameScheduler(*, frame_dag: FrameGraph, policy: ExecutionPolicy, universe_operations: Any | None = None)[source]¶
Bases:
objectExecute frame-local MAP work serially or through Dask.
Dask futures may complete in any order, but completed chunks are reduced by chunk index. This keeps parent-side floating-point reductions deterministic.
- execute(shared_data: dict[str, Any], *, frame_indices: list[int], progress: _RichProgressSink | None = None) None[source]¶
Execute frame-local MAP work and reduce outputs.
- Parameters:
shared_data – Shared workflow data containing serial or Dask execution inputs.
frame_indices – Ordered selected frame indices to execute.
progress – Optional progress sink used for reporting frame-stage progress.
- Raises:
RuntimeError – If Dask execution is requested but unavailable or incomplete.