TaskDetails
No overview available.
Attributes
| Attribute | Type | Description |
|---|---|---|
| pb2 | task_definition_pb2.TaskDetails | This attribute stores the protobuf representation of the task details, which is used to access various properties of the task. |
| max_inline_io_bytes | int = 10485760 | This attribute specifies the maximum number of bytes for inline I/O operations, affecting how large data can be passed directly within the task execution context. |
| overriden_queue | Optional[str] = None | This attribute stores an optional string representing the name of the queue to use for task execution, allowing the task to be routed to a specific queue. |
Methods
get()
@classmethod
def get(
name: str,
project: str | None,
domain: str | None,
version: str | None = None,
auto_version: AutoVersioning | None = None
) - > LazyEntity
Get a task by its ID or name. If both are provided, the ID will take precedence. Either version or auto_version are required parameters.
Parameters
| Name | Type | Description |
|---|---|---|
| name | str | The name of the task. |
| project | `str | None` |
| domain | `str | None` |
| version | `str | None` = None |
| auto_version | `AutoVersioning | None` = None |
Returns
| Type | Description |
|---|---|
LazyEntity |
fetch()
@classmethod
def fetch(
name: str,
project: str | None = None,
domain: str | None = None,
version: str | None = None,
auto_version: AutoVersioning | None = None
) - > [TaskDetails](taskdetails.md?sid=flyte_remote__task_taskdetails)
Fetches the TaskDetails for a given task, project, domain, and version, or automatically determines the version. This method is asynchronous and returns the fully resolved TaskDetails object.
Parameters
| Name | Type | Description |
|---|---|---|
| name | str | The name of the task to fetch. |
| project | `str | None` = None |
| domain | `str | None` = None |
| version | `str | None` = None |
| auto_version | `AutoVersioning | None` = None |
Returns
| Type | Description |
|---|---|
[TaskDetails](taskdetails.md?sid=flyte_remote__task_taskdetails) | The fetched TaskDetails object. |
name()
@classmethod
def name() - > str
The name of the task.
Returns
| Type | Description |
|---|---|
str |
version()
@classmethod
def version() - > str
The version of the task.
Returns
| Type | Description |
|---|---|
str |
task_type()
@classmethod
def task_type() - > str
The type of the task.
Returns
| Type | Description |
|---|---|
str |
default_input_args()
@classmethod
def default_input_args() - > Tuple[str, ...]
The default input arguments of the task.
Returns
| Type | Description |
|---|---|
Tuple[str, ...] |
required_args()
@classmethod
def required_args() - > Tuple[str, ...]
The required input arguments of the task.
Returns
| Type | Description |
|---|---|
Tuple[str, ...] |
interface()
@classmethod
def interface() - > [NativeInterface](../../models/nativeinterface.md?sid=flyte_models_nativeinterface)
The interface of the task.
Returns
| Type | Description |
|---|---|
[NativeInterface](../../models/nativeinterface.md?sid=flyte_models_nativeinterface) |
cache()
@classmethod
def cache() - > flyte.Cache
The cache policy of the task.
Returns
| Type | Description |
|---|---|
flyte.Cache |
secrets()
@classmethod
def secrets()
Get the list of secret keys required by the task.
Returns
| Type | Description |
|---|---|
| A list of secret keys (strings) that the task requires for execution. |
resources()
@classmethod
def resources()
Get the resource requests and limits for the task as a tuple (requests, limits).
Returns
| Type | Description |
|---|---|
| A tuple containing the resource requests and limits for the task's container. Returns an empty tuple if no container is defined. |
queue()
@classmethod
def queue() - > Optional[str]
Get the queue name to use for task execution, if overridden.
Returns
| Type | Description |
|---|---|
Optional[str] |
override()
@classmethod
def override(
short_name: Optional[str] = None,
resources: Optional[flyte.Resources] = None,
retries: Union[int, flyte.RetryStrategy] = 0,
timeout: Optional[flyte.TimeoutType] = None,
env_vars: Optional[Dict[str, str]] = None,
secrets: Optional[flyte.SecretRequest] = None,
max_inline_io_bytes: Optional[int] = None,
cache: Optional[flyte.Cache] = None,
queue: Optional[str] = None,
kwargs: Any
) - > [TaskDetails](taskdetails.md?sid=flyte_remote__task_taskdetails)
Create a new TaskDetails with overridden properties.
Parameters
| Name | Type | Description |
|---|---|---|
| short_name | Optional[str] = None | Optional short name for the task. |
| resources | Optional[flyte.Resources] = None | Optional resource requirements. |
| retries | Union[int, flyte.RetryStrategy] = 0 | Number of retries or retry strategy. |
| timeout | Optional[flyte.TimeoutType] = None | Execution timeout. |
| env_vars | Optional[Dict[str, str]] = None | Environment variables to set. |
| secrets | Optional[flyte.SecretRequest] = None | Secret requests for the task. |
| max_inline_io_bytes | Optional[int] = None | Maximum inline I/O size in bytes. |
| cache | Optional[flyte.Cache] = None | Cache configuration. |
| queue | Optional[str] = None | Queue name for task execution. |
| kwargs | Any | Additional keyword arguments. Remote tasks do not support overriding with arbitrary kwargs. |
Returns
| Type | Description |
|---|---|
[TaskDetails](taskdetails.md?sid=flyte_remote__task_taskdetails) | A new TaskDetails instance with the overrides applied. |