flytekit.TaskMetadata#
- class flytekit.TaskMetadata(cache=False, cache_serialize=False, cache_version='', cache_ignore_input_vars=(), interruptible=None, deprecated='', retries=0, timeout=None, pod_template_name=None, generates_deck=False, is_eager=False)[source]#
Metadata for a Task. Things like retries and whether or not caching is turned on, and cache version are specified here.
See the IDL for the protobuf definition.
- Parameters:
- cache_serialize#
Indicates if identical (i.e. same inputs) instances of this task should be executed in serial when caching is enabled. See Caching.
- Type:
- cache_ignore_input_vars#
Input variables that should not be included when calculating hash for cache.
- Type:
Tuple[str, …]
- interruptible#
Indicates that this task can be interrupted and/or scheduled on nodes with lower QoS guarantees that can include pre-emption.
- Type:
Optional[bool]
- deprecated#
Can be used to provide a warning message for a deprecated task. An absence or empty string indicates that the task is active and not deprecated.
- Type:
- retries#
for retries=n; n > 0, on failures of this task, the task will be retried at-least n number of times.
- Type:
- timeout#
The maximum duration for which one execution of this task should run. The execution will be terminated if the runtime exceeds this timeout.
- Type:
Optional[Union[datetime.timedelta, int]]
- pod_template_name#
The name of an existing PodTemplate resource in the cluster which will be used for this task.
- Type:
Optional[str]
Methods
Attributes
- cache: bool = False
- cache_serialize: bool = False
- cache_version: str = ''
- deprecated: str = ''
- generates_deck: bool = False
- is_eager: bool = False
- retries: int = 0
- retry_strategy