flyte 0.2.0b12__py3-none-any.whl → 0.2.0b14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of flyte might be problematic. Click here for more details.
- flyte/__init__.py +5 -0
- flyte/_excepthook.py +37 -0
- flyte/_internal/controllers/remote/_action.py +5 -0
- flyte/_internal/controllers/remote/_controller.py +43 -3
- flyte/_internal/controllers/remote/_core.py +7 -0
- flyte/_internal/runtime/convert.py +61 -7
- flyte/_internal/runtime/task_serde.py +1 -1
- flyte/_protos/workflow/queue_service_pb2.py +30 -29
- flyte/_protos/workflow/queue_service_pb2.pyi +5 -2
- flyte/_protos/workflow/state_service_pb2.py +36 -28
- flyte/_protos/workflow/state_service_pb2.pyi +19 -15
- flyte/_protos/workflow/state_service_pb2_grpc.py +28 -28
- flyte/_run.py +6 -0
- flyte/_version.py +2 -2
- flyte/cli/_common.py +2 -2
- flyte/cli/_delete.py +1 -1
- flyte/cli/_deploy.py +1 -1
- flyte/cli/_get.py +2 -2
- flyte/cli/_run.py +1 -4
- flyte/cli/main.py +19 -18
- flyte/remote/_client/auth/_channel.py +6 -0
- flyte/remote/_data.py +3 -1
- flyte/syncify/_api.py +103 -35
- flyte/types/_type_engine.py +83 -9
- flyte-0.2.0b14.dist-info/METADATA +249 -0
- {flyte-0.2.0b12.dist-info → flyte-0.2.0b14.dist-info}/RECORD +29 -28
- flyte-0.2.0b12.dist-info/METADATA +0 -181
- {flyte-0.2.0b12.dist-info → flyte-0.2.0b14.dist-info}/WHEEL +0 -0
- {flyte-0.2.0b12.dist-info → flyte-0.2.0b14.dist-info}/entry_points.txt +0 -0
- {flyte-0.2.0b12.dist-info → flyte-0.2.0b14.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: flyte
|
|
3
|
+
Version: 0.2.0b14
|
|
4
|
+
Summary: Add your description here
|
|
5
|
+
Author-email: Ketan Umare <kumare3@users.noreply.github.com>
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: aiofiles>=24.1.0
|
|
9
|
+
Requires-Dist: click>=8.2.1
|
|
10
|
+
Requires-Dist: flyteidl==1.15.4b0
|
|
11
|
+
Requires-Dist: cloudpickle>=3.1.1
|
|
12
|
+
Requires-Dist: fsspec>=2025.3.0
|
|
13
|
+
Requires-Dist: grpcio>=1.71.0
|
|
14
|
+
Requires-Dist: obstore>=0.6.0
|
|
15
|
+
Requires-Dist: protobuf>=6.30.1
|
|
16
|
+
Requires-Dist: pydantic>=2.10.6
|
|
17
|
+
Requires-Dist: pyyaml>=6.0.2
|
|
18
|
+
Requires-Dist: rich-click>=1.8.9
|
|
19
|
+
Requires-Dist: httpx>=0.28.1
|
|
20
|
+
Requires-Dist: keyring>=25.6.0
|
|
21
|
+
Requires-Dist: msgpack>=1.1.0
|
|
22
|
+
Requires-Dist: toml>=0.10.2
|
|
23
|
+
Requires-Dist: async-lru>=2.0.5
|
|
24
|
+
Requires-Dist: mashumaro
|
|
25
|
+
Requires-Dist: dataclasses_json
|
|
26
|
+
|
|
27
|
+
# Flyte v2 SDK
|
|
28
|
+
|
|
29
|
+
The next-generation SDK for Flyte.
|
|
30
|
+
|
|
31
|
+
[](https://github.com/unionai/unionv2/actions/workflows/publish.yml)
|
|
32
|
+
|
|
33
|
+
## Quick start
|
|
34
|
+
|
|
35
|
+
1. Run `uv venv`, and `source .venv/bin/activate` to create a new virtual environment.
|
|
36
|
+
2. Install the latest version of the SDK by running the following:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
uv pip install --no-cache --prerelease=allow --upgrade flyte
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
4. Create the config and point it to your cluster by running the following:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
flyte create config --endpoint <your-endpoint-url> --project <your-project> --domain <your-domain>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This will create a `config.yaml` file in the current directory which will be referenced ahead of any other `config.yaml`s found in your system.
|
|
49
|
+
|
|
50
|
+
5. Now you can run code with the CLI:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
flyte run <path-to-your-script> <task-name>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Hello World Example
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
# hello_world.py
|
|
60
|
+
|
|
61
|
+
import flyte
|
|
62
|
+
|
|
63
|
+
env = flyte.TaskEnvironment(name="hello_world")
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
@env.task
|
|
67
|
+
async def say_hello(data: str) -> str:
|
|
68
|
+
return f"Hello {data}"
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@env.task
|
|
72
|
+
async def say_hello_nested(data: str) -> str:
|
|
73
|
+
return await say_hello.override(resources=flyte.Resources(gpu="A100 80G:4")).execute(data)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
if __name__ == "__main__":
|
|
77
|
+
import asyncio
|
|
78
|
+
|
|
79
|
+
# to run pure python - the SDK is not invoked at all
|
|
80
|
+
asyncio.run(say_hello_nested("test"))
|
|
81
|
+
|
|
82
|
+
# To run locally, but run through type system etc
|
|
83
|
+
flyte.init()
|
|
84
|
+
flyte.run(say_hello_nested, "World")
|
|
85
|
+
|
|
86
|
+
# To run remote
|
|
87
|
+
flyte.init(endpoint="dns:///localhost:8090", insecure=True)
|
|
88
|
+
flyte.run(say_hello_nested, "World")
|
|
89
|
+
# It is possible to switch local and remote, but keeping init to have and endpoint, but , changing context during run
|
|
90
|
+
flyte.with_runcontext(mode="local").run(...) # this will run locally only
|
|
91
|
+
|
|
92
|
+
# To run remote with a config
|
|
93
|
+
flyte.init_from_config("config.yaml")
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## CLI
|
|
97
|
+
|
|
98
|
+
All commands can be run from any root directory.
|
|
99
|
+
For examples, it is not needed to have `__init__.py` in the directory.
|
|
100
|
+
If you run from a directory, the code will automatically package and upload all modules that are imported.
|
|
101
|
+
You can change the behavior by using `--copy-style` flag.
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
flyte run hello_world.py say_hello --data "World"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
To follow the logs for the `a0` action, you can use the `--follow` flag:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
flyte run --follow hello_world.py say_hello --data "World"
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Note that `--follow` has to be used with the `run` command.
|
|
114
|
+
|
|
115
|
+
Change copy style:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
flyte run --copy-style all hello_world.py say_hello_nested --data "World"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Building Images
|
|
122
|
+
|
|
123
|
+
```python
|
|
124
|
+
import flyte
|
|
125
|
+
|
|
126
|
+
env = flyte.TaskEnvironment(
|
|
127
|
+
name="hello_world",
|
|
128
|
+
image=flyte.Image.auto().with_apt_packages(...).with_pip_packages(...),
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Deploying
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
flyte deploy hello_world.py say_hello_nested
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Get information
|
|
140
|
+
|
|
141
|
+
Get all runs:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
flyte get run
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Get a specific run:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
flyte get run "run-name"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Get all actions for a run:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
flyte get actions "run-name"
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Get a specific action for a run:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
flyte get action "run-name" "action-name"
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Get action logs:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
flyte get logs "run-name" ["action-name"]
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
This defaults to root action if no action name is provided
|
|
172
|
+
|
|
173
|
+
## Running workflows programmatically in Python
|
|
174
|
+
|
|
175
|
+
You can run any workflow programmatically within the script module using __main__:
|
|
176
|
+
|
|
177
|
+
```python
|
|
178
|
+
if __name__ == "__main__":
|
|
179
|
+
import flyte
|
|
180
|
+
flyte.init()
|
|
181
|
+
flyte.run(say_hello_nested, "World")
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Running scripts with dependencies specified in metadata headers
|
|
185
|
+
|
|
186
|
+
You can also run a `uv` script with dependencies specified in metadata headers
|
|
187
|
+
and build the task image automatically based on those dependencies:
|
|
188
|
+
|
|
189
|
+
```python
|
|
190
|
+
# container_images.py
|
|
191
|
+
|
|
192
|
+
# /// script
|
|
193
|
+
# dependencies = [
|
|
194
|
+
# "polars",
|
|
195
|
+
# "flyte>=0.2.0b12"
|
|
196
|
+
# ]
|
|
197
|
+
# ///
|
|
198
|
+
|
|
199
|
+
import polars as pl
|
|
200
|
+
|
|
201
|
+
import flyte
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
env = flyte.TaskEnvironment(
|
|
205
|
+
name="polars_image",
|
|
206
|
+
image=flyte.Image.from_uv_script(
|
|
207
|
+
__file__,
|
|
208
|
+
name="flyte",
|
|
209
|
+
registry="ghcr.io/<you-username>"
|
|
210
|
+
arch=("linux/amd64", "linux/arm64"),
|
|
211
|
+
).with_apt_packages("ca-certificates"),
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
@env.task
|
|
216
|
+
async def create_dataframe() -> pl.DataFrame:
|
|
217
|
+
return pl.DataFrame(
|
|
218
|
+
{"name": ["Alice", "Bob", "Charlie"], "age": [25, 32, 37], "city": ["New York", "Paris", "Berlin"]}
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
@env.task
|
|
223
|
+
async def print_dataframe(dataframe: pl.DataFrame):
|
|
224
|
+
print(dataframe)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
@env.task
|
|
228
|
+
async def workflow():
|
|
229
|
+
df = await create_dataframe()
|
|
230
|
+
await print_dataframe(df)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
if __name__ == "__main__":
|
|
234
|
+
flyte.init_from_config("config.yaml")
|
|
235
|
+
run = flyte.run(workflow)
|
|
236
|
+
print(run.name)
|
|
237
|
+
print(run.url)
|
|
238
|
+
run.wait(run)
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
When you execute
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
uv run hello_world.py
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
`uv` will automatically update the local virtual environment with the dependencies specified in the metadata headers.
|
|
248
|
+
Then, Flyte will build the task image using those dependencies and push it to the registry you specify.
|
|
249
|
+
Flyte will then deploy the tasks to the cluster where the system will pull the image and run the tasks using it.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
flyte/__init__.py,sha256=
|
|
1
|
+
flyte/__init__.py,sha256=lg45TANKqnZrPZhIOelGabO2rzvJzRIhy1tDX4kqTwo,1555
|
|
2
2
|
flyte/_build.py,sha256=MkgfLAPeL56YeVrGRNZUCZgbwzlEzVP3wLbl5Qru4yk,578
|
|
3
3
|
flyte/_context.py,sha256=K0-TCt-_pHOoE5Xni87_8uIe2vCBOhfNQEtjGT4Hu4k,5239
|
|
4
4
|
flyte/_deploy.py,sha256=Nw1E-jU2AxFMbRG_DWfxiKO6InZCr1Ow2azd6PbKe0E,8987
|
|
5
5
|
flyte/_doc.py,sha256=_OPCf3t_git6UT7kSJISFaWO9cfNzJhhoe6JjVdyCJo,706
|
|
6
6
|
flyte/_docstring.py,sha256=SsG0Ab_YMAwy2ABJlEo3eBKlyC3kwPdnDJ1FIms-ZBQ,1127
|
|
7
7
|
flyte/_environment.py,sha256=BkChtdVhWB3SwMSvetDZ-KiNBgRFlAXgq69PHT4zyG0,2942
|
|
8
|
+
flyte/_excepthook.py,sha256=nXts84rzEg6-7RtFarbKzOsRZTQR4plnbWVIFMAEprs,1310
|
|
8
9
|
flyte/_group.py,sha256=7o1j16sZyUmYB50mOiq1ui4TBAKhRpDqLakV8Ya1kw4,803
|
|
9
10
|
flyte/_hash.py,sha256=Of_Zl_DzzzF2jp4ZsLm-3o-xJFCCJ8_GubmLI1htx78,504
|
|
10
11
|
flyte/_image.py,sha256=NeBvjCdwFAVGd666ufi1q-YOvhwdTEzAeJl5YBfl0bI,29043
|
|
@@ -16,14 +17,14 @@ flyte/_pod.py,sha256=lNaQuWX22QG6Xji7-8GpuKUkqCmVFaRxOVU-eUEa-Vk,637
|
|
|
16
17
|
flyte/_resources.py,sha256=UOLyEVhdxolvrHhddiBbYdJuE1RkM_l7xeS9G1abe6M,7583
|
|
17
18
|
flyte/_retry.py,sha256=rfLv0MvWxzPByKESTglEmjPsytEAKiIvvmzlJxXwsfE,941
|
|
18
19
|
flyte/_reusable_environment.py,sha256=P4FBATVKAYcIKpdFN98sI8acPyKy8eIGx6V0kUb9YdM,1289
|
|
19
|
-
flyte/_run.py,sha256=
|
|
20
|
+
flyte/_run.py,sha256=kxylo-BTgnZC7FkqvKUtIDeXE6kevLqCS8i0buT70BA,20196
|
|
20
21
|
flyte/_secret.py,sha256=SqIHs6mi8hEkIIBZe3bI9jJsPt65Mt6dV5uh9_op1ME,2392
|
|
21
22
|
flyte/_task.py,sha256=AHxg4lqHfExdSU6adwPiFzAT2EtrLI8mBdRxTUL1RgA,17902
|
|
22
23
|
flyte/_task_environment.py,sha256=J1LFH9Zz1nPhlsrc_rYny1SS3QC1b55X7tRYoTG7Vk4,6815
|
|
23
24
|
flyte/_timeout.py,sha256=zx5sFcbYmjJAJbZWSGzzX-BpC9HC7Jfs35T7vVhKwkk,1571
|
|
24
25
|
flyte/_tools.py,sha256=JewkQZBR_M85tS6QY8e4xXue75jbOE48nID4ZHnc9jY,632
|
|
25
26
|
flyte/_trace.py,sha256=C788bgoSc3st8kE8Cae2xegnLx2CT6uuRKKfaDrDUys,5122
|
|
26
|
-
flyte/_version.py,sha256=
|
|
27
|
+
flyte/_version.py,sha256=v28x7rXB_3GrL0I5zyhrj-6Ffe8gWhHERwr3KVTgEgw,521
|
|
27
28
|
flyte/errors.py,sha256=lJgSiZb2nZnuTZqBEB9rg-bV_GXVAYNjQFRuKWQskyY,4683
|
|
28
29
|
flyte/models.py,sha256=A85HnTLqInJiMmQKhpl2IXb2Uh6_46tdRrwW2TTzD9o,12908
|
|
29
30
|
flyte/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -43,10 +44,10 @@ flyte/_internal/controllers/__init__.py,sha256=5CBnS9lb1VFMzZuRXUiaPhlN3G9qh7Aq9
|
|
|
43
44
|
flyte/_internal/controllers/_local_controller.py,sha256=Wpgtd50C_ovIHpQSZC6asQc7iKyKIraEf-MAHCwcNJI,7124
|
|
44
45
|
flyte/_internal/controllers/_trace.py,sha256=biI-lXSIe3gXuWI-KT6T-jTtojQCQ7BLOHTCG3J6MQc,1145
|
|
45
46
|
flyte/_internal/controllers/remote/__init__.py,sha256=9_azH1eHLqY6VULpDugXi7Kf1kK1ODqEnsQ_3wM6IqU,1919
|
|
46
|
-
flyte/_internal/controllers/remote/_action.py,sha256=
|
|
47
|
+
flyte/_internal/controllers/remote/_action.py,sha256=aGmTCciHkx9YSU6gPWWFsgjIan-mgelHfmZM4SzZJS4,5121
|
|
47
48
|
flyte/_internal/controllers/remote/_client.py,sha256=HPbzbfaWZVv5wpOvKNtFXR6COiZDwd1cUJQqi60A7oU,1421
|
|
48
|
-
flyte/_internal/controllers/remote/_controller.py,sha256=
|
|
49
|
-
flyte/_internal/controllers/remote/_core.py,sha256=
|
|
49
|
+
flyte/_internal/controllers/remote/_controller.py,sha256=qA_uas6Vhk0VEAXNtI2obogtmC-YCr8mTexSnvVA3gg,21184
|
|
50
|
+
flyte/_internal/controllers/remote/_core.py,sha256=UKjiL3dGidXcR1dPzJswn67g38HQmVXV7n0zoX_8AZY,18422
|
|
50
51
|
flyte/_internal/controllers/remote/_informer.py,sha256=StiPcQLLW0h36uEBhKsupMY79EeFCKA3QQzvv2IyvRo,14188
|
|
51
52
|
flyte/_internal/controllers/remote/_service_protocol.py,sha256=B9qbIg6DiGeac-iSccLmX_AL2xUgX4ezNUOiAbSy4V0,1357
|
|
52
53
|
flyte/_internal/imagebuild/__init__.py,sha256=cLXVxkAyFpbdC1y-k3Rb6FRW9f_xpoRQWVn__G9IqKs,354
|
|
@@ -58,11 +59,11 @@ flyte/_internal/resolvers/_task_module.py,sha256=jwy1QYygUK7xmpCZLt1SPTfJCkfox3C
|
|
|
58
59
|
flyte/_internal/resolvers/common.py,sha256=ADQLRoyGsJ4vuUkitffMGrMKKjy0vpk6X53g4FuKDLc,993
|
|
59
60
|
flyte/_internal/resolvers/default.py,sha256=nX4DHUYod1nRvEsl_vSgutQVEdExu2xL8pRkyi4VWbY,981
|
|
60
61
|
flyte/_internal/runtime/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
|
-
flyte/_internal/runtime/convert.py,sha256=
|
|
62
|
+
flyte/_internal/runtime/convert.py,sha256=zDMLjmzy84cOcC5rZZA1RbbXOP9irmWHNfCn5HrgprI,11522
|
|
62
63
|
flyte/_internal/runtime/entrypoints.py,sha256=Kyi19i7LYk7YM3ZV_Y4FXGt5Pc1tIftGkIDohopblyY,5127
|
|
63
64
|
flyte/_internal/runtime/io.py,sha256=Lgdy4iPjlKjUO-V_AkoPZff6lywaFjZUG-PErRukmx4,4248
|
|
64
65
|
flyte/_internal/runtime/resources_serde.py,sha256=tvMMv3l6cZEt_cfs7zVE_Kqs5qh-_r7fsEPxb6xMxMk,4812
|
|
65
|
-
flyte/_internal/runtime/task_serde.py,sha256
|
|
66
|
+
flyte/_internal/runtime/task_serde.py,sha256=-CiOvrktT2ChdNhdFzgTu9r1Lujk1wkjs8bhmsILnYw,13045
|
|
66
67
|
flyte/_internal/runtime/taskrunner.py,sha256=rHWS4t5qgZnzGdGrs0_O0sSs_PVGoE1CNPDb-fTwwmo,7332
|
|
67
68
|
flyte/_internal/runtime/types_serde.py,sha256=EjRh9Yypx9-20XXQprtNgp766LeQVRoYWtY6XPGMZQg,1813
|
|
68
69
|
flyte/_protos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -110,8 +111,8 @@ flyte/_protos/workflow/environment_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDC
|
|
|
110
111
|
flyte/_protos/workflow/node_execution_service_pb2.py,sha256=IOLg3tNikY7n00kLOVsC69yyXc5Ttnx-_-xUuc0q05Q,1654
|
|
111
112
|
flyte/_protos/workflow/node_execution_service_pb2.pyi,sha256=C7VVuw_bnxp68qemD3SLoGIL-Hmno6qkIoq3l6W2qb8,135
|
|
112
113
|
flyte/_protos/workflow/node_execution_service_pb2_grpc.py,sha256=2JJDS3Aww3FFDW-qYdTaxC75gRpsgnn4an6LPZmF9uA,947
|
|
113
|
-
flyte/_protos/workflow/queue_service_pb2.py,sha256=
|
|
114
|
-
flyte/_protos/workflow/queue_service_pb2.pyi,sha256=
|
|
114
|
+
flyte/_protos/workflow/queue_service_pb2.py,sha256=7TPBylY7vXCb9QF1bvAjwFP0Vkm17o_Axzt4X9E5jLw,12221
|
|
115
|
+
flyte/_protos/workflow/queue_service_pb2.pyi,sha256=aIqgKP39QzqeyRfLsBcLoE8C8MyrtPTa9L55f0GBytE,8047
|
|
115
116
|
flyte/_protos/workflow/queue_service_pb2_grpc.py,sha256=6KK87jYXrmK0jacf4AKhHp21QU9JFJPOiEBjbDRkBm0,7839
|
|
116
117
|
flyte/_protos/workflow/run_definition_pb2.py,sha256=9RuY5xbz7Fp8R9fHb3cCqfCvGYT3txLnTnuKUmcCpZA,16156
|
|
117
118
|
flyte/_protos/workflow/run_definition_pb2.pyi,sha256=lUt30Pnbqlg6vUD2pF64BpRjlAAbRUZe0of-vHCOeg8,15371
|
|
@@ -122,9 +123,9 @@ flyte/_protos/workflow/run_logs_service_pb2_grpc.py,sha256=xoNyNBaK9dmrjZtiYkZQS
|
|
|
122
123
|
flyte/_protos/workflow/run_service_pb2.py,sha256=aKeLCUAC_oIHHm4k6Pd7rbbspUwY5Cl3Rp7keasNbVo,14910
|
|
123
124
|
flyte/_protos/workflow/run_service_pb2.pyi,sha256=AZBcXfw6tvlfa3OjQzVt3pSB5xc2DJGyW4aUgF2y_9s,9045
|
|
124
125
|
flyte/_protos/workflow/run_service_pb2_grpc.py,sha256=tO1qnrD5_0KrtToCIcuseVhkQNdNIQ2yfZHCzysV5sY,19657
|
|
125
|
-
flyte/_protos/workflow/state_service_pb2.py,sha256=
|
|
126
|
-
flyte/_protos/workflow/state_service_pb2.pyi,sha256=
|
|
127
|
-
flyte/_protos/workflow/state_service_pb2_grpc.py,sha256=
|
|
126
|
+
flyte/_protos/workflow/state_service_pb2.py,sha256=MyraTRsEQpchOOTlIVDGdSuYOtwnz84LNO9bwD3P67c,6712
|
|
127
|
+
flyte/_protos/workflow/state_service_pb2.pyi,sha256=aiWXyWVI6ooqbZsYa01OaSw1JXkDuop_gwB0wTm7uPc,3881
|
|
128
|
+
flyte/_protos/workflow/state_service_pb2_grpc.py,sha256=nCRIosO0pGM66H-i3hP_KFQKSMCFHmnspGgyxchaxQA,5825
|
|
128
129
|
flyte/_protos/workflow/task_definition_pb2.py,sha256=fqqvgxX6DykFHwRJFIrmYkBxLx6Qhtq3CuzBViuzvag,7833
|
|
129
130
|
flyte/_protos/workflow/task_definition_pb2.pyi,sha256=WO23j393scV5Q5GFJfWOrydzNLG0indVAT36RxB6tw4,4163
|
|
130
131
|
flyte/_protos/workflow/task_definition_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
@@ -142,15 +143,15 @@ flyte/_utils/org_discovery.py,sha256=C7aJa0LfnWBkDtSU9M7bE60zp27qEhJC58piqOErZ94
|
|
|
142
143
|
flyte/_utils/uv_script_parser.py,sha256=PxqD8lSMi6xv0uDd1s8LKB2IPZr4ttZJCUweqlyMTKk,1483
|
|
143
144
|
flyte/cli/__init__.py,sha256=M02O-UGqQlA8JJ_jyWRiwQhTNc5CJJ7x9J7fNxTxBT0,52
|
|
144
145
|
flyte/cli/_abort.py,sha256=Ty-63Gtd2PUn6lCuL5AaasfBoPu7TDSU5EQKVbkF4qw,661
|
|
145
|
-
flyte/cli/_common.py,sha256=
|
|
146
|
+
flyte/cli/_common.py,sha256=r7QMoN4uQPQnjYd7TVnpk8RcbWJYCliA4Aa0aMbFDZo,11047
|
|
146
147
|
flyte/cli/_create.py,sha256=a75II-xT71SpdopNY14rPuidO5qL0mH1UAwf205sVzQ,4313
|
|
147
|
-
flyte/cli/_delete.py,sha256=
|
|
148
|
-
flyte/cli/_deploy.py,sha256=
|
|
148
|
+
flyte/cli/_delete.py,sha256=VTmXv09PBjkdtyl23mbSjIQQlN7Y1AI_bO0GkHP-f9E,546
|
|
149
|
+
flyte/cli/_deploy.py,sha256=o8xtChouozypfE8M2BtfhrcxMEqjlrxB8JsYxPENNhc,4789
|
|
149
150
|
flyte/cli/_gen.py,sha256=vlE5l8UR1zz4RSdaRyUfYFvGR0TLxGcTYcP4dhA3Pvg,5458
|
|
150
|
-
flyte/cli/_get.py,sha256=
|
|
151
|
+
flyte/cli/_get.py,sha256=UBh82YQ3WZF7WPZjW3l3RQG97JZYlgHMzpuiVdtJseg,9896
|
|
151
152
|
flyte/cli/_params.py,sha256=cDeTvjOQP8EydVJUrncLeAxUaHvGorJyDvMSrAxapmM,19466
|
|
152
|
-
flyte/cli/_run.py,sha256=
|
|
153
|
-
flyte/cli/main.py,sha256=
|
|
153
|
+
flyte/cli/_run.py,sha256=a8Y1XLhti6kaaibcN2AZHjxIauHeXqT9wnXWDKee2ew,7733
|
|
154
|
+
flyte/cli/main.py,sha256=Wv-Bd70f-xANAfRK9III5SYH4-r4ScHqWx8EmZbsoII,4408
|
|
154
155
|
flyte/config/__init__.py,sha256=MiwEYK5Iv7MRR22z61nzbsbvZ9Q6MdmAU_g9If1Pmb8,144
|
|
155
156
|
flyte/config/_config.py,sha256=QE3T0W8xOULjJaqDMdMF90f9gFVjGR6h8QPOLsyqjYw,9831
|
|
156
157
|
flyte/config/_internal.py,sha256=Bj0uzn3PYgxKbzM-q2GKXxp7Y6cyzhPzUB-Y2i6cQKo,2836
|
|
@@ -166,7 +167,7 @@ flyte/io/_structured_dataset/basic_dfs.py,sha256=77aYFrFigPC7cjM6UjCbU26REtXmwIB
|
|
|
166
167
|
flyte/io/_structured_dataset/structured_dataset.py,sha256=ddRjz36RhNxIy0gakzdLStBzoo4cAOgXbNqiqt5YhMI,52645
|
|
167
168
|
flyte/remote/__init__.py,sha256=h0J9W1yWbvPq2R9HXa_HezJtxHoWl6d9QKQbuuKDMnU,597
|
|
168
169
|
flyte/remote/_console.py,sha256=avmELJPx8nQMAVPrHlh6jEIRPjrMwFpdZjJsWOOa9rE,660
|
|
169
|
-
flyte/remote/_data.py,sha256=
|
|
170
|
+
flyte/remote/_data.py,sha256=9PNyZBWpub1ookQZMEeOs0MDhohOeENrUEIVf6FKDPE,6017
|
|
170
171
|
flyte/remote/_logs.py,sha256=EOXg4OS8yYclsT6NASgOLMo0TA2sZpKb2MWZXpWBPuI,6404
|
|
171
172
|
flyte/remote/_project.py,sha256=dTBYqORDAbLvh9WnPO1Ytuzw2vxNYZwwNsKE2_b0o14,2807
|
|
172
173
|
flyte/remote/_run.py,sha256=9euHjYRX-xyxXuhn0MunYb9dmgl0FMU3a-FZNjJA4F8,31057
|
|
@@ -177,7 +178,7 @@ flyte/remote/_client/_protocols.py,sha256=JyBWHs5WsVOxEDUyG9X7wPLDzzzjkoaNhJlU-X
|
|
|
177
178
|
flyte/remote/_client/controlplane.py,sha256=FsOfj4rO4MIMnYrpAT53F8q588VVf5t4sDuwoPuc840,3102
|
|
178
179
|
flyte/remote/_client/auth/__init__.py,sha256=JQrIlwaqPlPzrxcOREhcfyFsC4LrfqL5TRz6A3JNSEA,413
|
|
179
180
|
flyte/remote/_client/auth/_auth_utils.py,sha256=Is6mr18J8AMQlbtu-Q63aMJgrZ27dXXNSig8KshR1_8,545
|
|
180
|
-
flyte/remote/_client/auth/_channel.py,sha256=
|
|
181
|
+
flyte/remote/_client/auth/_channel.py,sha256=GViIT63qabaMOe0gethEGwPR7M_E-MxAiVOlDFgYHps,9449
|
|
181
182
|
flyte/remote/_client/auth/_client_config.py,sha256=Elit5TCLjMQDiktiUmMKy2POWwwb5rKgIXfG3-rpfbs,3304
|
|
182
183
|
flyte/remote/_client/auth/_default_html.py,sha256=XAdgP-25WySMODbusWOcQQPiXin1h-hfzmRJv_Dg3tE,1651
|
|
183
184
|
flyte/remote/_client/auth/_keyring.py,sha256=BL-FzGe5ryuBRCwwpvvG8IzkYuXiJTU2J0P1l-Za5IM,5176
|
|
@@ -202,16 +203,16 @@ flyte/storage/_remote_fs.py,sha256=kM_iszbccjVD5VtVdgfkl1FHS8NPnY__JOo_CPQUE4c,1
|
|
|
202
203
|
flyte/storage/_storage.py,sha256=mBy7MKII2M1UTVm_EUUDwVb7uT1_AOPzQr2wCJ-fgW0,9873
|
|
203
204
|
flyte/storage/_utils.py,sha256=8oLCM-7D7JyJhzUi1_Q1NFx8GBUPRfou0T_5tPBmPbE,309
|
|
204
205
|
flyte/syncify/__init__.py,sha256=WgTk-v-SntULnI55CsVy71cxGJ9Q6pxpTrhbPFuouJ0,1974
|
|
205
|
-
flyte/syncify/_api.py,sha256=
|
|
206
|
+
flyte/syncify/_api.py,sha256=fh7Dlh0cZGELnWDh5lFmxVu-_cqlfsu9XLwkiuDRseE,14672
|
|
206
207
|
flyte/types/__init__.py,sha256=9310PRtVrwJePwEPeoUO0HPyIkgaja7-Dar_QlE_MUI,1745
|
|
207
208
|
flyte/types/_interface.py,sha256=mY7mb8v2hJPGk7AU99gdOWl4_jArA1VFtjYGlE31SK0,953
|
|
208
209
|
flyte/types/_pickle.py,sha256=PjdR66OTDMZ3OYq6GvM_Ua0cIo5t2XQaIjmpJ9xo4Ys,4050
|
|
209
210
|
flyte/types/_renderer.py,sha256=ygcCo5l60lHufyQISFddZfWwLlQ8kJAKxUT_XnR_6dY,4818
|
|
210
211
|
flyte/types/_string_literals.py,sha256=NlG1xV8RSA-sZ-n-IFQCAsdB6jXJOAKkHWtnopxVVDk,4231
|
|
211
|
-
flyte/types/_type_engine.py,sha256=
|
|
212
|
+
flyte/types/_type_engine.py,sha256=Kk5g1nZubh2A4KWbvGBf5A-aZTvbTtjrY1Bg1_GOPV4,96643
|
|
212
213
|
flyte/types/_utils.py,sha256=pbts9E1_2LTdLygAY0UYTLYJ8AsN3BZyviSXvrtcutc,2626
|
|
213
|
-
flyte-0.2.
|
|
214
|
-
flyte-0.2.
|
|
215
|
-
flyte-0.2.
|
|
216
|
-
flyte-0.2.
|
|
217
|
-
flyte-0.2.
|
|
214
|
+
flyte-0.2.0b14.dist-info/METADATA,sha256=1I-_oekIUsZRu7qdLO-ee81A9jMn-ZOJfmRG9YUhSUc,5838
|
|
215
|
+
flyte-0.2.0b14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
216
|
+
flyte-0.2.0b14.dist-info/entry_points.txt,sha256=MIq2z5dBurdCJfpXfMKzgBv7sJOakKRYxr8G0cMiTrg,75
|
|
217
|
+
flyte-0.2.0b14.dist-info/top_level.txt,sha256=7dkyFbikvA12LEZEqawx8oDG1CMod6hTliPj7iWzgYo,6
|
|
218
|
+
flyte-0.2.0b14.dist-info/RECORD,,
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: flyte
|
|
3
|
-
Version: 0.2.0b12
|
|
4
|
-
Summary: Add your description here
|
|
5
|
-
Author-email: Ketan Umare <kumare3@users.noreply.github.com>
|
|
6
|
-
Requires-Python: >=3.10
|
|
7
|
-
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist: aiofiles>=24.1.0
|
|
9
|
-
Requires-Dist: click>=8.2.1
|
|
10
|
-
Requires-Dist: flyteidl==1.15.4b0
|
|
11
|
-
Requires-Dist: cloudpickle>=3.1.1
|
|
12
|
-
Requires-Dist: fsspec>=2025.3.0
|
|
13
|
-
Requires-Dist: grpcio>=1.71.0
|
|
14
|
-
Requires-Dist: obstore>=0.6.0
|
|
15
|
-
Requires-Dist: protobuf>=6.30.1
|
|
16
|
-
Requires-Dist: pydantic>=2.10.6
|
|
17
|
-
Requires-Dist: pyyaml>=6.0.2
|
|
18
|
-
Requires-Dist: rich-click>=1.8.9
|
|
19
|
-
Requires-Dist: httpx>=0.28.1
|
|
20
|
-
Requires-Dist: keyring>=25.6.0
|
|
21
|
-
Requires-Dist: msgpack>=1.1.0
|
|
22
|
-
Requires-Dist: toml>=0.10.2
|
|
23
|
-
Requires-Dist: async-lru>=2.0.5
|
|
24
|
-
Requires-Dist: mashumaro
|
|
25
|
-
Requires-Dist: dataclasses_json
|
|
26
|
-
|
|
27
|
-
# Flyte 2 SDK
|
|
28
|
-
|
|
29
|
-
The next-generation SDK for Flyte.
|
|
30
|
-
|
|
31
|
-
[](https://github.com/unionai/unionv2/actions/workflows/publish.yml)
|
|
32
|
-
|
|
33
|
-
## Quickstart
|
|
34
|
-
1. Clone this repo and set `unionv2` to working directory.
|
|
35
|
-
2. Run `uv venv`, and `source .venv/bin/activate` to create a new virtualenv
|
|
36
|
-
3. Install the latest version of the SDK by running the following:
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
uv pip install --no-cache --prerelease=allow --upgrade flyte
|
|
40
|
-
```
|
|
41
|
-
4. Create the config and point it to the Dogfood GCP cluster by running the following:
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
flyte create config --endpoint dns:///dogfood-gcp.cloud-staging.union.ai --org dogfood-gcp --project andrew --domain development
|
|
45
|
-
```
|
|
46
|
-
This will create a `config.yaml` file in the current directory which will be referenced ahead of any other `config.yaml`s found in your system.
|
|
47
|
-
|
|
48
|
-
5. Now you can run stuff with the CLI:
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
flyte run --follow examples/basics/devbox_one.py say_hello_nested
|
|
52
|
-
```
|
|
53
|
-
Note that the `--follow` command is optional. Use this to stream updates to the terminal!
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
## Hello World Example
|
|
58
|
-
|
|
59
|
-
1. Only async tasks are supported right now. Style recommended, `import flyte` and then `flyte.TaskEnvironment` etc
|
|
60
|
-
2. You have to create environment for even a single task
|
|
61
|
-
3. look at examples/... for various examples.
|
|
62
|
-
4. For a single script recommend using uv run scripts with metadata headers.
|
|
63
|
-
|
|
64
|
-
```python
|
|
65
|
-
import flyte
|
|
66
|
-
|
|
67
|
-
env = flyte.TaskEnvironment(name="hello_world")
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
@env.task
|
|
71
|
-
async def say_hello(data: str) -> str:
|
|
72
|
-
return f"Hello {data}"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
@env.task
|
|
76
|
-
async def say_hello_nested(data: str) -> str:
|
|
77
|
-
return await say_hello.override(resources=flyte.Resources(gpu="A100 80G:4")).execute(data)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if __name__ == "__main__":
|
|
81
|
-
import asyncio
|
|
82
|
-
|
|
83
|
-
# to run pure python - the SDK is not invoked at all
|
|
84
|
-
asyncio.run(say_hello_nested("test"))
|
|
85
|
-
|
|
86
|
-
# To run locally, but run through type system etc
|
|
87
|
-
flyte.init()
|
|
88
|
-
flyte.run(say_hello_nested, "World")
|
|
89
|
-
|
|
90
|
-
# To run remote
|
|
91
|
-
flyte.init(endpoint="dns:///localhost:8090", insecure=True)
|
|
92
|
-
flyte.run(say_hello_nested, "World")
|
|
93
|
-
# It is possible to switch local and remote, but keeping init to have and endpoint, but , changing context during run
|
|
94
|
-
flyte.with_runcontext(mode="local").run(...) # this will run locally only
|
|
95
|
-
|
|
96
|
-
# To run remote with a config
|
|
97
|
-
flyte.init_from_config("config.yaml")
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
# CLI
|
|
101
|
-
All commands can be run from any root directory.
|
|
102
|
-
For examples, it is not needed to have `__init__.py` in the directory. If you run from a directory, the
|
|
103
|
-
code will automatically package and upload all modules that are imported. You can change the behaviour by using --copy-style flag.
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
flyte run examples/basics/devbox_one.py say_hello --data "World"
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
To Follow the logs for the a0 action, you can use the `--follow` flag:
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
flyte run --follow examples/basics/devbox_one.py say_hello --data "World"
|
|
113
|
-
```
|
|
114
|
-
Note follow has to be used with `run` command
|
|
115
|
-
|
|
116
|
-
Change copy style
|
|
117
|
-
```bash
|
|
118
|
-
flyte run --copy-style examples/basics/devbox_one.py say_hello_nested --data "World"
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
# Building Images
|
|
122
|
-
```python
|
|
123
|
-
|
|
124
|
-
import flyte
|
|
125
|
-
|
|
126
|
-
env = flyte.TaskEnvironment(
|
|
127
|
-
name="hello_world",
|
|
128
|
-
image=flyte.Image.auto().with_apt_packages(...).with_pip_packages(...),
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### Deploy
|
|
134
|
-
```bash
|
|
135
|
-
flyte deploy examples/basics/devbox_one.py say_hello_nested
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
CLI shortcuts
|
|
139
|
-
|
|
140
|
-
Get runs
|
|
141
|
-
```bash
|
|
142
|
-
flyte get run
|
|
143
|
-
```
|
|
144
|
-
Get specific run
|
|
145
|
-
```bash
|
|
146
|
-
flyte get run "run-name"
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
Get run actions
|
|
150
|
-
```bash
|
|
151
|
-
flyte get actions "run-name"
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
Get specific action
|
|
155
|
-
```bash
|
|
156
|
-
flyte get action "run-name" "action-name"
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
Get action logs
|
|
160
|
-
```bash
|
|
161
|
-
flyte get logs "run-name" ["action-name"]
|
|
162
|
-
```
|
|
163
|
-
defaults to root action if no action name is provided
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
you can run any python script directly within the script module using __main__:
|
|
167
|
-
|
|
168
|
-
```python
|
|
169
|
-
if __name__ == "__main__":
|
|
170
|
-
import flyte
|
|
171
|
-
flyte.init()
|
|
172
|
-
flyte.run(say_hello_nested, "World")
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
You can also run from cli
|
|
176
|
-
|
|
177
|
-
you can Also run a uv script with metadata headers:
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
uv run scripts / hello_world.py
|
|
181
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|