Skip to main content

ActionPhase

Represents the execution phase of a Flyte action (run).

Actions progress through different phases during their lifecycle:

  • Queued: Action is waiting to be scheduled
  • Waiting for resources: Action is waiting for compute resources
  • Initializing: Action is being initialized
  • Running: Action is currently executing
  • Succeeded: Action completed successfully
  • Failed: Action failed during execution
  • Aborted: Action was manually aborted
  • Timed out: Action exceeded its timeout limit

This enum can be used for filtering runs and checking execution status.

Attributes

AttributeTypeDescription
QUEUEDAction is waiting to be scheduled.
WAITING_FOR_RESOURCESAction is waiting for compute resources to become available.
INITIALIZINGAction is being initialized and prepared for execution.
RUNNINGAction is currently executing.
SUCCEEDEDAction completed successfully.
FAILEDAction failed during execution.
ABORTEDAction was manually aborted by a user.
TIMED_OUTAction exceeded its timeout limit and was terminated.

Methods


is_terminal()

@classmethod
def is_terminal() - > bool

Check if this phase represents a terminal (final) state. Terminal phases are: SUCCEEDED, FAILED, ABORTED, TIMED_OUT. Once an action reaches a terminal phase, it will not transition to any other phase.

Returns

TypeDescription
boolTrue if this is a terminal phase, False otherwise

to_protobuf_name()

@classmethod
def to_protobuf_name() - > str

Convert to protobuf enum name format.

Returns

TypeDescription
strProtobuf enum name (e.g., "ACTION_PHASE_QUEUED")

to_protobuf_value()

@classmethod
def to_protobuf_value() - > int

Convert to protobuf enum integer value.

Returns

TypeDescription
intProtobuf enum integer value

from_protobuf()

@classmethod
def from_protobuf(
pb_phase: Any
) - > [ActionPhase](actionphase.md?sid=flyte_models_actionphase)

Create ActionPhase from protobuf phase value.

Parameters

NameTypeDescription
pb_phaseAnyProtobuf ActionPhase enum value

Returns

TypeDescription
[ActionPhase](actionphase.md?sid=flyte_models_actionphase)Corresponding ActionPhase enum member