Skip to main content

ActionDetails

A class representing an action. It is used to manage the run of a task and its state on the remote Union API.

Attributes

  • pb2: run_definition_pb2.ActionDetails
    • The protobuf object for ActionDetails.

Constructors

  • Initializes an ActionDetails object.

  • Parameters

    • pb2: run_definition_pb2.ActionDetails
      • The protobuf object representing the action details.

Methods

def get_details(action_id: identifier_pb2.ActionIdentifier) - > [ActionDetails](src_flyte_remote__action_actiondetails)
  • Get the details of the action. This is a placeholder for getting the action details.

  • Parameters

    • action_id: identifier_pb2.ActionIdentifier
      • Action ID
  • Return Value: ActionDetails

    • ActionDetails
def get(uri: str | None = None, run_name: str | None = None, name: str | None = None) - > [ActionDetails](src_flyte_remote__action_actiondetails)
  • Get a run by its ID or name. If both are provided, the ID will take precedence.

     :param uri: The URI of the action.
    :param name: The name of the action.
    :param run_name: The name of the run.
  • Parameters

    • uri: str | None
      • The URI of the action.
    • run_name: str | None
      • The name of the run.
    • name: str | None
      • The name of the action.
  • Return Value: ActionDetails

    • ActionDetails
def watch(action_id: identifier_pb2.ActionIdentifier) - > AsyncIterator[[ActionDetails](src_flyte_remote__action_actiondetails)]
  • Watch the action for updates. This is a placeholder for watching the action.

  • Parameters

    • action_id: identifier_pb2.ActionIdentifier
      • Action ID
  • Return Value: AsyncIterator[ActionDetails]

    • AsyncIterator[ActionDetails]
def watch_updates(cache_data_on_done: bool = False) - > AsyncGenerator[[ActionDetails](src_flyte_remote__action_actiondetails), None]
  • None

  • Parameters

    • cache_data_on_done: bool
      • None
  • Return Value: AsyncGenerator[ActionDetails, None]

    • AsyncGenerator[ActionDetails, None]
def phase()
  • Get the phase of the action.

  • Return Value: str

    • str
def raw_phase()
  • Get the raw phase of the action.

  • Return Value: run_definition_pb2.Phase

    • run_definition_pb2.Phase
def is_running()
  • Check if the action is currently running.

  • Return Value: bool

    • bool
def name()
  • Get the name of the action.

  • Return Value: str

    • str
def run_name()
  • Get the name of the run.

  • Return Value: str

    • str
def task_name()
  • Get the name of the task.

  • Return Value: str | None

    • str | None
def action_id()
  • Get the action ID.

  • Return Value: identifier_pb2.ActionIdentifier

    • identifier_pb2.ActionIdentifier
def metadata()
  • None

  • Return Value: run_definition_pb2.ActionMetadata

    • run_definition_pb2.ActionMetadata
def status()
  • None

  • Return Value: run_definition_pb2.ActionStatus

    • run_definition_pb2.ActionStatus
def error_info()
  • None

  • Return Value: run_definition_pb2.ErrorInfo | None

    • run_definition_pb2.ErrorInfo | None
def abort_info()
  • None

  • Return Value: run_definition_pb2.AbortInfo | None

    • run_definition_pb2.AbortInfo | None
def runtime()
  • Get the runtime of the action.

  • Return Value: timedelta

    • timedelta
def attempts()
  • Get the number of attempts of the action.

  • Return Value: int

    • int
def logs_available(attempt: int | None = None) - > bool
  • Check if logs are available for the action, optionally for a specific attempt. If attempt is None, it checks for the latest attempt.

  • Parameters

    • attempt: int | None
      • None
  • Return Value: bool

    • bool
def inputs()
  • Placeholder for inputs. This can be extended to handle inputs from the run context.

  • Return Value: ActionInputs

    • ActionInputs
def outputs()
  • Placeholder for outputs. This can be extended to handle outputs from the run context.

  • Return Value: ActionOutputs

    • ActionOutputs
def done()
  • Check if the action is in a terminal state (completed or failed). This is a placeholder for checking the action state.

  • Return Value: bool

    • bool