flyte 0.1.0__py3-none-any.whl → 0.2.0a0__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.

Files changed (219) hide show
  1. flyte/__init__.py +78 -2
  2. flyte/_bin/__init__.py +0 -0
  3. flyte/_bin/runtime.py +152 -0
  4. flyte/_build.py +26 -0
  5. flyte/_cache/__init__.py +12 -0
  6. flyte/_cache/cache.py +145 -0
  7. flyte/_cache/defaults.py +9 -0
  8. flyte/_cache/policy_function_body.py +42 -0
  9. flyte/_code_bundle/__init__.py +8 -0
  10. flyte/_code_bundle/_ignore.py +113 -0
  11. flyte/_code_bundle/_packaging.py +187 -0
  12. flyte/_code_bundle/_utils.py +323 -0
  13. flyte/_code_bundle/bundle.py +209 -0
  14. flyte/_context.py +152 -0
  15. flyte/_deploy.py +243 -0
  16. flyte/_doc.py +29 -0
  17. flyte/_docstring.py +32 -0
  18. flyte/_environment.py +84 -0
  19. flyte/_excepthook.py +37 -0
  20. flyte/_group.py +32 -0
  21. flyte/_hash.py +23 -0
  22. flyte/_image.py +762 -0
  23. flyte/_initialize.py +492 -0
  24. flyte/_interface.py +84 -0
  25. flyte/_internal/__init__.py +3 -0
  26. flyte/_internal/controllers/__init__.py +128 -0
  27. flyte/_internal/controllers/_local_controller.py +193 -0
  28. flyte/_internal/controllers/_trace.py +41 -0
  29. flyte/_internal/controllers/remote/__init__.py +60 -0
  30. flyte/_internal/controllers/remote/_action.py +146 -0
  31. flyte/_internal/controllers/remote/_client.py +47 -0
  32. flyte/_internal/controllers/remote/_controller.py +494 -0
  33. flyte/_internal/controllers/remote/_core.py +410 -0
  34. flyte/_internal/controllers/remote/_informer.py +361 -0
  35. flyte/_internal/controllers/remote/_service_protocol.py +50 -0
  36. flyte/_internal/imagebuild/__init__.py +11 -0
  37. flyte/_internal/imagebuild/docker_builder.py +427 -0
  38. flyte/_internal/imagebuild/image_builder.py +246 -0
  39. flyte/_internal/imagebuild/remote_builder.py +0 -0
  40. flyte/_internal/resolvers/__init__.py +0 -0
  41. flyte/_internal/resolvers/_task_module.py +54 -0
  42. flyte/_internal/resolvers/common.py +31 -0
  43. flyte/_internal/resolvers/default.py +28 -0
  44. flyte/_internal/runtime/__init__.py +0 -0
  45. flyte/_internal/runtime/convert.py +342 -0
  46. flyte/_internal/runtime/entrypoints.py +135 -0
  47. flyte/_internal/runtime/io.py +136 -0
  48. flyte/_internal/runtime/resources_serde.py +138 -0
  49. flyte/_internal/runtime/task_serde.py +330 -0
  50. flyte/_internal/runtime/taskrunner.py +191 -0
  51. flyte/_internal/runtime/types_serde.py +54 -0
  52. flyte/_logging.py +135 -0
  53. flyte/_map.py +215 -0
  54. flyte/_pod.py +19 -0
  55. flyte/_protos/__init__.py +0 -0
  56. flyte/_protos/common/authorization_pb2.py +66 -0
  57. flyte/_protos/common/authorization_pb2.pyi +108 -0
  58. flyte/_protos/common/authorization_pb2_grpc.py +4 -0
  59. flyte/_protos/common/identifier_pb2.py +71 -0
  60. flyte/_protos/common/identifier_pb2.pyi +82 -0
  61. flyte/_protos/common/identifier_pb2_grpc.py +4 -0
  62. flyte/_protos/common/identity_pb2.py +48 -0
  63. flyte/_protos/common/identity_pb2.pyi +72 -0
  64. flyte/_protos/common/identity_pb2_grpc.py +4 -0
  65. flyte/_protos/common/list_pb2.py +36 -0
  66. flyte/_protos/common/list_pb2.pyi +71 -0
  67. flyte/_protos/common/list_pb2_grpc.py +4 -0
  68. flyte/_protos/common/policy_pb2.py +37 -0
  69. flyte/_protos/common/policy_pb2.pyi +27 -0
  70. flyte/_protos/common/policy_pb2_grpc.py +4 -0
  71. flyte/_protos/common/role_pb2.py +37 -0
  72. flyte/_protos/common/role_pb2.pyi +53 -0
  73. flyte/_protos/common/role_pb2_grpc.py +4 -0
  74. flyte/_protos/common/runtime_version_pb2.py +28 -0
  75. flyte/_protos/common/runtime_version_pb2.pyi +24 -0
  76. flyte/_protos/common/runtime_version_pb2_grpc.py +4 -0
  77. flyte/_protos/logs/dataplane/payload_pb2.py +100 -0
  78. flyte/_protos/logs/dataplane/payload_pb2.pyi +177 -0
  79. flyte/_protos/logs/dataplane/payload_pb2_grpc.py +4 -0
  80. flyte/_protos/secret/definition_pb2.py +49 -0
  81. flyte/_protos/secret/definition_pb2.pyi +93 -0
  82. flyte/_protos/secret/definition_pb2_grpc.py +4 -0
  83. flyte/_protos/secret/payload_pb2.py +62 -0
  84. flyte/_protos/secret/payload_pb2.pyi +94 -0
  85. flyte/_protos/secret/payload_pb2_grpc.py +4 -0
  86. flyte/_protos/secret/secret_pb2.py +38 -0
  87. flyte/_protos/secret/secret_pb2.pyi +6 -0
  88. flyte/_protos/secret/secret_pb2_grpc.py +198 -0
  89. flyte/_protos/secret/secret_pb2_grpc_grpc.py +198 -0
  90. flyte/_protos/validate/validate/validate_pb2.py +76 -0
  91. flyte/_protos/workflow/common_pb2.py +27 -0
  92. flyte/_protos/workflow/common_pb2.pyi +14 -0
  93. flyte/_protos/workflow/common_pb2_grpc.py +4 -0
  94. flyte/_protos/workflow/environment_pb2.py +29 -0
  95. flyte/_protos/workflow/environment_pb2.pyi +12 -0
  96. flyte/_protos/workflow/environment_pb2_grpc.py +4 -0
  97. flyte/_protos/workflow/node_execution_service_pb2.py +26 -0
  98. flyte/_protos/workflow/node_execution_service_pb2.pyi +4 -0
  99. flyte/_protos/workflow/node_execution_service_pb2_grpc.py +32 -0
  100. flyte/_protos/workflow/queue_service_pb2.py +105 -0
  101. flyte/_protos/workflow/queue_service_pb2.pyi +146 -0
  102. flyte/_protos/workflow/queue_service_pb2_grpc.py +172 -0
  103. flyte/_protos/workflow/run_definition_pb2.py +128 -0
  104. flyte/_protos/workflow/run_definition_pb2.pyi +314 -0
  105. flyte/_protos/workflow/run_definition_pb2_grpc.py +4 -0
  106. flyte/_protos/workflow/run_logs_service_pb2.py +41 -0
  107. flyte/_protos/workflow/run_logs_service_pb2.pyi +28 -0
  108. flyte/_protos/workflow/run_logs_service_pb2_grpc.py +69 -0
  109. flyte/_protos/workflow/run_service_pb2.py +129 -0
  110. flyte/_protos/workflow/run_service_pb2.pyi +171 -0
  111. flyte/_protos/workflow/run_service_pb2_grpc.py +412 -0
  112. flyte/_protos/workflow/state_service_pb2.py +66 -0
  113. flyte/_protos/workflow/state_service_pb2.pyi +75 -0
  114. flyte/_protos/workflow/state_service_pb2_grpc.py +138 -0
  115. flyte/_protos/workflow/task_definition_pb2.py +79 -0
  116. flyte/_protos/workflow/task_definition_pb2.pyi +81 -0
  117. flyte/_protos/workflow/task_definition_pb2_grpc.py +4 -0
  118. flyte/_protos/workflow/task_service_pb2.py +60 -0
  119. flyte/_protos/workflow/task_service_pb2.pyi +59 -0
  120. flyte/_protos/workflow/task_service_pb2_grpc.py +138 -0
  121. flyte/_resources.py +226 -0
  122. flyte/_retry.py +32 -0
  123. flyte/_reusable_environment.py +25 -0
  124. flyte/_run.py +482 -0
  125. flyte/_secret.py +61 -0
  126. flyte/_task.py +449 -0
  127. flyte/_task_environment.py +183 -0
  128. flyte/_timeout.py +47 -0
  129. flyte/_tools.py +27 -0
  130. flyte/_trace.py +120 -0
  131. flyte/_utils/__init__.py +26 -0
  132. flyte/_utils/asyn.py +119 -0
  133. flyte/_utils/async_cache.py +139 -0
  134. flyte/_utils/coro_management.py +23 -0
  135. flyte/_utils/file_handling.py +72 -0
  136. flyte/_utils/helpers.py +134 -0
  137. flyte/_utils/lazy_module.py +54 -0
  138. flyte/_utils/org_discovery.py +57 -0
  139. flyte/_utils/uv_script_parser.py +49 -0
  140. flyte/_version.py +21 -0
  141. flyte/cli/__init__.py +3 -0
  142. flyte/cli/_abort.py +28 -0
  143. flyte/cli/_common.py +337 -0
  144. flyte/cli/_create.py +145 -0
  145. flyte/cli/_delete.py +23 -0
  146. flyte/cli/_deploy.py +152 -0
  147. flyte/cli/_gen.py +163 -0
  148. flyte/cli/_get.py +310 -0
  149. flyte/cli/_params.py +538 -0
  150. flyte/cli/_run.py +231 -0
  151. flyte/cli/main.py +166 -0
  152. flyte/config/__init__.py +3 -0
  153. flyte/config/_config.py +216 -0
  154. flyte/config/_internal.py +64 -0
  155. flyte/config/_reader.py +207 -0
  156. flyte/connectors/__init__.py +0 -0
  157. flyte/errors.py +172 -0
  158. flyte/extras/__init__.py +5 -0
  159. flyte/extras/_container.py +263 -0
  160. flyte/io/__init__.py +27 -0
  161. flyte/io/_dir.py +448 -0
  162. flyte/io/_file.py +467 -0
  163. flyte/io/_structured_dataset/__init__.py +129 -0
  164. flyte/io/_structured_dataset/basic_dfs.py +219 -0
  165. flyte/io/_structured_dataset/structured_dataset.py +1061 -0
  166. flyte/models.py +391 -0
  167. flyte/remote/__init__.py +26 -0
  168. flyte/remote/_client/__init__.py +0 -0
  169. flyte/remote/_client/_protocols.py +133 -0
  170. flyte/remote/_client/auth/__init__.py +12 -0
  171. flyte/remote/_client/auth/_auth_utils.py +14 -0
  172. flyte/remote/_client/auth/_authenticators/__init__.py +0 -0
  173. flyte/remote/_client/auth/_authenticators/base.py +397 -0
  174. flyte/remote/_client/auth/_authenticators/client_credentials.py +73 -0
  175. flyte/remote/_client/auth/_authenticators/device_code.py +118 -0
  176. flyte/remote/_client/auth/_authenticators/external_command.py +79 -0
  177. flyte/remote/_client/auth/_authenticators/factory.py +200 -0
  178. flyte/remote/_client/auth/_authenticators/pkce.py +516 -0
  179. flyte/remote/_client/auth/_channel.py +215 -0
  180. flyte/remote/_client/auth/_client_config.py +83 -0
  181. flyte/remote/_client/auth/_default_html.py +32 -0
  182. flyte/remote/_client/auth/_grpc_utils/__init__.py +0 -0
  183. flyte/remote/_client/auth/_grpc_utils/auth_interceptor.py +288 -0
  184. flyte/remote/_client/auth/_grpc_utils/default_metadata_interceptor.py +151 -0
  185. flyte/remote/_client/auth/_keyring.py +143 -0
  186. flyte/remote/_client/auth/_token_client.py +260 -0
  187. flyte/remote/_client/auth/errors.py +16 -0
  188. flyte/remote/_client/controlplane.py +95 -0
  189. flyte/remote/_console.py +18 -0
  190. flyte/remote/_data.py +159 -0
  191. flyte/remote/_logs.py +176 -0
  192. flyte/remote/_project.py +85 -0
  193. flyte/remote/_run.py +970 -0
  194. flyte/remote/_secret.py +132 -0
  195. flyte/remote/_task.py +391 -0
  196. flyte/report/__init__.py +3 -0
  197. flyte/report/_report.py +178 -0
  198. flyte/report/_template.html +124 -0
  199. flyte/storage/__init__.py +29 -0
  200. flyte/storage/_config.py +233 -0
  201. flyte/storage/_remote_fs.py +34 -0
  202. flyte/storage/_storage.py +271 -0
  203. flyte/storage/_utils.py +5 -0
  204. flyte/syncify/__init__.py +56 -0
  205. flyte/syncify/_api.py +371 -0
  206. flyte/types/__init__.py +36 -0
  207. flyte/types/_interface.py +40 -0
  208. flyte/types/_pickle.py +118 -0
  209. flyte/types/_renderer.py +162 -0
  210. flyte/types/_string_literals.py +120 -0
  211. flyte/types/_type_engine.py +2287 -0
  212. flyte/types/_utils.py +80 -0
  213. flyte-0.2.0a0.dist-info/METADATA +249 -0
  214. flyte-0.2.0a0.dist-info/RECORD +218 -0
  215. {flyte-0.1.0.dist-info → flyte-0.2.0a0.dist-info}/WHEEL +2 -1
  216. flyte-0.2.0a0.dist-info/entry_points.txt +3 -0
  217. flyte-0.2.0a0.dist-info/top_level.txt +1 -0
  218. flyte-0.1.0.dist-info/METADATA +0 -6
  219. flyte-0.1.0.dist-info/RECORD +0 -5
@@ -0,0 +1,412 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+
5
+ from flyte._protos.workflow import run_service_pb2 as workflow_dot_run__service__pb2
6
+
7
+
8
+ class RunServiceStub(object):
9
+ """RunService provides an interface for managing runs.
10
+ """
11
+
12
+ def __init__(self, channel):
13
+ """Constructor.
14
+
15
+ Args:
16
+ channel: A grpc.Channel.
17
+ """
18
+ self.CreateRun = channel.unary_unary(
19
+ '/cloudidl.workflow.RunService/CreateRun',
20
+ request_serializer=workflow_dot_run__service__pb2.CreateRunRequest.SerializeToString,
21
+ response_deserializer=workflow_dot_run__service__pb2.CreateRunResponse.FromString,
22
+ )
23
+ self.AbortRun = channel.unary_unary(
24
+ '/cloudidl.workflow.RunService/AbortRun',
25
+ request_serializer=workflow_dot_run__service__pb2.AbortRunRequest.SerializeToString,
26
+ response_deserializer=workflow_dot_run__service__pb2.AbortRunResponse.FromString,
27
+ )
28
+ self.GetRunDetails = channel.unary_unary(
29
+ '/cloudidl.workflow.RunService/GetRunDetails',
30
+ request_serializer=workflow_dot_run__service__pb2.GetRunDetailsRequest.SerializeToString,
31
+ response_deserializer=workflow_dot_run__service__pb2.GetRunDetailsResponse.FromString,
32
+ )
33
+ self.WatchRunDetails = channel.unary_stream(
34
+ '/cloudidl.workflow.RunService/WatchRunDetails',
35
+ request_serializer=workflow_dot_run__service__pb2.WatchRunDetailsRequest.SerializeToString,
36
+ response_deserializer=workflow_dot_run__service__pb2.WatchRunDetailsResponse.FromString,
37
+ )
38
+ self.GetActionDetails = channel.unary_unary(
39
+ '/cloudidl.workflow.RunService/GetActionDetails',
40
+ request_serializer=workflow_dot_run__service__pb2.GetActionDetailsRequest.SerializeToString,
41
+ response_deserializer=workflow_dot_run__service__pb2.GetActionDetailsResponse.FromString,
42
+ )
43
+ self.WatchActionDetails = channel.unary_stream(
44
+ '/cloudidl.workflow.RunService/WatchActionDetails',
45
+ request_serializer=workflow_dot_run__service__pb2.WatchActionDetailsRequest.SerializeToString,
46
+ response_deserializer=workflow_dot_run__service__pb2.WatchActionDetailsResponse.FromString,
47
+ )
48
+ self.GetActionData = channel.unary_unary(
49
+ '/cloudidl.workflow.RunService/GetActionData',
50
+ request_serializer=workflow_dot_run__service__pb2.GetActionDataRequest.SerializeToString,
51
+ response_deserializer=workflow_dot_run__service__pb2.GetActionDataResponse.FromString,
52
+ )
53
+ self.ListRuns = channel.unary_unary(
54
+ '/cloudidl.workflow.RunService/ListRuns',
55
+ request_serializer=workflow_dot_run__service__pb2.ListRunsRequest.SerializeToString,
56
+ response_deserializer=workflow_dot_run__service__pb2.ListRunsResponse.FromString,
57
+ )
58
+ self.WatchRuns = channel.unary_stream(
59
+ '/cloudidl.workflow.RunService/WatchRuns',
60
+ request_serializer=workflow_dot_run__service__pb2.WatchRunsRequest.SerializeToString,
61
+ response_deserializer=workflow_dot_run__service__pb2.WatchRunsResponse.FromString,
62
+ )
63
+ self.ListActions = channel.unary_unary(
64
+ '/cloudidl.workflow.RunService/ListActions',
65
+ request_serializer=workflow_dot_run__service__pb2.ListActionsRequest.SerializeToString,
66
+ response_deserializer=workflow_dot_run__service__pb2.ListActionsResponse.FromString,
67
+ )
68
+ self.WatchActions = channel.unary_stream(
69
+ '/cloudidl.workflow.RunService/WatchActions',
70
+ request_serializer=workflow_dot_run__service__pb2.WatchActionsRequest.SerializeToString,
71
+ response_deserializer=workflow_dot_run__service__pb2.WatchActionsResponse.FromString,
72
+ )
73
+
74
+
75
+ class RunServiceServicer(object):
76
+ """RunService provides an interface for managing runs.
77
+ """
78
+
79
+ def CreateRun(self, request, context):
80
+ """Create a new run of the given task.
81
+ """
82
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
83
+ context.set_details('Method not implemented!')
84
+ raise NotImplementedError('Method not implemented!')
85
+
86
+ def AbortRun(self, request, context):
87
+ """Abort a run.
88
+ """
89
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
90
+ context.set_details('Method not implemented!')
91
+ raise NotImplementedError('Method not implemented!')
92
+
93
+ def GetRunDetails(self, request, context):
94
+ """Get detailed information about a run.
95
+ """
96
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
97
+ context.set_details('Method not implemented!')
98
+ raise NotImplementedError('Method not implemented!')
99
+
100
+ def WatchRunDetails(self, request, context):
101
+ """Stream detailed information updates about a run. The call will terminate when the run reaches a terminal phase.
102
+ """
103
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
104
+ context.set_details('Method not implemented!')
105
+ raise NotImplementedError('Method not implemented!')
106
+
107
+ def GetActionDetails(self, request, context):
108
+ """Get detailed information about an action.
109
+ """
110
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
111
+ context.set_details('Method not implemented!')
112
+ raise NotImplementedError('Method not implemented!')
113
+
114
+ def WatchActionDetails(self, request, context):
115
+ """Stream detailed information updates about an action. The call will terminate when the action reaches a terminal phase.
116
+ """
117
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
118
+ context.set_details('Method not implemented!')
119
+ raise NotImplementedError('Method not implemented!')
120
+
121
+ def GetActionData(self, request, context):
122
+ """Get input and output for an action.
123
+ """
124
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
125
+ context.set_details('Method not implemented!')
126
+ raise NotImplementedError('Method not implemented!')
127
+
128
+ def ListRuns(self, request, context):
129
+ """List runs based on the provided filter criteria.
130
+ """
131
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
132
+ context.set_details('Method not implemented!')
133
+ raise NotImplementedError('Method not implemented!')
134
+
135
+ def WatchRuns(self, request, context):
136
+ """Stream updates for runs based on the provided filter criteria. Responses may include newly discovered
137
+ runs or updates to existing ones from the point of invocation.
138
+ """
139
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
140
+ context.set_details('Method not implemented!')
141
+ raise NotImplementedError('Method not implemented!')
142
+
143
+ def ListActions(self, request, context):
144
+ """List all actions for a given run.
145
+ """
146
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
147
+ context.set_details('Method not implemented!')
148
+ raise NotImplementedError('Method not implemented!')
149
+
150
+ def WatchActions(self, request, context):
151
+ """Stream updates for actions given a run. Responses may include newly discovered nested runs or updates
152
+ to existing ones from the point of invocation.
153
+ """
154
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
155
+ context.set_details('Method not implemented!')
156
+ raise NotImplementedError('Method not implemented!')
157
+
158
+
159
+ def add_RunServiceServicer_to_server(servicer, server):
160
+ rpc_method_handlers = {
161
+ 'CreateRun': grpc.unary_unary_rpc_method_handler(
162
+ servicer.CreateRun,
163
+ request_deserializer=workflow_dot_run__service__pb2.CreateRunRequest.FromString,
164
+ response_serializer=workflow_dot_run__service__pb2.CreateRunResponse.SerializeToString,
165
+ ),
166
+ 'AbortRun': grpc.unary_unary_rpc_method_handler(
167
+ servicer.AbortRun,
168
+ request_deserializer=workflow_dot_run__service__pb2.AbortRunRequest.FromString,
169
+ response_serializer=workflow_dot_run__service__pb2.AbortRunResponse.SerializeToString,
170
+ ),
171
+ 'GetRunDetails': grpc.unary_unary_rpc_method_handler(
172
+ servicer.GetRunDetails,
173
+ request_deserializer=workflow_dot_run__service__pb2.GetRunDetailsRequest.FromString,
174
+ response_serializer=workflow_dot_run__service__pb2.GetRunDetailsResponse.SerializeToString,
175
+ ),
176
+ 'WatchRunDetails': grpc.unary_stream_rpc_method_handler(
177
+ servicer.WatchRunDetails,
178
+ request_deserializer=workflow_dot_run__service__pb2.WatchRunDetailsRequest.FromString,
179
+ response_serializer=workflow_dot_run__service__pb2.WatchRunDetailsResponse.SerializeToString,
180
+ ),
181
+ 'GetActionDetails': grpc.unary_unary_rpc_method_handler(
182
+ servicer.GetActionDetails,
183
+ request_deserializer=workflow_dot_run__service__pb2.GetActionDetailsRequest.FromString,
184
+ response_serializer=workflow_dot_run__service__pb2.GetActionDetailsResponse.SerializeToString,
185
+ ),
186
+ 'WatchActionDetails': grpc.unary_stream_rpc_method_handler(
187
+ servicer.WatchActionDetails,
188
+ request_deserializer=workflow_dot_run__service__pb2.WatchActionDetailsRequest.FromString,
189
+ response_serializer=workflow_dot_run__service__pb2.WatchActionDetailsResponse.SerializeToString,
190
+ ),
191
+ 'GetActionData': grpc.unary_unary_rpc_method_handler(
192
+ servicer.GetActionData,
193
+ request_deserializer=workflow_dot_run__service__pb2.GetActionDataRequest.FromString,
194
+ response_serializer=workflow_dot_run__service__pb2.GetActionDataResponse.SerializeToString,
195
+ ),
196
+ 'ListRuns': grpc.unary_unary_rpc_method_handler(
197
+ servicer.ListRuns,
198
+ request_deserializer=workflow_dot_run__service__pb2.ListRunsRequest.FromString,
199
+ response_serializer=workflow_dot_run__service__pb2.ListRunsResponse.SerializeToString,
200
+ ),
201
+ 'WatchRuns': grpc.unary_stream_rpc_method_handler(
202
+ servicer.WatchRuns,
203
+ request_deserializer=workflow_dot_run__service__pb2.WatchRunsRequest.FromString,
204
+ response_serializer=workflow_dot_run__service__pb2.WatchRunsResponse.SerializeToString,
205
+ ),
206
+ 'ListActions': grpc.unary_unary_rpc_method_handler(
207
+ servicer.ListActions,
208
+ request_deserializer=workflow_dot_run__service__pb2.ListActionsRequest.FromString,
209
+ response_serializer=workflow_dot_run__service__pb2.ListActionsResponse.SerializeToString,
210
+ ),
211
+ 'WatchActions': grpc.unary_stream_rpc_method_handler(
212
+ servicer.WatchActions,
213
+ request_deserializer=workflow_dot_run__service__pb2.WatchActionsRequest.FromString,
214
+ response_serializer=workflow_dot_run__service__pb2.WatchActionsResponse.SerializeToString,
215
+ ),
216
+ }
217
+ generic_handler = grpc.method_handlers_generic_handler(
218
+ 'cloudidl.workflow.RunService', rpc_method_handlers)
219
+ server.add_generic_rpc_handlers((generic_handler,))
220
+
221
+
222
+ # This class is part of an EXPERIMENTAL API.
223
+ class RunService(object):
224
+ """RunService provides an interface for managing runs.
225
+ """
226
+
227
+ @staticmethod
228
+ def CreateRun(request,
229
+ target,
230
+ options=(),
231
+ channel_credentials=None,
232
+ call_credentials=None,
233
+ insecure=False,
234
+ compression=None,
235
+ wait_for_ready=None,
236
+ timeout=None,
237
+ metadata=None):
238
+ return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.RunService/CreateRun',
239
+ workflow_dot_run__service__pb2.CreateRunRequest.SerializeToString,
240
+ workflow_dot_run__service__pb2.CreateRunResponse.FromString,
241
+ options, channel_credentials,
242
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
243
+
244
+ @staticmethod
245
+ def AbortRun(request,
246
+ target,
247
+ options=(),
248
+ channel_credentials=None,
249
+ call_credentials=None,
250
+ insecure=False,
251
+ compression=None,
252
+ wait_for_ready=None,
253
+ timeout=None,
254
+ metadata=None):
255
+ return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.RunService/AbortRun',
256
+ workflow_dot_run__service__pb2.AbortRunRequest.SerializeToString,
257
+ workflow_dot_run__service__pb2.AbortRunResponse.FromString,
258
+ options, channel_credentials,
259
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
260
+
261
+ @staticmethod
262
+ def GetRunDetails(request,
263
+ target,
264
+ options=(),
265
+ channel_credentials=None,
266
+ call_credentials=None,
267
+ insecure=False,
268
+ compression=None,
269
+ wait_for_ready=None,
270
+ timeout=None,
271
+ metadata=None):
272
+ return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.RunService/GetRunDetails',
273
+ workflow_dot_run__service__pb2.GetRunDetailsRequest.SerializeToString,
274
+ workflow_dot_run__service__pb2.GetRunDetailsResponse.FromString,
275
+ options, channel_credentials,
276
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
277
+
278
+ @staticmethod
279
+ def WatchRunDetails(request,
280
+ target,
281
+ options=(),
282
+ channel_credentials=None,
283
+ call_credentials=None,
284
+ insecure=False,
285
+ compression=None,
286
+ wait_for_ready=None,
287
+ timeout=None,
288
+ metadata=None):
289
+ return grpc.experimental.unary_stream(request, target, '/cloudidl.workflow.RunService/WatchRunDetails',
290
+ workflow_dot_run__service__pb2.WatchRunDetailsRequest.SerializeToString,
291
+ workflow_dot_run__service__pb2.WatchRunDetailsResponse.FromString,
292
+ options, channel_credentials,
293
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
294
+
295
+ @staticmethod
296
+ def GetActionDetails(request,
297
+ target,
298
+ options=(),
299
+ channel_credentials=None,
300
+ call_credentials=None,
301
+ insecure=False,
302
+ compression=None,
303
+ wait_for_ready=None,
304
+ timeout=None,
305
+ metadata=None):
306
+ return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.RunService/GetActionDetails',
307
+ workflow_dot_run__service__pb2.GetActionDetailsRequest.SerializeToString,
308
+ workflow_dot_run__service__pb2.GetActionDetailsResponse.FromString,
309
+ options, channel_credentials,
310
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
311
+
312
+ @staticmethod
313
+ def WatchActionDetails(request,
314
+ target,
315
+ options=(),
316
+ channel_credentials=None,
317
+ call_credentials=None,
318
+ insecure=False,
319
+ compression=None,
320
+ wait_for_ready=None,
321
+ timeout=None,
322
+ metadata=None):
323
+ return grpc.experimental.unary_stream(request, target, '/cloudidl.workflow.RunService/WatchActionDetails',
324
+ workflow_dot_run__service__pb2.WatchActionDetailsRequest.SerializeToString,
325
+ workflow_dot_run__service__pb2.WatchActionDetailsResponse.FromString,
326
+ options, channel_credentials,
327
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
328
+
329
+ @staticmethod
330
+ def GetActionData(request,
331
+ target,
332
+ options=(),
333
+ channel_credentials=None,
334
+ call_credentials=None,
335
+ insecure=False,
336
+ compression=None,
337
+ wait_for_ready=None,
338
+ timeout=None,
339
+ metadata=None):
340
+ return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.RunService/GetActionData',
341
+ workflow_dot_run__service__pb2.GetActionDataRequest.SerializeToString,
342
+ workflow_dot_run__service__pb2.GetActionDataResponse.FromString,
343
+ options, channel_credentials,
344
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
345
+
346
+ @staticmethod
347
+ def ListRuns(request,
348
+ target,
349
+ options=(),
350
+ channel_credentials=None,
351
+ call_credentials=None,
352
+ insecure=False,
353
+ compression=None,
354
+ wait_for_ready=None,
355
+ timeout=None,
356
+ metadata=None):
357
+ return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.RunService/ListRuns',
358
+ workflow_dot_run__service__pb2.ListRunsRequest.SerializeToString,
359
+ workflow_dot_run__service__pb2.ListRunsResponse.FromString,
360
+ options, channel_credentials,
361
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
362
+
363
+ @staticmethod
364
+ def WatchRuns(request,
365
+ target,
366
+ options=(),
367
+ channel_credentials=None,
368
+ call_credentials=None,
369
+ insecure=False,
370
+ compression=None,
371
+ wait_for_ready=None,
372
+ timeout=None,
373
+ metadata=None):
374
+ return grpc.experimental.unary_stream(request, target, '/cloudidl.workflow.RunService/WatchRuns',
375
+ workflow_dot_run__service__pb2.WatchRunsRequest.SerializeToString,
376
+ workflow_dot_run__service__pb2.WatchRunsResponse.FromString,
377
+ options, channel_credentials,
378
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
379
+
380
+ @staticmethod
381
+ def ListActions(request,
382
+ target,
383
+ options=(),
384
+ channel_credentials=None,
385
+ call_credentials=None,
386
+ insecure=False,
387
+ compression=None,
388
+ wait_for_ready=None,
389
+ timeout=None,
390
+ metadata=None):
391
+ return grpc.experimental.unary_unary(request, target, '/cloudidl.workflow.RunService/ListActions',
392
+ workflow_dot_run__service__pb2.ListActionsRequest.SerializeToString,
393
+ workflow_dot_run__service__pb2.ListActionsResponse.FromString,
394
+ options, channel_credentials,
395
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
396
+
397
+ @staticmethod
398
+ def WatchActions(request,
399
+ target,
400
+ options=(),
401
+ channel_credentials=None,
402
+ call_credentials=None,
403
+ insecure=False,
404
+ compression=None,
405
+ wait_for_ready=None,
406
+ timeout=None,
407
+ metadata=None):
408
+ return grpc.experimental.unary_stream(request, target, '/cloudidl.workflow.RunService/WatchActions',
409
+ workflow_dot_run__service__pb2.WatchActionsRequest.SerializeToString,
410
+ workflow_dot_run__service__pb2.WatchActionsResponse.FromString,
411
+ options, channel_credentials,
412
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@@ -0,0 +1,66 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: workflow/state_service.proto
4
+ """Generated protocol buffer code."""
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import descriptor_pool as _descriptor_pool
7
+ from google.protobuf import symbol_database as _symbol_database
8
+ from google.protobuf.internal import builder as _builder
9
+ # @@protoc_insertion_point(imports)
10
+
11
+ _sym_db = _symbol_database.Default()
12
+
13
+
14
+ from flyteidl.core import execution_pb2 as flyteidl_dot_core_dot_execution__pb2
15
+ from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2
16
+ from flyte._protos.validate.validate import validate_pb2 as validate_dot_validate__pb2
17
+ from flyte._protos.workflow import run_definition_pb2 as workflow_dot_run__definition__pb2
18
+
19
+
20
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cworkflow/state_service.proto\x12\x11\x63loudidl.workflow\x1a\x1d\x66lyteidl/core/execution.proto\x1a\x17google/rpc/status.proto\x1a\x17validate/validate.proto\x1a\x1dworkflow/run_definition.proto\"\xc1\x01\n\nPutRequest\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12\x31\n\x12parent_action_name\x18\x02 \x01(\tH\x00R\x10parentActionName\x88\x01\x01\x12\x1d\n\x05state\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x05stateB\x15\n\x13_parent_action_name\"\x8f\x01\n\x0bPutResponse\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12\x34\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06status\"X\n\nGetRequest\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\"\xae\x01\n\x0bGetResponse\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12\x34\n\x06status\x18\x02 \x01(\x0b\x32\x12.google.rpc.StatusB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x06status\x12\x1d\n\x05state\x18\x03 \x01(\tB\x07\xfa\x42\x04r\x02\x10\x01R\x05state\"n\n\x0cWatchRequest\x12O\n\x10parent_action_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierH\x00R\x0eparentActionIdB\r\n\x06\x66ilter\x12\x03\xf8\x42\x01\"\xb0\x01\n\rWatchResponse\x12\x46\n\raction_update\x18\x01 \x01(\x0b\x32\x1f.cloudidl.workflow.ActionUpdateH\x00R\x0c\x61\x63tionUpdate\x12L\n\x0f\x63ontrol_message\x18\x02 \x01(\x0b\x32!.cloudidl.workflow.ControlMessageH\x00R\x0e\x63ontrolMessageB\t\n\x07message\",\n\x0e\x43ontrolMessage\x12\x1a\n\x08sentinel\x18\x01 \x01(\x08R\x08sentinel\"\xed\x01\n\x0c\x41\x63tionUpdate\x12J\n\taction_id\x18\x01 \x01(\x0b\x32#.cloudidl.workflow.ActionIdentifierB\x08\xfa\x42\x05\x8a\x01\x02\x10\x01R\x08\x61\x63tionId\x12.\n\x05phase\x18\x02 \x01(\x0e\x32\x18.cloudidl.workflow.PhaseR\x05phase\x12\x38\n\x05\x65rror\x18\x03 \x01(\x0b\x32\x1d.flyteidl.core.ExecutionErrorH\x00R\x05\x65rror\x88\x01\x01\x12\x1d\n\noutput_uri\x18\x04 \x01(\tR\toutputUriB\x08\n\x06_error2\xf6\x01\n\x0cStateService\x12J\n\x03Put\x12\x1d.cloudidl.workflow.PutRequest\x1a\x1e.cloudidl.workflow.PutResponse\"\x00(\x01\x30\x01\x12J\n\x03Get\x12\x1d.cloudidl.workflow.GetRequest\x1a\x1e.cloudidl.workflow.GetResponse\"\x00(\x01\x30\x01\x12N\n\x05Watch\x12\x1f.cloudidl.workflow.WatchRequest\x1a .cloudidl.workflow.WatchResponse\"\x00\x30\x01\x42\xbe\x01\n\x15\x63om.cloudidl.workflowB\x11StateServiceProtoH\x02P\x01Z+github.com/unionai/cloud/gen/pb-go/workflow\xa2\x02\x03\x43WX\xaa\x02\x11\x43loudidl.Workflow\xca\x02\x11\x43loudidl\\Workflow\xe2\x02\x1d\x43loudidl\\Workflow\\GPBMetadata\xea\x02\x12\x43loudidl::Workflowb\x06proto3')
21
+
22
+ _globals = globals()
23
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
24
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'workflow.state_service_pb2', _globals)
25
+ if _descriptor._USE_C_DESCRIPTORS == False:
26
+ DESCRIPTOR._options = None
27
+ DESCRIPTOR._serialized_options = b'\n\025com.cloudidl.workflowB\021StateServiceProtoH\002P\001Z+github.com/unionai/cloud/gen/pb-go/workflow\242\002\003CWX\252\002\021Cloudidl.Workflow\312\002\021Cloudidl\\Workflow\342\002\035Cloudidl\\Workflow\\GPBMetadata\352\002\022Cloudidl::Workflow'
28
+ _PUTREQUEST.fields_by_name['action_id']._options = None
29
+ _PUTREQUEST.fields_by_name['action_id']._serialized_options = b'\372B\005\212\001\002\020\001'
30
+ _PUTREQUEST.fields_by_name['state']._options = None
31
+ _PUTREQUEST.fields_by_name['state']._serialized_options = b'\372B\004r\002\020\001'
32
+ _PUTRESPONSE.fields_by_name['action_id']._options = None
33
+ _PUTRESPONSE.fields_by_name['action_id']._serialized_options = b'\372B\005\212\001\002\020\001'
34
+ _PUTRESPONSE.fields_by_name['status']._options = None
35
+ _PUTRESPONSE.fields_by_name['status']._serialized_options = b'\372B\005\212\001\002\020\001'
36
+ _GETREQUEST.fields_by_name['action_id']._options = None
37
+ _GETREQUEST.fields_by_name['action_id']._serialized_options = b'\372B\005\212\001\002\020\001'
38
+ _GETRESPONSE.fields_by_name['action_id']._options = None
39
+ _GETRESPONSE.fields_by_name['action_id']._serialized_options = b'\372B\005\212\001\002\020\001'
40
+ _GETRESPONSE.fields_by_name['status']._options = None
41
+ _GETRESPONSE.fields_by_name['status']._serialized_options = b'\372B\005\212\001\002\020\001'
42
+ _GETRESPONSE.fields_by_name['state']._options = None
43
+ _GETRESPONSE.fields_by_name['state']._serialized_options = b'\372B\004r\002\020\001'
44
+ _WATCHREQUEST.oneofs_by_name['filter']._options = None
45
+ _WATCHREQUEST.oneofs_by_name['filter']._serialized_options = b'\370B\001'
46
+ _ACTIONUPDATE.fields_by_name['action_id']._options = None
47
+ _ACTIONUPDATE.fields_by_name['action_id']._serialized_options = b'\372B\005\212\001\002\020\001'
48
+ _globals['_PUTREQUEST']._serialized_start=164
49
+ _globals['_PUTREQUEST']._serialized_end=357
50
+ _globals['_PUTRESPONSE']._serialized_start=360
51
+ _globals['_PUTRESPONSE']._serialized_end=503
52
+ _globals['_GETREQUEST']._serialized_start=505
53
+ _globals['_GETREQUEST']._serialized_end=593
54
+ _globals['_GETRESPONSE']._serialized_start=596
55
+ _globals['_GETRESPONSE']._serialized_end=770
56
+ _globals['_WATCHREQUEST']._serialized_start=772
57
+ _globals['_WATCHREQUEST']._serialized_end=882
58
+ _globals['_WATCHRESPONSE']._serialized_start=885
59
+ _globals['_WATCHRESPONSE']._serialized_end=1061
60
+ _globals['_CONTROLMESSAGE']._serialized_start=1063
61
+ _globals['_CONTROLMESSAGE']._serialized_end=1107
62
+ _globals['_ACTIONUPDATE']._serialized_start=1110
63
+ _globals['_ACTIONUPDATE']._serialized_end=1347
64
+ _globals['_STATESERVICE']._serialized_start=1350
65
+ _globals['_STATESERVICE']._serialized_end=1596
66
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,75 @@
1
+ from flyteidl.core import execution_pb2 as _execution_pb2
2
+ from google.rpc import status_pb2 as _status_pb2
3
+ from flyte._protos.validate.validate import validate_pb2 as _validate_pb2
4
+ from flyte._protos.workflow import run_definition_pb2 as _run_definition_pb2
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import message as _message
7
+ from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
8
+
9
+ DESCRIPTOR: _descriptor.FileDescriptor
10
+
11
+ class PutRequest(_message.Message):
12
+ __slots__ = ["action_id", "parent_action_name", "state"]
13
+ ACTION_ID_FIELD_NUMBER: _ClassVar[int]
14
+ PARENT_ACTION_NAME_FIELD_NUMBER: _ClassVar[int]
15
+ STATE_FIELD_NUMBER: _ClassVar[int]
16
+ action_id: _run_definition_pb2.ActionIdentifier
17
+ parent_action_name: str
18
+ state: str
19
+ def __init__(self, action_id: _Optional[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]] = ..., parent_action_name: _Optional[str] = ..., state: _Optional[str] = ...) -> None: ...
20
+
21
+ class PutResponse(_message.Message):
22
+ __slots__ = ["action_id", "status"]
23
+ ACTION_ID_FIELD_NUMBER: _ClassVar[int]
24
+ STATUS_FIELD_NUMBER: _ClassVar[int]
25
+ action_id: _run_definition_pb2.ActionIdentifier
26
+ status: _status_pb2.Status
27
+ def __init__(self, action_id: _Optional[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]] = ..., status: _Optional[_Union[_status_pb2.Status, _Mapping]] = ...) -> None: ...
28
+
29
+ class GetRequest(_message.Message):
30
+ __slots__ = ["action_id"]
31
+ ACTION_ID_FIELD_NUMBER: _ClassVar[int]
32
+ action_id: _run_definition_pb2.ActionIdentifier
33
+ def __init__(self, action_id: _Optional[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]] = ...) -> None: ...
34
+
35
+ class GetResponse(_message.Message):
36
+ __slots__ = ["action_id", "status", "state"]
37
+ ACTION_ID_FIELD_NUMBER: _ClassVar[int]
38
+ STATUS_FIELD_NUMBER: _ClassVar[int]
39
+ STATE_FIELD_NUMBER: _ClassVar[int]
40
+ action_id: _run_definition_pb2.ActionIdentifier
41
+ status: _status_pb2.Status
42
+ state: str
43
+ def __init__(self, action_id: _Optional[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]] = ..., status: _Optional[_Union[_status_pb2.Status, _Mapping]] = ..., state: _Optional[str] = ...) -> None: ...
44
+
45
+ class WatchRequest(_message.Message):
46
+ __slots__ = ["parent_action_id"]
47
+ PARENT_ACTION_ID_FIELD_NUMBER: _ClassVar[int]
48
+ parent_action_id: _run_definition_pb2.ActionIdentifier
49
+ def __init__(self, parent_action_id: _Optional[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]] = ...) -> None: ...
50
+
51
+ class WatchResponse(_message.Message):
52
+ __slots__ = ["action_update", "control_message"]
53
+ ACTION_UPDATE_FIELD_NUMBER: _ClassVar[int]
54
+ CONTROL_MESSAGE_FIELD_NUMBER: _ClassVar[int]
55
+ action_update: ActionUpdate
56
+ control_message: ControlMessage
57
+ def __init__(self, action_update: _Optional[_Union[ActionUpdate, _Mapping]] = ..., control_message: _Optional[_Union[ControlMessage, _Mapping]] = ...) -> None: ...
58
+
59
+ class ControlMessage(_message.Message):
60
+ __slots__ = ["sentinel"]
61
+ SENTINEL_FIELD_NUMBER: _ClassVar[int]
62
+ sentinel: bool
63
+ def __init__(self, sentinel: bool = ...) -> None: ...
64
+
65
+ class ActionUpdate(_message.Message):
66
+ __slots__ = ["action_id", "phase", "error", "output_uri"]
67
+ ACTION_ID_FIELD_NUMBER: _ClassVar[int]
68
+ PHASE_FIELD_NUMBER: _ClassVar[int]
69
+ ERROR_FIELD_NUMBER: _ClassVar[int]
70
+ OUTPUT_URI_FIELD_NUMBER: _ClassVar[int]
71
+ action_id: _run_definition_pb2.ActionIdentifier
72
+ phase: _run_definition_pb2.Phase
73
+ error: _execution_pb2.ExecutionError
74
+ output_uri: str
75
+ def __init__(self, action_id: _Optional[_Union[_run_definition_pb2.ActionIdentifier, _Mapping]] = ..., phase: _Optional[_Union[_run_definition_pb2.Phase, str]] = ..., error: _Optional[_Union[_execution_pb2.ExecutionError, _Mapping]] = ..., output_uri: _Optional[str] = ...) -> None: ...