CodeEntropy.levels.graph.frame_dag module

Frame-local DAG execution.

This module defines the frame-scoped DAG used during the MAP stage of the hierarchy workflow. Each selected frame is processed independently to produce frame-local observable outputs, which are reduced outside this DAG.

FrameGraph owns trajectory positioning. It does not own scheduling, chunking, or reduction.

class CodeEntropy.levels.graph.frame_dag.FrameGraph(universe_operations: Any | None = None)[source]

Bases: object

Execute the frame-local directed acyclic graph.

build() FrameGraph[source]

Build the default frame-local graph topology.

Returns:

The current FrameGraph instance for fluent construction.

execute_frame(shared_data: dict[str, Any], frame_index: int) Any[source]

Execute frame-local nodes for one selected frame.

Parameters:
  • shared_data – Shared workflow data containing frame_source.

  • frame_index – Frame index in the active analysis frame-source space.

Returns:

The frame covariance payload produced by the frame-local covariance node.

Raises:
  • KeyError – If frame_source is missing from shared_data.

  • IndexError – If frame_index is outside the active trajectory bounds.