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 (flytekit.core.context_manager.FlyteContext) –

construct_node_metadata()#

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

Return type

flytekit.models.core.workflow.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 (flytekit.core.context_manager.FlyteContext) –

Return type

Optional[Union[Tuple[flytekit.core.promise.Promise], flytekit.core.promise.Promise, flytekit.core.promise.VoidPromise]]

classmethod promote_from_model(base_model)[source]#
Parameters

base_model (flytekit.models.task.TaskTemplate) –

Return type

flytekit.remote.entities.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. :rtype: dict[Text, T]

container#

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

custom#

Arbitrary dictionary containing metadata for custom plugins. :rtype: 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. :rtype: flytekit.models.core.identifier.Identifier

interface#

The interface definition for this task. :rtype: 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. :rtype: 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. :rtype: Text