-
Notifications
You must be signed in to change notification settings - Fork 245
/
__init__.py
98 lines (72 loc) · 2.28 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
"""
=====================
Remote Access
=====================
.. currentmodule:: flytekit.remote
This module provides utilities for performing operations on tasks, workflows, launchplans, and executions, for example,
the following code fetches and executes a workflow:
.. code-block:: python
# create a remote object from flyte config and environment variables
FlyteRemote(config=Config.auto())
FlyteRemote(config=Config.auto(config_file=....))
FlyteRemote(config=Config(....))
# Or if you need to specify a custom cert chain
# (options and compression are also respected keyword arguments)
FlyteRemote(private_key=your_private_key_bytes, root_certificates=..., certificate_chain=...)
# fetch a workflow from the flyte backend
flyte_workflow = remote.fetch_workflow(name="my_workflow", version="v1")
# execute the workflow, wait=True will return the execution object after it's completed
workflow_execution = remote.execute(flyte_workflow, inputs={"a": 1, "b": 10}, wait=True)
# inspect the execution's outputs
print(workflow_execution.outputs)
.. _remote-entrypoint:
Entrypoint
==========
.. autosummary::
:template: custom.rst
:toctree: generated/
:nosignatures:
~remote.FlyteRemote
~remote.Options
.. _remote-flyte-entities:
Entities
========
.. autosummary::
:template: custom.rst
:toctree: generated/
:nosignatures:
~task.FlyteTask
~workflow.FlyteWorkflow
~launch_plan.FlyteLaunchPlan
.. _remote-flyte-entity-components:
Entity Components
=================
.. autosummary::
:template: custom.rst
:toctree: generated/
:nosignatures:
~nodes.FlyteNode
~component_nodes.FlyteTaskNode
~component_nodes.FlyteWorkflowNode
.. _remote-flyte-execution-objects:
Execution Objects
=================
.. autosummary::
:template: custom.rst
:toctree: generated/
:nosignatures:
~executions.FlyteWorkflowExecution
~executions.FlyteTaskExecution
~executions.FlyteNodeExecution
"""
from flytekit.remote.entities import (
FlyteBranchNode,
FlyteLaunchPlan,
FlyteNode,
FlyteTask,
FlyteTaskNode,
FlyteWorkflow,
FlyteWorkflowNode,
)
from flytekit.remote.executions import FlyteNodeExecution, FlyteTaskExecution, FlyteWorkflowExecution
from flytekit.remote.remote import FlyteRemote