2.0.0b35

Run

Package: flyte.remote

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

class Run(
    pb2: run_definition_pb2.Run,
    _details: RunDetails | None,
)
Parameter Type Description
pb2 run_definition_pb2.Run
_details RunDetails | None

Methods

Method Description
abort() Aborts / Terminates the run.
details() Get the details of the run.
done() Check if the run is done.
get() Get the current run.
inputs() Get the inputs of the run.
listall() Get all runs for the current project and domain.
outputs() Get the outputs of the run.
show_logs()
sync() Sync the run with the remote server.
to_dict() Convert the object to a JSON-serializable dictionary.
to_json() Convert the object to a JSON string.
wait() Wait for the run to complete, displaying a rich progress panel with status transitions,.
watch() Get the details of the run.

abort()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await <Run instance>.abort.aio().

def abort()

Aborts / Terminates the run.

details()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await <Run instance>.details.aio().

def details()

Get the details of the run. This is a placeholder for getting the run details.

done()

def done()

Check if the run is done.

get()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await Run.get.aio().

def get(
    cls,
    name: str,
) -> Run

Get the current run.

:return: The current run.

Parameter Type Description
cls
name str

inputs()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await <Run instance>.inputs.aio().

def inputs()

Get the inputs of the run. This is a placeholder for getting the run inputs.

listall()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await Run.listall.aio().

def listall(
    cls,
    in_phase: Tuple[Phase] | None,
    task_name: str | None,
    task_version: str | None,
    created_by_subject: str | None,
    sort_by: Tuple[str, Literal['asc', 'desc']] | None,
    limit: int,
) -> AsyncIterator[Run]

Get all runs for the current project and domain.

Parameter Type Description
cls
in_phase Tuple[Phase] | None Filter runs by one or more phases.
task_name str | None Filter runs by task name.
task_version str | None Filter runs by task version.
created_by_subject str | None Filter runs by the subject that created them. (this is not username, but the subject)
sort_by Tuple[str, Literal['asc', 'desc']] | None The sorting criteria for the project list, in the format (field, order).
limit int The maximum number of runs to return. :return: An iterator of runs.

outputs()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await <Run instance>.outputs.aio().

def outputs()

Get the outputs of the run. This is a placeholder for getting the run outputs.

show_logs()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await <Run instance>.show_logs.aio().

def show_logs(
    attempt: int | None,
    max_lines: int,
    show_ts: bool,
    raw: bool,
    filter_system: bool,
)
Parameter Type Description
attempt int | None
max_lines int
show_ts bool
raw bool
filter_system bool

sync()

def sync()

Sync the run with the remote server. This is a placeholder for syncing the run.

to_dict()

def to_dict()

Convert the object to a JSON-serializable dictionary.

Returns: dict: A dictionary representation of the object.

to_json()

def to_json()

Convert the object to a JSON string.

Returns: str: A JSON string representation of the object.

wait()

This method can be called both synchronously or asynchronously.

Default invocation is sync and will block. To call it asynchronously, use the function .aio() on the method name itself, e.g.,: result = await <Run instance>.wait.aio().

def wait(
    quiet: bool,
    wait_for: Literal['terminal', 'running'],
)

Wait for the run to complete, displaying a rich progress panel with status transitions, time elapsed, and error details in case of failure.

Parameter Type Description
quiet bool
wait_for Literal['terminal', 'running']

watch()

def watch(
    cache_data_on_done: bool,
) -> AsyncGenerator[ActionDetails, None]

Get the details of the run. This is a placeholder for getting the run details.

Parameter Type Description
cache_data_on_done bool

Properties

Property Type Description
name None Get the name of the run.
phase None Get the phase of the run.
raw_phase None Get the raw phase of the run.
url None Get the URL of the run.