flytekit.remote.entities.FlyteWorkflow#
- 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)[source]#
A class encapsulating a remote Flyte workflow.
Methods
- 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)
- compile(ctx, *args, **kwargs)#
- Parameters:
ctx (FlyteContext)
- construct_node_metadata()#
Used when constructing the node that encapsulates this task as part of a broader workflow definition.
- Return type:
NodeMetadata
- classmethod from_flyte_idl(pb2_object)#
- Parameters:
pb2_object – flyteidl.admin.workflow_pb2.WorkflowSpec
- Return type:
WorkflowSpec
- local_execute(ctx, **kwargs)#
- Parameters:
ctx (FlyteContext)
- Return type:
- classmethod promote_from_closure(closure, node_launch_plans=None)[source]#
Extracts out the relevant portions of a FlyteWorkflow from a closure from the control plane.
- Parameters:
closure (compiler_models.CompiledWorkflowClosure) – This is the closure returned by Admin
node_launch_plans (Optional[Dict[id_models, launch_plan_models.LaunchPlanSpec]]) – 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
- classmethod promote_from_model(base_model, sub_workflows=None, tasks=None, node_launch_plans=None)[source]#
- Parameters:
- Return type:
- short_string()#
- Return type:
Text
- to_flyte_idl()#
- Return type:
flyteidl.admin.workflow_pb2.WorkflowSpec
- verbose_string()#
- Return type:
Text
Attributes
- docs
Description entity for the workflow
- Type:
rtype
- entity_type_text
- 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.
- Type:
Node failure_node
- flyte_nodes
- flyte_sub_workflows
- flyte_tasks
- id
This is an autogenerated id by the system. The id is globally unique across Flyte.
- interface
Defines a strongly typed interface for the Workflow (inputs, outputs). This can include some optional parameters.
- is_empty
- metadata
This contains information on how to run the workflow.
- metadata_defaults
This contains information on how to run the workflow. :rtype: WorkflowMetadataDefaults
- name
- nodes
A list of nodes. In addition, “globals” is a special reserved node id that can be used to consume workflow inputs
- outputs
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.
- python_interface
- resource_type
- should_register
- sub_workflows
list[flytekit.models.core.workflow.WorkflowTemplate]
- Type:
rtype
- template
flytekit.models.core.workflow.WorkflowTemplate
- Type:
rtype