flytekit.remote.task.FlyteTask#

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

A class encapsulating a remote Flyte task.

Methods

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.core.tasks_pb2.TaskTemplate) –

Return type

TaskTemplate

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.task.FlyteTask

serialize_to_string()#
Return type

str

short_string()#
Return type

Text

to_flyte_idl()#
Return type

flyteidl.core.tasks_pb2.TaskTemplate

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]

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#
sql#
task_type_version#
type#

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