Skip to main content

Flytekit Core Domain Model

This diagram reflects the domain model actually implemented in this repository’s modern flyte SDK. A TaskEnvironment owns registered TaskTemplate objects; each template carries a NativeInterface, execution/configuration fields, and optional code-bundle serialization metadata. NativeInterface.inputs stores (Type, default) pairs while outputs stores named types. Deployment converts those maps into FlyteIDL Variable entries, whose type is a LiteralType. The inspected JSON-schema converter confirms the supported LiteralType variants shown here: simple, collection, map, enum, blob, structured dataset, union, and struct metadata.

The remote lifecycle is modeled separately: Task wraps a task protobuf and TaskDetails exposes its resolved task template; Run owns an Action, ActionDetails exposes action execution state and references cached ActionInputs and ActionOutputs. ActionPhase is the lifecycle enum used by actions and runs, while the runtime conversion layer models an ExecutionError with a recoverable flag.

The requested legacy Workflow, Node, LaunchPlan, flyte.models.literals.LiteralType, flyte.models.core.types.Variable, and flyte.models.execution.Execution classes were not found in this codebase. The repository instead uses TaskEnvironment plus task templates and FlyteIDL2 protobuf messages; therefore those absent classes are intentionally not fabricated as entities. This is a library-level authoring and remote-execution model, not an ORM schema: the exploration found no database entities, migrations, foreign keys, or ORM relationship declarations. The interface/type boundary is closely related to the TypeEngine, and remote action state is exposed through the flyte.remote.

Key Architectural Findings:

  • TaskEnvironment is the authoring container and stores _tasks: Dict[str, TaskTemplate]; there is no Workflow or LaunchPlan class in src.
  • TaskTemplate has a concrete dataclass field named interface: NativeInterface plus task execution configuration such as task_type, resources, retries, timeout, entrypoint, and triggers.
  • NativeInterface has inputs: Dict[str, Tuple[Type, Any]] and outputs: Dict[str, Type]; runtime serialization creates TypedInterface containing input/output VariableMaps.
  • interface_pb2.Variable is constructed with type=TypeEngine.to_literal_type(x), establishing the Variable-to-LiteralType relationship.
  • Run constructs an Action from pb2.action; RunDetails constructs ActionDetails from pb2.action, and action details lazily cache ActionInputs and ActionOutputs.
  • No ORM annotations, ForeignKey declarations, migrations, or database schema definitions were found; relationships are object composition and protobuf message references.
Loading diagram...