flytekit.remote.workflow.FlyteWorkflow

class flytekit.remote.workflow.FlyteWorkflow(nodes, interface, output_bindings, id, metadata, metadata_defaults)[source]

A class encapsulating a remote Flyte workflow.

Methods

Parameters

nodes (List[flytekit.remote.nodes.FlyteNode]) –

classmethod from_flyte_idl(pb2_object)
Parameters

pb2_object (flyteidl.core.workflow_pb2.WorkflowTemplate) –

Return type

WorkflowTemplate

classmethod get_non_system_nodes(nodes)[source]
Parameters

nodes (List[flytekit.models.core.workflow.Node]) –

Return type

List[flytekit.models.core.workflow.Node]

get_sub_workflows()[source]
Return type

List[flytekit.remote.workflow.FlyteWorkflow]

classmethod promote_from_model(base_model, sub_workflows=None, node_launch_plans=None, tasks=None)[source]
Parameters
  • base_model (flytekit.models.core.workflow.WorkflowTemplate) –

  • sub_workflows (Optional[Dict[flytekit.remote.identifier.Identifier, flytekit.models.core.workflow.WorkflowTemplate]]) –

  • node_launch_plans (Optional[Dict[flytekit.remote.identifier.Identifier, flytekit.models.admin.launch_plan.LaunchPlanSpec]]) –

  • tasks (Optional[Dict[flytekit.remote.identifier.Identifier, flytekit.models.core.task.TaskTemplate]]) –

Return type

flytekit.remote.workflow.FlyteWorkflow

short_string()
Return type

Text

to_flyte_idl()
Return type

flyteidl.core.workflow_pb2.WorkflowTemplate

verbose_string()
Return type

Text

Attributes

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. :rtype: Node

Type

Node failure_node

flyte_nodes
guessed_python_interface
id

This is an autogenerated id by the system. The id is globally unique across Flyte. :rtype: flytekit.models.core.identifier.Identifier

interface
is_empty
metadata

This contains information on how to run the workflow. :rtype: WorkflowMetadata

metadata_defaults

This contains information on how to run the workflow. :rtype: WorkflowMetadataDefaults

nodes

A list of nodes. In addition, “globals” is a special reserved node id that can be used to consume workflow inputs :rtype: list[Node]

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. :rtype: list[flytekit.models.literals.Binding]

resource_type
upstream_entities