Execution objects#

class flytekit.remote.executions.FlyteWorkflowExecution(type_hints=None, remote=None, *args, **kwargs)#

A class encapsulating a workflow execution being run on a Union remote backend.

Parameters:
  • type_hints (Optional[Dict[str, Type]])

  • remote (Optional['FlyteRemote'])

property error: ExecutionError#

If execution is in progress, raise an exception. Otherwise, return None if no error was present upon reaching completion.

property is_done: bool#

Whether or not the execution is complete.

property node_executions: Dict[str, FlyteNodeExecution]#

Get a dictionary of node executions that are a part of this workflow execution.

property outputs#
Returns:

Returns the outputs LiteralsResolver to the execution

Raises:

FlyteAssertion error if execution is in progress or execution ended in error.

sync(sync_nodes=False)#

Sync the state of the current execution and returns a new object with the updated state.

Parameters:

sync_nodes (bool)

Return type:

FlyteWorkflowExecution

wait(timeout=None, poll_interval=None, sync_nodes=True)#

Wait for the execution to complete. This is a blocking call.

Parameters:
  • timeout (timedelta | int | None) – The maximum amount of time to wait for the execution to complete. It can be a timedelta or a duration in seconds as int.

  • poll_interval (timedelta | int | None) – The amount of time to wait between polling the state of the execution. It can be a timedelta or a duration in seconds as int.

  • sync_nodes (bool) – Whether to sync the state of the nodes as well.

Return type:

FlyteWorkflowExecution

class flytekit.remote.executions.FlyteTaskExecution(*args, **kwargs)#

A class encapsulating a task execution being run on a Union remote backend.

property error: ExecutionError | None#

If execution is in progress, raise an exception. Otherwise, return None if no error was present upon reaching completion.

property is_done: bool#

Whether or not the execution is complete.

class flytekit.remote.executions.FlyteNodeExecution(*args, **kwargs)#

A class encapsulating a node execution being run on a Union remote backend.

property error: ExecutionError#

If execution is in progress, raise an exception. Otherwise, return None if no error was present upon reaching completion.

property interface: flytekit.remote.interface.TypedInterface#

Return the interface of the task or subworkflow associated with this node execution.

property is_done: bool#

Whether or not the execution is complete.

property subworkflow_node_executions: Dict[str, FlyteNodeExecution]#

This returns underlying node executions in instances where the current node execution is a parent node. This happens when it’s either a static or dynamic subworkflow.