flytekit.remote.entities.FlyteTask

class flytekit.remote.entities.FlyteTask(id, type, metadata, interface, custom, container=None, task_type_version=0, config=None, should_register=False)[source]

A class encapsulating a remote Flyte task.

Methods

Parameters:
  • task_type_version (int)

  • should_register (bool)

compile(ctx, *args, **kwargs)
Parameters:

ctx (FlyteContext)

construct_node_metadata()

Used when constructing the node that encapsulates this task as part of a broader workflow definition.

Return type:

NodeMetadata

execute(**kwargs)
Return type:

Any

classmethod from_flyte_idl(pb2_object)
Parameters:

pb2_object (flyteidl.admin.tasks_pb2.TaskSpec)

Return type:

TaskSpec

local_execute(ctx, **kwargs)
Parameters:

ctx (FlyteContext)

Return type:

Tuple[Promise] | Promise | VoidPromise | None

local_execution_mode()
Return type:

Mode

classmethod promote_from_model(base_model)[source]
Parameters:

base_model (TaskTemplate)

Return type:

FlyteTask

serialize_to_string()
Return type:

str

short_string()
Return type:

Text

to_flyte_idl()
Return type:

flyteidl.admin.tasks_pb2.TaskSpec

verbose_string()
Return type:

Text

Attributes

config

Arbitrary dictionary containing metadata for parsing and handling custom plugins.

Return type:

dict[Text, T]

container

If not None, the target of execution should be a container.

Return type:

Container

custom

Arbitrary dictionary containing metadata for custom plugins.

Return type:

dict[Text, T]

docs

Description entity for the task

Type:

rtype

entity_type_text
id

This is generated by the system and uniquely identifies the task.

Return type:

flytekit.models.core.identifier.Identifier

interface

The interface definition for this task.

Return type:

flytekit.models.interface.TypedInterface

is_empty
k8s_pod
metadata

This contains information needed at runtime to determine behavior such as whether or not outputs are discoverable, timeouts, and retries.

Return type:

TaskMetadata

name
python_interface
resource_type
security_context
should_register
sql
task_type_version
template

TaskTemplate

Type:

rtype

type

This is used to identify additional extensions for use by Propeller or SDK.

Return type:

Text