flytekit.engines package

Submodules

flytekit.engines.common module

class flytekit.engines.common.BaseExecutionEngineFactory[source]

Bases: object

This object should be implemented to satisfy the basic engine interface.

abstract fetch_launch_plan(launch_plan_id)[source]
Parameters

launch_plan_id (flytekit.models.core.identifier.Identifier) – This identifier should have a resource type of kind LaunchPlan.

Return type

flytekit.models.launch_plan.LaunchPlan

abstract fetch_task(task_id)[source]
Parameters

task_id (flytekit.models.core.identifier.Identifier) – This identifier should have a resource type of kind Task.

Return type

flytekit.models.task.Task

abstract fetch_workflow(workflow_id)[source]
Parameters

workflow_id (flytekit.models.core.identifier.Identifier) – This identifier should have a resource type of kind workflow.

Return type

flytekit.models.admin.workflow.Workflow

abstract fetch_workflow_execution(wf_exec_id)[source]
Parameters

wf_exec_id (flytekit.models.core.identifier.WorkflowExecutionIdentifier) –

Return type

flytekit.models.execution.Execution

abstract get_launch_plan(sdk_launch_plan)[source]
Parameters

sdk_launch_plan (flytekit.common.launch_plan.SdkLaunchPlan) –

Return type

BaseLaunchPlanExecutor

abstract get_node_execution(node_exec)[source]
Parameters

node_exec (flytekit.common.nodes.SdkNodeExecution) –

Return type

BaseNodeExecution

abstract get_task(sdk_task)[source]
Parameters

sdk_task (flytekit.common.tasks.task.SdkTask) –

Return type

BaseTaskExecutor

abstract get_task_execution(task_exec)[source]
Parameters

task_exec (flytekit.common.tasks.executions.SdkTaskExecution) –

Return type

BaseTaskExecution

abstract get_workflow(sdk_workflow)[source]
Parameters

sdk_workflow (flytekit.common.workflow.SdkWorkflow) –

Return type

BaseWorkflowExecutor

abstract get_workflow_execution(wf_exec)[source]
Parameters

wf_exec (flytekit.common.workflow_execution.SdkWorkflowExecution) –

Return type

BaseWorkflowExecution

class flytekit.engines.common.BaseLaunchPlanExecutor(sdk_launch_plan)[source]

Bases: object

abstract execute(project, domain, name, inputs, notification_overrides=None, label_overrides=None, annotation_overrides=None)[source]

Registers the launch plan and returns the identifier. :param Text project: :param Text domain: :param Text name: :param flytekit.models.literals.LiteralMap inputs: The inputs to pass :param list[flytekit.models.common.Notification] notification_overrides: If specified, override the

notifications.

Parameters
Return type

flytekit.models.execution.Execution

abstract register(identifier)[source]

Registers the launch plan :param flytekit.models.core.identifier.Identifier identifier:

property sdk_launch_plan
Return type

flytekit.common.launch_plan.SdkLaunchPlan

abstract update(identifier, state)[source]
Parameters
class flytekit.engines.common.BaseNodeExecution(node_execution)[source]

Bases: object

abstract get_inputs()[source]
Return type

flytekit.models.literals.LiteralMap

abstract get_outputs()[source]
Return type

flytekit.models.literals.LiteralMap

abstract get_subworkflow_executions()[source]
Return type

list[flytekit.common.workflow_execution.SdkWorkflowExecution]

abstract get_task_executions()[source]
Return type

list[flytekit.common.tasks.executions.SdkTaskExecution]

property sdk_node_execution
Return type

flytekit.common.nodes.SdkNodeExecution

abstract sync()[source]
Return type

None

class flytekit.engines.common.BaseTaskExecution(task_exec)[source]

Bases: object

abstract get_child_executions(filters=None)[source]
Parameters

filters (list[flytekit.models.filters.Filter]) –

Return type

dict[Text, flytekit.common.nodes.SdkNodeExecution]

abstract get_inputs()[source]
Return type

flytekit.models.literals.LiteralMap

abstract get_outputs()[source]
Return type

flytekit.models.literals.LiteralMap

property sdk_task_execution
Return type

flytekit.common.tasks.executions.SdkTaskExecution

abstract sync()[source]
Return type

None

class flytekit.engines.common.BaseTaskExecutor(sdk_task)[source]

Bases: object

abstract execute(inputs, context=None)[source]
Parameters

inputs (flytekit.models.literals.LiteralMap) – Inputs to pass to the workflow.

abstract register(identifier)[source]

Registers the task :param flytekit.models.core.identifier.Identifier identifier:

property sdk_task
Return type

flytekit.common.tasks.sdk_runnable.SdkRunnableTask

class flytekit.engines.common.BaseWorkflowExecution(sdk_wf_exec)[source]

Bases: object

This class must be implemented for any engine to track and interact with the executions of workflows.

abstract get_inputs()[source]
Return type

flytekit.models.literals.LiteralMap

abstract get_node_executions(filters=None)[source]
Parameters

filters (list[flytekit.models.filters.Filter]) –

Return type

dict[Text, flytekit.common.nodes.SdkNodeExecution]

abstract get_outputs()[source]
Return type

flytekit.models.literals.LiteralMap

property sdk_workflow_execution
Return type

flytekit.common.workflow_execution.SdkWorkflowExecution

abstract sync()[source]
Return type

None

abstract terminate(cause)[source]
Parameters

cause (Text) –

class flytekit.engines.common.BaseWorkflowExecutor(sdk_workflow)[source]

Bases: object

This class must be implemented for any engine to create, interact with, and execute workflows using the FlyteKit SDK.

abstract register(identifier)[source]

Registers the workflow :param flytekit.models.core.identifier.Identifier identifier:

property sdk_workflow
Return type

flytekit.common.workflow.SdkWorkflow

class flytekit.engines.common.EngineContext(execution_date, tmp_dir, stats, execution_id, logging)[source]

Bases: object

property execution_date
Return type

datetime.datetime

property execution_id
Return type

flytekit.models.core.identifier.WorkflowExecutionIdentifier

property logging
Return type

TODO

property stats
Return type

flytekit.interfaces.stats.taggable.TaggableStats

property working_directory
Return type

flytekit.common.utils.AutoDeletingTempDir

flytekit.engines.loader module

flytekit.engines.loader.get_engine(engine_name=None)[source]
Parameters

engine_name (Text) –

Return type

flytekit.engines.common.BaseExecutionEngineFactory

Module contents