Executions¶
Warning
This article covers internal technical details of Flow executions. The implementation of a Flow may change at any time without warning.
Overview¶
Laminar Flow executions are coordinated across two different actors:
Actor |
Description |
|---|---|
Scheduler |
Compiles the DAG, excecutes layers in a specific order, and polls for completion. |
Executor |
Executes a single |
Anatomy¶
The following is a rough outline of the call structure of a Flow execution.
Scheduler
Flow.__call__Flow.scheduleis called and the first set of runnable tasks are identifiedFor each
Layer, the entry hook is invoked.The number of splits for each
Layeris determined.For each
Layersplit, the submission hook is invoked.For each
Layersplit, theLayeris submitted to the executor it is being run on (thread, docker, batch, etc.)
Executor
Flow.__call__Flow.executeis called and theLayeris prepared for execution.The parameters for
Layer.__call__are prepared.The execution hook is invoked.
Layer.__call__Layerartifacts are written to theDatastore.
Scheduler
The
Layeris waited on for completion.If the
Layerfails, the retry hook is invoked and theLayerretries.The layer’s
Recordis written to theDataStore.The
Layeris marked as complete by the scheduler.New runnable layers are identified and scheduled.