RunDetails
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.
Parameters
class RunDetails(
pb2: run_definition_pb2.RunDetails,
_preserve_original_types: bool,
)| Parameter | Type | Description |
|---|---|---|
pb2 |
run_definition_pb2.RunDetails |
|
_preserve_original_types |
bool |
Properties
| Property | Type | Description |
|---|---|---|
action_id |
identifier_pb2.ActionIdentifier |
Get the action ID. |
name |
str |
Get the name of the action. |
task_name |
str | None |
Get the name of the task. |
Methods
| Method | Description |
|---|---|
done() |
Check if the run is in a terminal state (completed or failed). |
get() |
Get a run by its ID or name. |
get_details() |
Get the details of the run. |
input_literals() |
Raw input literals without reconstructing types. |
inputs() |
Placeholder for inputs. |
output_literals() |
Raw output literals without reconstructing types. |
outputs() |
Placeholder for outputs. |
to_dict() |
Convert the object to a JSON-serializable dictionary. |
to_json() |
Convert the object to a JSON string. |
typed_inputs() |
Re-hydrate requested inputs into caller-supplied types. |
typed_outputs() |
Re-hydrate requested outputs into caller-supplied types. |
done()
def done()Check if the run is in a terminal state (completed or failed). This is a placeholder for checking the run state.
get()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await RunDetails.get.aio().
def get(
cls,
name: str | None,
) -> RunDetailsGet a run by its ID or name. If both are provided, the ID will take precedence.
| Parameter | Type | Description |
|---|---|---|
cls |
||
name |
str | None |
The name of the run. |
get_details()
Default invocation is sync and will block.
To call it asynchronously, use the function .aio() on the method name itself, e.g.,:
result = await RunDetails.get_details.aio().
def get_details(
cls,
run_id: identifier_pb2.RunIdentifier,
) -> RunDetailsGet the details of the run. This is a placeholder for getting the run details.
| Parameter | Type | Description |
|---|---|---|
cls |
||
run_id |
identifier_pb2.RunIdentifier |
input_literals()
def input_literals()Raw input literals without reconstructing types. See :meth:ActionDetails.input_literals.
inputs()
def inputs()Placeholder for inputs. This can be extended to handle inputs from the run context.
output_literals()
def output_literals()Raw output literals without reconstructing types. See :meth:ActionDetails.output_literals.
outputs()
def outputs()Placeholder for outputs. This can be extended to handle outputs from the run context.
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.
typed_inputs()
def typed_inputs(
types: Dict[str, type],
deserializers: Dict[type, Callable[[Any], Any]] | None,
) -> Dict[str, Any]Re-hydrate requested inputs into caller-supplied types. See :meth:ActionDetails.typed_inputs.
| Parameter | Type | Description |
|---|---|---|
types |
Dict[str, type] |
|
deserializers |
Dict[type, Callable[[Any], Any]] | None |
typed_outputs()
def typed_outputs(
types: Dict[str, type],
deserializers: Dict[type, Callable[[Any], Any]] | None,
) -> Dict[str, Any]Re-hydrate requested outputs into caller-supplied types. See :meth:ActionDetails.typed_outputs.
| Parameter | Type | Description |
|---|---|---|
types |
Dict[str, type] |
|
deserializers |
Dict[type, Callable[[Any], Any]] | None |