Flyte Domain Entity Model
The Flyte Domain Entity Model diagram represents the core objects used within the Flyte SDK to define and execute tasks and workflows.
Key findings from the codebase:
- Task Definition: Tasks are defined using
TaskTemplate(SDK-side) which contains theNativeInterface(Python types), resources, and retry strategies. - Interfaces: The SDK uses
NativeInterfaceto represent Python-level type hints, which are then converted to the IDL-levelTypedInterface. ATypedInterfaceconsists ofVariableobjects, each mapping a name to aLiteralType. - Execution Model: In this version of the SDK (using
flyteidl2), "Workflows" are implemented as "Pure Python Workflows" where a task can call other tasks. The execution is represented by aRun, which contains a rootAction. Actions can be nested, representing the call graph of the execution. - Triggers: Automation and scheduling (traditionally
LaunchPlanin Flyte) are handled viaTriggerentities, which associate a task with anAutomationSpec(e.g., Cron or FixedRate). - Data Model: Data is passed between tasks as
Literalobjects, which can be scalars, collections, or maps.
The diagram shows the relationships between these entities, highlighting how SDK-side definitions (TaskTemplate) relate to remote execution objects (Run, Action) and the underlying IDL types (TypedInterface, Variable, Literal).
Key Architectural Findings:
- Tasks are defined by
TaskTemplatewhich holds aNativeInterfacefor Python-level type information. NativeInterfaceis serialized into the IDL-levelTypedInterface, which containsVariabledefinitions.- Executions are tracked via
RunandActionentities;Actionsupports nesting to represent complex task call sequences. Triggerentities manage task automation, replacing or augmenting the traditionalLaunchPlanconcept.- Data exchange is performed using
Literalobjects, which encapsulate various data types including scalars and collections.
Loading diagram...