Entities#
- class flytekit.remote.entities.FlyteTask(id, type, metadata, interface, custom, container=None, task_type_version=0, config=None, should_register=False)#
A class encapsulating a remote Flyte task.
- Parameters:
task_type_version (int)
should_register (bool)
- property config#
Arbitrary dictionary containing metadata for parsing and handling custom plugins.
- Return type:
dict[Text, T]
- property container#
If not None, the target of execution should be a container.
- Return type:
Container
- property custom#
Arbitrary dictionary containing metadata for custom plugins.
- Return type:
dict[Text, T]
- property id#
This is generated by the system and uniquely identifies the task.
- Return type:
flytekit.models.core.identifier.Identifier
- property interface#
The interface definition for this task.
- Return type:
flytekit.models.interface.TypedInterface
- property metadata#
This contains information needed at runtime to determine behavior such as whether or not outputs are discoverable, timeouts, and retries.
- Return type:
- property type#
This is used to identify additional extensions for use by Propeller or SDK.
- Return type:
Text
- class flytekit.remote.entities.FlyteWorkflow(id, nodes, interface, output_bindings, metadata, metadata_defaults, subworkflows=None, tasks=None, launch_plans=None, compiled_closure=None, should_register=False)#
A class encapsulating a remote Flyte workflow.
- Parameters:
id (id_models.Identifier)
nodes (List[FlyteNode])
subworkflows (Optional[List[FlyteWorkflow]])
tasks (Optional[List[FlyteTask]])
launch_plans (Optional[Dict[id_models.Identifier, launch_plan_models.LaunchPlanSpec]])
compiled_closure (Optional[compiler_models.CompiledWorkflowClosure])
should_register (bool)
- property failure_node: Node#
Node failure_node: A catch-all node. This node is executed whenever the execution engine determines the workflow has failed. The interface of this node must match the Workflow interface with an additional input named “error” of type pb.lyft.flyte.core.Error.
- property id: Identifier#
This is an autogenerated id by the system. The id is globally unique across Flyte.
- property interface: TypedInterface#
Defines a strongly typed interface for the Workflow (inputs, outputs). This can include some optional parameters.
- property metadata: WorkflowMetadata#
This contains information on how to run the workflow.
- property metadata_defaults: WorkflowMetadataDefaults#
This contains information on how to run the workflow. :rtype: WorkflowMetadataDefaults
- property nodes: List[Node]#
A list of nodes. In addition, “globals” is a special reserved node id that can be used to consume workflow inputs
- property outputs: List[Binding]#
A list of output bindings that specify how to construct workflow outputs. Bindings can pull node outputs or specify literals. All workflow outputs specified in the interface field must be bound in order for the workflow to be validated. A workflow has an implicit dependency on all of its nodes to execute successfully in order to bind final outputs.
- classmethod promote_from_closure(closure, node_launch_plans=None)#
Extracts out the relevant portions of a FlyteWorkflow from a closure from the control plane.
- Parameters:
closure (CompiledWorkflowClosure) – This is the closure returned by Admin
node_launch_plans (Dict[<module 'flytekit.models.core.identifier' from '/opt/buildhome/repo/.venv/lib/python3.11/site-packages/flytekit/models/core/identifier.py'>, LaunchPlanSpec] | None) – The reason this exists is because the compiled closure doesn’t have launch plans. It only has subworkflows and tasks. Why this is unclear. If supplied, this map of launch plans will be
- class flytekit.remote.entities.FlyteLaunchPlan(id, *args, **kwargs)#
A class encapsulating a remote Flyte launch plan.
- property interface: TypedInterface | None#
The interface is not technically part of the admin.LaunchPlanSpec in the IDL, however the workflow ID is, and from the workflow ID, fetch will fill in the interface. This is nice because then you can __call__ the= object and get a node.
- property workflow_id: Identifier#
Unique identifier for the workflow in question :rtype: flytekit.models.core.identifier.Identifier