DAG Execution
How KyroJudge builds and executes a directed acyclic graph (DAG) from your pipeline steps.
KyroJudge executes evaluation steps as a Directed Acyclic Graph (DAG). Steps without dependencies run in parallel immediately; steps with depends_on wait for their dependencies to complete before starting.
How it works
- Build phase —
DAGBuilderreads all steps and theirdepends_onlists, constructs a dependency graph, and topologically sorts it. - Execution phase —
DAGExecutoruses a priority queue (p-queue) to run ready steps in parallel, respectingmaxConcurrency. - Step execution —
StepExecutorcalls the AI provider with the rendered prompt, parses the response, and marks the step complete.
Example: 3-step parallel pipeline
Execution diagram
Concurrency
By default, KyroJudge runs all independent steps in parallel. If you need to limit provider API calls:
Cycle detection
If your config has circular dependencies, DAGBuilder throws a KyroConfigError at construction time — before any API calls are made:
Failure propagation
When a step fails (returns ERROR):
- Its result is marked
ERRORwith the root cause - Dependent steps are skipped unless an
on_failurefallback is configured - Other independent branches continue executing