flyte 0.2.0b12__py3-none-any.whl → 0.2.0b13__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/_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/_deploy.py +1 -1
- flyte/cli/_get.py +2 -2
- flyte/cli/_run.py +1 -2
- flyte/cli/main.py +1 -1
- flyte/syncify/_api.py +1 -1
- flyte/types/_type_engine.py +83 -9
- flyte-0.2.0b13.dist-info/METADATA +249 -0
- {flyte-0.2.0b12.dist-info → flyte-0.2.0b13.dist-info}/RECORD +23 -23
- flyte-0.2.0b12.dist-info/METADATA +0 -181
- {flyte-0.2.0b12.dist-info → flyte-0.2.0b13.dist-info}/WHEEL +0 -0
- {flyte-0.2.0b12.dist-info → flyte-0.2.0b13.dist-info}/entry_points.txt +0 -0
- {flyte-0.2.0b12.dist-info → flyte-0.2.0b13.dist-info}/top_level.txt +0 -0
|
@@ -16,14 +16,14 @@ flyte/_pod.py,sha256=lNaQuWX22QG6Xji7-8GpuKUkqCmVFaRxOVU-eUEa-Vk,637
|
|
|
16
16
|
flyte/_resources.py,sha256=UOLyEVhdxolvrHhddiBbYdJuE1RkM_l7xeS9G1abe6M,7583
|
|
17
17
|
flyte/_retry.py,sha256=rfLv0MvWxzPByKESTglEmjPsytEAKiIvvmzlJxXwsfE,941
|
|
18
18
|
flyte/_reusable_environment.py,sha256=P4FBATVKAYcIKpdFN98sI8acPyKy8eIGx6V0kUb9YdM,1289
|
|
19
|
-
flyte/_run.py,sha256=
|
|
19
|
+
flyte/_run.py,sha256=kxylo-BTgnZC7FkqvKUtIDeXE6kevLqCS8i0buT70BA,20196
|
|
20
20
|
flyte/_secret.py,sha256=SqIHs6mi8hEkIIBZe3bI9jJsPt65Mt6dV5uh9_op1ME,2392
|
|
21
21
|
flyte/_task.py,sha256=AHxg4lqHfExdSU6adwPiFzAT2EtrLI8mBdRxTUL1RgA,17902
|
|
22
22
|
flyte/_task_environment.py,sha256=J1LFH9Zz1nPhlsrc_rYny1SS3QC1b55X7tRYoTG7Vk4,6815
|
|
23
23
|
flyte/_timeout.py,sha256=zx5sFcbYmjJAJbZWSGzzX-BpC9HC7Jfs35T7vVhKwkk,1571
|
|
24
24
|
flyte/_tools.py,sha256=JewkQZBR_M85tS6QY8e4xXue75jbOE48nID4ZHnc9jY,632
|
|
25
25
|
flyte/_trace.py,sha256=C788bgoSc3st8kE8Cae2xegnLx2CT6uuRKKfaDrDUys,5122
|
|
26
|
-
flyte/_version.py,sha256=
|
|
26
|
+
flyte/_version.py,sha256=0E-DdmntjQZT1KcIObhyA9MR_uQ4ZUjfTz9eaHltMJo,521
|
|
27
27
|
flyte/errors.py,sha256=lJgSiZb2nZnuTZqBEB9rg-bV_GXVAYNjQFRuKWQskyY,4683
|
|
28
28
|
flyte/models.py,sha256=A85HnTLqInJiMmQKhpl2IXb2Uh6_46tdRrwW2TTzD9o,12908
|
|
29
29
|
flyte/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -43,10 +43,10 @@ flyte/_internal/controllers/__init__.py,sha256=5CBnS9lb1VFMzZuRXUiaPhlN3G9qh7Aq9
|
|
|
43
43
|
flyte/_internal/controllers/_local_controller.py,sha256=Wpgtd50C_ovIHpQSZC6asQc7iKyKIraEf-MAHCwcNJI,7124
|
|
44
44
|
flyte/_internal/controllers/_trace.py,sha256=biI-lXSIe3gXuWI-KT6T-jTtojQCQ7BLOHTCG3J6MQc,1145
|
|
45
45
|
flyte/_internal/controllers/remote/__init__.py,sha256=9_azH1eHLqY6VULpDugXi7Kf1kK1ODqEnsQ_3wM6IqU,1919
|
|
46
|
-
flyte/_internal/controllers/remote/_action.py,sha256=
|
|
46
|
+
flyte/_internal/controllers/remote/_action.py,sha256=aGmTCciHkx9YSU6gPWWFsgjIan-mgelHfmZM4SzZJS4,5121
|
|
47
47
|
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=
|
|
48
|
+
flyte/_internal/controllers/remote/_controller.py,sha256=qA_uas6Vhk0VEAXNtI2obogtmC-YCr8mTexSnvVA3gg,21184
|
|
49
|
+
flyte/_internal/controllers/remote/_core.py,sha256=m7fuext8I6WKxVjALMZ-zbX3qHHNHu7xupeoRDYdCS8,18425
|
|
50
50
|
flyte/_internal/controllers/remote/_informer.py,sha256=StiPcQLLW0h36uEBhKsupMY79EeFCKA3QQzvv2IyvRo,14188
|
|
51
51
|
flyte/_internal/controllers/remote/_service_protocol.py,sha256=B9qbIg6DiGeac-iSccLmX_AL2xUgX4ezNUOiAbSy4V0,1357
|
|
52
52
|
flyte/_internal/imagebuild/__init__.py,sha256=cLXVxkAyFpbdC1y-k3Rb6FRW9f_xpoRQWVn__G9IqKs,354
|
|
@@ -58,11 +58,11 @@ flyte/_internal/resolvers/_task_module.py,sha256=jwy1QYygUK7xmpCZLt1SPTfJCkfox3C
|
|
|
58
58
|
flyte/_internal/resolvers/common.py,sha256=ADQLRoyGsJ4vuUkitffMGrMKKjy0vpk6X53g4FuKDLc,993
|
|
59
59
|
flyte/_internal/resolvers/default.py,sha256=nX4DHUYod1nRvEsl_vSgutQVEdExu2xL8pRkyi4VWbY,981
|
|
60
60
|
flyte/_internal/runtime/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
|
-
flyte/_internal/runtime/convert.py,sha256=
|
|
61
|
+
flyte/_internal/runtime/convert.py,sha256=zDMLjmzy84cOcC5rZZA1RbbXOP9irmWHNfCn5HrgprI,11522
|
|
62
62
|
flyte/_internal/runtime/entrypoints.py,sha256=Kyi19i7LYk7YM3ZV_Y4FXGt5Pc1tIftGkIDohopblyY,5127
|
|
63
63
|
flyte/_internal/runtime/io.py,sha256=Lgdy4iPjlKjUO-V_AkoPZff6lywaFjZUG-PErRukmx4,4248
|
|
64
64
|
flyte/_internal/runtime/resources_serde.py,sha256=tvMMv3l6cZEt_cfs7zVE_Kqs5qh-_r7fsEPxb6xMxMk,4812
|
|
65
|
-
flyte/_internal/runtime/task_serde.py,sha256
|
|
65
|
+
flyte/_internal/runtime/task_serde.py,sha256=-CiOvrktT2ChdNhdFzgTu9r1Lujk1wkjs8bhmsILnYw,13045
|
|
66
66
|
flyte/_internal/runtime/taskrunner.py,sha256=rHWS4t5qgZnzGdGrs0_O0sSs_PVGoE1CNPDb-fTwwmo,7332
|
|
67
67
|
flyte/_internal/runtime/types_serde.py,sha256=EjRh9Yypx9-20XXQprtNgp766LeQVRoYWtY6XPGMZQg,1813
|
|
68
68
|
flyte/_protos/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -110,8 +110,8 @@ flyte/_protos/workflow/environment_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDC
|
|
|
110
110
|
flyte/_protos/workflow/node_execution_service_pb2.py,sha256=IOLg3tNikY7n00kLOVsC69yyXc5Ttnx-_-xUuc0q05Q,1654
|
|
111
111
|
flyte/_protos/workflow/node_execution_service_pb2.pyi,sha256=C7VVuw_bnxp68qemD3SLoGIL-Hmno6qkIoq3l6W2qb8,135
|
|
112
112
|
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=
|
|
113
|
+
flyte/_protos/workflow/queue_service_pb2.py,sha256=7TPBylY7vXCb9QF1bvAjwFP0Vkm17o_Axzt4X9E5jLw,12221
|
|
114
|
+
flyte/_protos/workflow/queue_service_pb2.pyi,sha256=aIqgKP39QzqeyRfLsBcLoE8C8MyrtPTa9L55f0GBytE,8047
|
|
115
115
|
flyte/_protos/workflow/queue_service_pb2_grpc.py,sha256=6KK87jYXrmK0jacf4AKhHp21QU9JFJPOiEBjbDRkBm0,7839
|
|
116
116
|
flyte/_protos/workflow/run_definition_pb2.py,sha256=9RuY5xbz7Fp8R9fHb3cCqfCvGYT3txLnTnuKUmcCpZA,16156
|
|
117
117
|
flyte/_protos/workflow/run_definition_pb2.pyi,sha256=lUt30Pnbqlg6vUD2pF64BpRjlAAbRUZe0of-vHCOeg8,15371
|
|
@@ -122,9 +122,9 @@ flyte/_protos/workflow/run_logs_service_pb2_grpc.py,sha256=xoNyNBaK9dmrjZtiYkZQS
|
|
|
122
122
|
flyte/_protos/workflow/run_service_pb2.py,sha256=aKeLCUAC_oIHHm4k6Pd7rbbspUwY5Cl3Rp7keasNbVo,14910
|
|
123
123
|
flyte/_protos/workflow/run_service_pb2.pyi,sha256=AZBcXfw6tvlfa3OjQzVt3pSB5xc2DJGyW4aUgF2y_9s,9045
|
|
124
124
|
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=
|
|
125
|
+
flyte/_protos/workflow/state_service_pb2.py,sha256=MyraTRsEQpchOOTlIVDGdSuYOtwnz84LNO9bwD3P67c,6712
|
|
126
|
+
flyte/_protos/workflow/state_service_pb2.pyi,sha256=aiWXyWVI6ooqbZsYa01OaSw1JXkDuop_gwB0wTm7uPc,3881
|
|
127
|
+
flyte/_protos/workflow/state_service_pb2_grpc.py,sha256=nCRIosO0pGM66H-i3hP_KFQKSMCFHmnspGgyxchaxQA,5825
|
|
128
128
|
flyte/_protos/workflow/task_definition_pb2.py,sha256=fqqvgxX6DykFHwRJFIrmYkBxLx6Qhtq3CuzBViuzvag,7833
|
|
129
129
|
flyte/_protos/workflow/task_definition_pb2.pyi,sha256=WO23j393scV5Q5GFJfWOrydzNLG0indVAT36RxB6tw4,4163
|
|
130
130
|
flyte/_protos/workflow/task_definition_pb2_grpc.py,sha256=1oboBPFxaTEXt9Aw7EAj8gXHDCNMhZD2VXqocC9l_gk,159
|
|
@@ -145,12 +145,12 @@ flyte/cli/_abort.py,sha256=Ty-63Gtd2PUn6lCuL5AaasfBoPu7TDSU5EQKVbkF4qw,661
|
|
|
145
145
|
flyte/cli/_common.py,sha256=aDc1zT16I5htzYwfcztvoh0TxICbQFISlEyCU_8h5Bo,11053
|
|
146
146
|
flyte/cli/_create.py,sha256=a75II-xT71SpdopNY14rPuidO5qL0mH1UAwf205sVzQ,4313
|
|
147
147
|
flyte/cli/_delete.py,sha256=qq5A9d6vXdYvYz-SECXiC6LU5rAzahNTZKiKacOtcZ4,545
|
|
148
|
-
flyte/cli/_deploy.py,sha256=
|
|
148
|
+
flyte/cli/_deploy.py,sha256=o8xtChouozypfE8M2BtfhrcxMEqjlrxB8JsYxPENNhc,4789
|
|
149
149
|
flyte/cli/_gen.py,sha256=vlE5l8UR1zz4RSdaRyUfYFvGR0TLxGcTYcP4dhA3Pvg,5458
|
|
150
|
-
flyte/cli/_get.py,sha256=
|
|
150
|
+
flyte/cli/_get.py,sha256=UBh82YQ3WZF7WPZjW3l3RQG97JZYlgHMzpuiVdtJseg,9896
|
|
151
151
|
flyte/cli/_params.py,sha256=cDeTvjOQP8EydVJUrncLeAxUaHvGorJyDvMSrAxapmM,19466
|
|
152
|
-
flyte/cli/_run.py,sha256=
|
|
153
|
-
flyte/cli/main.py,sha256=
|
|
152
|
+
flyte/cli/_run.py,sha256=i0HwFcUbbaM24fPLOjkBn4TLn9NgYvCqkhFDwA75Oow,7839
|
|
153
|
+
flyte/cli/main.py,sha256=DofP6KmD_mbLhvD10S4gjSApPkweyGoBIlGBVDSHaoQ,4283
|
|
154
154
|
flyte/config/__init__.py,sha256=MiwEYK5Iv7MRR22z61nzbsbvZ9Q6MdmAU_g9If1Pmb8,144
|
|
155
155
|
flyte/config/_config.py,sha256=QE3T0W8xOULjJaqDMdMF90f9gFVjGR6h8QPOLsyqjYw,9831
|
|
156
156
|
flyte/config/_internal.py,sha256=Bj0uzn3PYgxKbzM-q2GKXxp7Y6cyzhPzUB-Y2i6cQKo,2836
|
|
@@ -202,16 +202,16 @@ flyte/storage/_remote_fs.py,sha256=kM_iszbccjVD5VtVdgfkl1FHS8NPnY__JOo_CPQUE4c,1
|
|
|
202
202
|
flyte/storage/_storage.py,sha256=mBy7MKII2M1UTVm_EUUDwVb7uT1_AOPzQr2wCJ-fgW0,9873
|
|
203
203
|
flyte/storage/_utils.py,sha256=8oLCM-7D7JyJhzUi1_Q1NFx8GBUPRfou0T_5tPBmPbE,309
|
|
204
204
|
flyte/syncify/__init__.py,sha256=WgTk-v-SntULnI55CsVy71cxGJ9Q6pxpTrhbPFuouJ0,1974
|
|
205
|
-
flyte/syncify/_api.py,sha256=
|
|
205
|
+
flyte/syncify/_api.py,sha256=CpKF4NniqF9bSBttb3QcO2Gp1CRve9-9NI-jwokMGOY,10879
|
|
206
206
|
flyte/types/__init__.py,sha256=9310PRtVrwJePwEPeoUO0HPyIkgaja7-Dar_QlE_MUI,1745
|
|
207
207
|
flyte/types/_interface.py,sha256=mY7mb8v2hJPGk7AU99gdOWl4_jArA1VFtjYGlE31SK0,953
|
|
208
208
|
flyte/types/_pickle.py,sha256=PjdR66OTDMZ3OYq6GvM_Ua0cIo5t2XQaIjmpJ9xo4Ys,4050
|
|
209
209
|
flyte/types/_renderer.py,sha256=ygcCo5l60lHufyQISFddZfWwLlQ8kJAKxUT_XnR_6dY,4818
|
|
210
210
|
flyte/types/_string_literals.py,sha256=NlG1xV8RSA-sZ-n-IFQCAsdB6jXJOAKkHWtnopxVVDk,4231
|
|
211
|
-
flyte/types/_type_engine.py,sha256=
|
|
211
|
+
flyte/types/_type_engine.py,sha256=Kk5g1nZubh2A4KWbvGBf5A-aZTvbTtjrY1Bg1_GOPV4,96643
|
|
212
212
|
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.
|
|
213
|
+
flyte-0.2.0b13.dist-info/METADATA,sha256=dRRsxK84q9O9a9mr2Il2oqJ56CE85OUEBHTyJAeZWSc,5838
|
|
214
|
+
flyte-0.2.0b13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
215
|
+
flyte-0.2.0b13.dist-info/entry_points.txt,sha256=MIq2z5dBurdCJfpXfMKzgBv7sJOakKRYxr8G0cMiTrg,75
|
|
216
|
+
flyte-0.2.0b13.dist-info/top_level.txt,sha256=7dkyFbikvA12LEZEqawx8oDG1CMod6hTliPj7iWzgYo,6
|
|
217
|
+
flyte-0.2.0b13.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
|