2.0.0b40

ActionPhase

Package: flyte.models

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.

Example: >>> from flyte.models import ActionPhase >>> from flyte.remote import Run >>> >>> # Filter runs by phase >>> runs = Run.listall(in_phase=(ActionPhase.SUCCEEDED, ActionPhase.FAILED)) >>> >>> # Check if a run succeeded >>> run = Run.get(“my-run”) >>> if run.phase == ActionPhase.SUCCEEDED: … print(“Success!”) >>> >>> # Check if phase is terminal >>> if run.phase.is_terminal: … print(“Run completed”)

class ActionPhase(
    args,
    kwds,
)
Parameter Type Description
args *args
kwds