ob-metaflow-stubs 6.0.3.117__py2.py3-none-any.whl → 6.0.3.119__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. metaflow-stubs/__init__.pyi +318 -2738
  2. metaflow-stubs/cards.pyi +19 -473
  3. metaflow-stubs/cli.pyi +17 -81
  4. metaflow-stubs/client/__init__.pyi +19 -1113
  5. metaflow-stubs/client/core.pyi +18 -158
  6. metaflow-stubs/client/filecache.pyi +8 -12
  7. metaflow-stubs/clone_util.pyi +6 -26
  8. metaflow-stubs/events.pyi +7 -6
  9. metaflow-stubs/exception.pyi +8 -6
  10. metaflow-stubs/flowspec.pyi +20 -104
  11. metaflow-stubs/generated_for.txt +1 -1
  12. metaflow-stubs/includefile.pyi +16 -564
  13. metaflow-stubs/info_file.pyi +6 -5
  14. metaflow-stubs/metadata_provider/__init__.pyi +16 -0
  15. metaflow-stubs/metadata_provider/heartbeat.pyi +34 -0
  16. metaflow-stubs/{metadata → metadata_provider}/metadata.pyi +10 -22
  17. metaflow-stubs/metadata_provider/util.pyi +19 -0
  18. metaflow-stubs/metaflow_config.pyi +8 -13
  19. metaflow-stubs/metaflow_current.pyi +45 -44
  20. metaflow-stubs/mf_extensions/__init__.pyi +6 -0
  21. metaflow-stubs/mf_extensions/obcheckpoint/__init__.pyi +6 -0
  22. metaflow-stubs/mf_extensions/obcheckpoint/plugins/__init__.pyi +6 -0
  23. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/__init__.pyi +6 -0
  24. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/__init__.pyi +6 -0
  25. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +129 -0
  26. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +26 -0
  27. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi +156 -0
  28. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/exceptions.pyi +25 -0
  29. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +111 -0
  30. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +6 -0
  31. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +188 -0
  32. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +30 -0
  33. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/task_utils.pyi +28 -0
  34. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi +19 -0
  35. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi +115 -0
  36. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/exceptions.pyi +40 -0
  37. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +6 -0
  38. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +71 -0
  39. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +56 -0
  40. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +67 -0
  41. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +49 -0
  42. metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +6 -0
  43. metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +6 -0
  44. metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +130 -0
  45. metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +42 -0
  46. metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +6 -0
  47. metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +17 -0
  48. metaflow-stubs/mflog/__init__.pyi +6 -0
  49. metaflow-stubs/mflog/mflog.pyi +52 -5
  50. metaflow-stubs/multicore_utils.pyi +6 -5
  51. metaflow-stubs/parameters.pyi +13 -23
  52. metaflow-stubs/plugins/__init__.pyi +52 -165
  53. metaflow-stubs/plugins/airflow/__init__.pyi +9 -5
  54. metaflow-stubs/plugins/airflow/airflow_utils.pyi +7 -6
  55. metaflow-stubs/plugins/airflow/exception.pyi +7 -11
  56. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +10 -97
  57. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +9 -30
  58. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +9 -40
  59. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +9 -40
  60. metaflow-stubs/plugins/argo/__init__.pyi +12 -5
  61. metaflow-stubs/plugins/argo/argo_client.pyi +8 -26
  62. metaflow-stubs/plugins/argo/argo_events.pyi +7 -11
  63. metaflow-stubs/plugins/argo/argo_workflows.pyi +17 -129
  64. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +22 -460
  65. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +11 -403
  66. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +63 -448
  67. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +165 -0
  68. metaflow-stubs/plugins/aws/__init__.pyi +11 -5
  69. metaflow-stubs/plugins/aws/aws_client.pyi +6 -5
  70. metaflow-stubs/plugins/aws/aws_utils.pyi +6 -11
  71. metaflow-stubs/plugins/aws/batch/__init__.pyi +9 -5
  72. metaflow-stubs/plugins/aws/batch/batch.pyi +10 -55
  73. metaflow-stubs/plugins/aws/batch/batch_client.pyi +7 -11
  74. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +15 -140
  75. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +7 -5
  76. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +10 -21
  77. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +9 -5
  78. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +6 -5
  79. metaflow-stubs/plugins/aws/step_functions/production_token.pyi +6 -5
  80. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +7 -5
  81. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +11 -65
  82. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +6 -5
  83. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +52 -292
  84. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +127 -0
  85. metaflow-stubs/plugins/azure/__init__.pyi +12 -7
  86. metaflow-stubs/plugins/azure/azure_credential.pyi +6 -5
  87. metaflow-stubs/plugins/azure/azure_exceptions.pyi +7 -11
  88. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +11 -24
  89. metaflow-stubs/plugins/azure/azure_utils.pyi +11 -29
  90. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +8 -23
  91. metaflow-stubs/plugins/azure/includefile_support.pyi +7 -17
  92. metaflow-stubs/plugins/cards/__init__.pyi +15 -5
  93. metaflow-stubs/plugins/cards/card_cli.pyi +22 -491
  94. metaflow-stubs/plugins/cards/card_client.pyi +14 -76
  95. metaflow-stubs/plugins/cards/card_creator.pyi +7 -10
  96. metaflow-stubs/plugins/cards/card_datastore.pyi +10 -18
  97. metaflow-stubs/plugins/cards/card_decorator.pyi +10 -126
  98. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +13 -81
  99. metaflow-stubs/plugins/cards/card_modules/basic.pyi +13 -96
  100. metaflow-stubs/plugins/cards/card_modules/card.pyi +6 -5
  101. metaflow-stubs/plugins/cards/card_modules/components.pyi +24 -107
  102. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +6 -5
  103. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +6 -12
  104. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +11 -88
  105. metaflow-stubs/plugins/cards/card_resolver.pyi +6 -49
  106. metaflow-stubs/plugins/cards/component_serializer.pyi +13 -63
  107. metaflow-stubs/plugins/cards/exception.pyi +7 -11
  108. metaflow-stubs/plugins/catch_decorator.pyi +10 -30
  109. metaflow-stubs/plugins/datatools/__init__.pyi +13 -392
  110. metaflow-stubs/plugins/datatools/local.pyi +7 -11
  111. metaflow-stubs/plugins/datatools/s3/__init__.pyi +19 -653
  112. metaflow-stubs/plugins/datatools/s3/s3.pyi +15 -263
  113. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +7 -10
  114. metaflow-stubs/plugins/datatools/s3/s3util.pyi +6 -11
  115. metaflow-stubs/plugins/debug_logger.pyi +7 -5
  116. metaflow-stubs/plugins/debug_monitor.pyi +7 -5
  117. metaflow-stubs/plugins/environment_decorator.pyi +7 -5
  118. metaflow-stubs/plugins/events_decorator.pyi +8 -14
  119. metaflow-stubs/plugins/frameworks/__init__.pyi +7 -5
  120. metaflow-stubs/plugins/frameworks/pytorch.pyi +8 -45
  121. metaflow-stubs/plugins/gcp/__init__.pyi +11 -7
  122. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +11 -24
  123. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +7 -11
  124. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +6 -5
  125. metaflow-stubs/plugins/gcp/gs_utils.pyi +8 -20
  126. metaflow-stubs/plugins/gcp/includefile_support.pyi +7 -17
  127. metaflow-stubs/plugins/kubernetes/__init__.pyi +12 -5
  128. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +6 -10
  129. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +10 -38
  130. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +16 -155
  131. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +7 -11
  132. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +19 -142
  133. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +7 -11
  134. metaflow-stubs/plugins/logs_cli.pyi +10 -9
  135. metaflow-stubs/plugins/package_cli.pyi +7 -5
  136. metaflow-stubs/plugins/parallel_decorator.pyi +11 -59
  137. metaflow-stubs/plugins/perimeters.pyi +6 -11
  138. metaflow-stubs/plugins/project_decorator.pyi +8 -14
  139. metaflow-stubs/plugins/pypi/__init__.pyi +12 -11
  140. metaflow-stubs/plugins/pypi/conda_decorator.pyi +8 -27
  141. metaflow-stubs/plugins/pypi/conda_environment.pyi +14 -20
  142. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +7 -5
  143. metaflow-stubs/plugins/pypi/pypi_environment.pyi +7 -39
  144. metaflow-stubs/plugins/pypi/utils.pyi +7 -11
  145. metaflow-stubs/plugins/resources_decorator.pyi +7 -5
  146. metaflow-stubs/plugins/retry_decorator.pyi +7 -11
  147. metaflow-stubs/plugins/secrets/__init__.pyi +9 -5
  148. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +8 -13
  149. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +7 -11
  150. metaflow-stubs/plugins/storage_executor.pyi +6 -11
  151. metaflow-stubs/plugins/tag_cli.pyi +14 -396
  152. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +9 -34
  153. metaflow-stubs/plugins/timeout_decorator.pyi +8 -12
  154. metaflow-stubs/procpoll.pyi +7 -5
  155. metaflow-stubs/profilers/__init__.pyi +7 -11
  156. metaflow-stubs/pylint_wrapper.pyi +7 -11
  157. metaflow-stubs/runner/__init__.pyi +13 -5
  158. metaflow-stubs/runner/deployer.pyi +99 -223
  159. metaflow-stubs/runner/deployer_impl.pyi +87 -0
  160. metaflow-stubs/runner/metaflow_runner.pyi +24 -508
  161. metaflow-stubs/runner/nbdeploy.pyi +16 -60
  162. metaflow-stubs/runner/nbrun.pyi +11 -148
  163. metaflow-stubs/runner/subprocess_manager.pyi +9 -10
  164. metaflow-stubs/runner/utils.pyi +44 -9
  165. metaflow-stubs/system/__init__.pyi +9 -107
  166. metaflow-stubs/system/system_logger.pyi +7 -16
  167. metaflow-stubs/system/system_monitor.pyi +6 -16
  168. metaflow-stubs/tagging_util.pyi +6 -10
  169. metaflow-stubs/tuple_util.pyi +6 -5
  170. {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.119.dist-info}/METADATA +1 -1
  171. ob_metaflow_stubs-6.0.3.119.dist-info/RECORD +174 -0
  172. metaflow-stubs/metadata/util.pyi +0 -18
  173. ob_metaflow_stubs-6.0.3.117.dist-info/RECORD +0 -140
  174. {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.119.dist-info}/WHEEL +0 -0
  175. {ob_metaflow_stubs-6.0.3.117.dist-info → ob_metaflow_stubs-6.0.3.119.dist-info}/top_level.txt +0 -0
@@ -1,310 +1,32 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27.1+obcheckpoint(0.1.2);ob(v1) #
4
- # Generated on 2024-11-13T19:05:29.418179 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.30.2+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-11-21T22:12:20.858825 #
5
+ ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
+ import metaflow
9
10
  import typing
10
11
  if typing.TYPE_CHECKING:
11
- import datetime
12
- import metaflow.graph
13
- import metaflow.client.core
14
- import metaflow.parameters
15
- import metaflow.decorators
16
- import metaflow.events
17
- import metaflow.metaflow_current
18
12
  import metaflow.exception
19
13
 
20
- JSONType: metaflow.parameters.JSONTypeClass
21
-
22
- class Run(metaflow.client.core.MetaflowObject, metaclass=type):
23
- """
24
- A `Run` represents an execution of a `Flow`. It is a container of `Step`s.
25
-
26
- Attributes
27
- ----------
28
- data : MetaflowData
29
- a shortcut to run['end'].task.data, i.e. data produced by this run.
30
- successful : bool
31
- True if the run completed successfully.
32
- finished : bool
33
- True if the run completed.
34
- finished_at : datetime
35
- Time this run finished.
36
- code : MetaflowCode
37
- Code package for this run (if present). See `MetaflowCode`.
38
- trigger : MetaflowTrigger
39
- Information about event(s) that triggered this run (if present). See `MetaflowTrigger`.
40
- end_task : Task
41
- `Task` for the end step (if it is present already).
42
- """
43
- def steps(self, *tags: str) -> typing.Iterator[metaflow.client.core.Step]:
44
- """
45
- [Legacy function - do not use]
46
-
47
- Returns an iterator over all `Step` objects in the step. This is an alias
48
- to iterating the object itself, i.e.
49
- ```
50
- list(Run(...)) == list(Run(...).steps())
51
- ```
52
-
53
- Parameters
54
- ----------
55
- tags : str
56
- No op (legacy functionality)
57
-
58
- Yields
59
- ------
60
- Step
61
- `Step` objects in this run.
62
- """
63
- ...
64
- @property
65
- def code(self) -> typing.Optional[metaflow.client.core.MetaflowCode]:
66
- """
67
- Returns the MetaflowCode object for this run, if present.
68
- Code is packed if atleast one `Step` runs remotely, else None is returned.
69
-
70
- Returns
71
- -------
72
- MetaflowCode, optional
73
- Code package for this run
74
- """
75
- ...
76
- @property
77
- def data(self) -> typing.Optional[metaflow.client.core.MetaflowData]:
78
- """
79
- Returns a container of data artifacts produced by this run.
80
-
81
- You can access data produced by this run as follows:
82
- ```
83
- print(run.data.my_var)
84
- ```
85
- This is a shorthand for `run['end'].task.data`. If the 'end' step has not yet
86
- executed, returns None.
87
-
88
- Returns
89
- -------
90
- MetaflowData, optional
91
- Container of all artifacts produced by this task
92
- """
93
- ...
94
- @property
95
- def successful(self) -> bool:
96
- """
97
- Indicates whether or not the run completed successfully.
98
-
99
- A run is successful if its 'end' step is successful.
100
-
101
- Returns
102
- -------
103
- bool
104
- True if the run completed successfully and False otherwise
105
- """
106
- ...
107
- @property
108
- def finished(self) -> bool:
109
- """
110
- Indicates whether or not the run completed.
111
-
112
- A run completed if its 'end' step completed.
113
-
114
- Returns
115
- -------
116
- bool
117
- True if the run completed and False otherwise
118
- """
119
- ...
120
- @property
121
- def finished_at(self) -> typing.Optional[datetime.datetime]:
122
- """
123
- Returns the datetime object of when the run finished (successfully or not).
124
-
125
- The completion time of a run is the same as the completion time of its 'end' step.
126
- If the 'end' step has not completed, returns None.
127
-
128
- Returns
129
- -------
130
- datetime, optional
131
- Datetime of when the run finished
132
- """
133
- ...
134
- @property
135
- def end_task(self) -> typing.Optional[metaflow.client.core.Task]:
136
- """
137
- Returns the Task corresponding to the 'end' step.
138
-
139
- This returns None if the end step does not yet exist.
140
-
141
- Returns
142
- -------
143
- Task, optional
144
- The 'end' task
145
- """
146
- ...
147
- def add_tag(self, tag: str):
148
- """
149
- Add a tag to this `Run`.
150
-
151
- Note that if the tag is already a system tag, it is not added as a user tag,
152
- and no error is thrown.
153
-
154
- Parameters
155
- ----------
156
- tag : str
157
- Tag to add.
158
- """
159
- ...
160
- def add_tags(self, tags: typing.Iterable[str]):
161
- """
162
- Add one or more tags to this `Run`.
163
-
164
- Note that if any tag is already a system tag, it is not added as a user tag
165
- and no error is thrown.
166
-
167
- Parameters
168
- ----------
169
- tags : Iterable[str]
170
- Tags to add.
171
- """
172
- ...
173
- def remove_tag(self, tag: str):
174
- """
175
- Remove one tag from this `Run`.
176
-
177
- Removing a system tag is an error. Removing a non-existent
178
- user tag is a no-op.
179
-
180
- Parameters
181
- ----------
182
- tag : str
183
- Tag to remove.
184
- """
185
- ...
186
- def remove_tags(self, tags: typing.Iterable[str]):
187
- """
188
- Remove one or more tags to this `Run`.
189
-
190
- Removing a system tag will result in an error. Removing a non-existent
191
- user tag is a no-op.
192
-
193
- Parameters
194
- ----------
195
- tags : Iterable[str]
196
- Tags to remove.
197
- """
198
- ...
199
- def replace_tag(self, tag_to_remove: str, tag_to_add: str):
200
- """
201
- Remove a tag and add a tag atomically. Removal is done first.
202
- The rules for `Run.add_tag` and `Run.remove_tag` also apply here.
203
-
204
- Parameters
205
- ----------
206
- tag_to_remove : str
207
- Tag to remove.
208
- tag_to_add : str
209
- Tag to add.
210
- """
211
- ...
212
- def replace_tags(self, tags_to_remove: typing.Iterable[str], tags_to_add: typing.Iterable[str]):
213
- """
214
- Remove and add tags atomically; the removal is done first.
215
- The rules for `Run.add_tag` and `Run.remove_tag` also apply here.
216
-
217
- Parameters
218
- ----------
219
- tags_to_remove : Iterable[str]
220
- Tags to remove.
221
- tags_to_add : Iterable[str]
222
- Tags to add.
223
- """
224
- ...
225
- def __iter__(self) -> typing.Iterator[metaflow.client.core.Step]:
226
- """
227
- Iterate over all children Step of this Run
228
-
229
- Yields
230
- ------
231
- Step
232
- A Step in this Run
233
- """
234
- ...
235
- def __getitem__(self, name: str) -> metaflow.client.core.Step:
236
- """
237
- Returns the Step object with the step name 'name'
238
-
239
- Parameters
240
- ----------
241
- name : str
242
- Step name
243
-
244
- Returns
245
- -------
246
- Step
247
- Step for this step name in this Run
248
-
249
- Raises
250
- ------
251
- KeyError
252
- If the name does not identify a valid Step object
253
- """
254
- ...
255
- def __getstate__(self):
256
- ...
257
- def __setstate__(self, state):
258
- ...
259
- @property
260
- def trigger(self) -> typing.Optional[metaflow.events.Trigger]:
261
- """
262
- Returns a container of events that triggered this run.
263
-
264
- This returns None if the run was not triggered by any events.
265
-
266
- Returns
267
- -------
268
- Trigger, optional
269
- Container of triggering events
270
- """
271
- ...
272
- ...
273
-
274
- current: metaflow.metaflow_current.Current
275
-
276
- def get_metadata() -> str:
277
- """
278
- Returns the current Metadata provider.
279
-
280
- If this is not set explicitly using `metadata`, the default value is
281
- determined through the Metaflow configuration. You can use this call to
282
- check that your configuration is set up properly.
283
-
284
- If multiple configuration profiles are present, this call returns the one
285
- selected through the `METAFLOW_PROFILE` environment variable.
286
-
287
- Returns
288
- -------
289
- str
290
- Information about the Metadata provider currently selected. This information typically
291
- returns provider specific information (like URL for remote providers or local paths for
292
- local providers).
293
- """
294
- ...
295
-
296
- class MetaflowException(Exception, metaclass=type):
297
- def __init__(self, msg = "", lineno = None):
298
- ...
299
- def __str__(self):
300
- ...
301
- ...
302
-
303
- class MetaflowInternalError(metaflow.exception.MetaflowException, metaclass=type):
304
- ...
305
-
306
- class MetaflowNotFound(metaflow.exception.MetaflowException, metaclass=type):
307
- ...
14
+ from ...parameters import JSONType as JSONType
15
+ from ...client.core import Run as Run
16
+ from ...metaflow_current import current as current
17
+ from ... import parameters as parameters
18
+ from ..._vendor import click as click
19
+ from ...client.core import get_metadata as get_metadata
20
+ from ...exception import MetaflowException as MetaflowException
21
+ from ...exception import MetaflowInternalError as MetaflowInternalError
22
+ from ...exception import MetaflowNotFound as MetaflowNotFound
23
+ from ..aws.step_functions.production_token import load_token as load_token
24
+ from ..aws.step_functions.production_token import new_token as new_token
25
+ from ..aws.step_functions.production_token import store_token as store_token
26
+ from ..environment_decorator import EnvironmentDecorator as EnvironmentDecorator
27
+ from ..kubernetes.kubernetes_decorator import KubernetesDecorator as KubernetesDecorator
28
+ from ...tagging_util import validate_tags as validate_tags
29
+ from .argo_workflows import ArgoWorkflows as ArgoWorkflows
308
30
 
309
31
  ARGO_WORKFLOWS_UI_URL: None
310
32
 
@@ -314,166 +36,6 @@ SERVICE_VERSION_CHECK: bool
314
36
 
315
37
  UI_URL: None
316
38
 
317
- def load_token(token_prefix):
318
- ...
319
-
320
- def new_token(token_prefix, prev_token = None):
321
- ...
322
-
323
- def store_token(token_prefix, token):
324
- ...
325
-
326
- class EnvironmentDecorator(metaflow.decorators.StepDecorator, metaclass=type):
327
- """
328
- Specifies environment variables to be set prior to the execution of a step.
329
-
330
- Parameters
331
- ----------
332
- vars : Dict[str, str], default {}
333
- Dictionary of environment variables to set.
334
- """
335
- def runtime_step_cli(self, cli_args, retry_count, max_user_code_retries, ubf_context):
336
- ...
337
- ...
338
-
339
- class KubernetesDecorator(metaflow.decorators.StepDecorator, metaclass=type):
340
- """
341
- Specifies that this step should execute on Kubernetes.
342
-
343
- Parameters
344
- ----------
345
- cpu : int, default 1
346
- Number of CPUs required for this step. If `@resources` is
347
- also present, the maximum value from all decorators is used.
348
- memory : int, default 4096
349
- Memory size (in MB) required for this step. If
350
- `@resources` is also present, the maximum value from all decorators is
351
- used.
352
- disk : int, default 10240
353
- Disk size (in MB) required for this step. If
354
- `@resources` is also present, the maximum value from all decorators is
355
- used.
356
- image : str, optional, default None
357
- Docker image to use when launching on Kubernetes. If not specified, and
358
- METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
359
- not, a default Docker image mapping to the current version of Python is used.
360
- image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
361
- If given, the imagePullPolicy to be applied to the Docker image of the step.
362
- service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
363
- Kubernetes service account to use when launching pod in Kubernetes.
364
- secrets : List[str], optional, default None
365
- Kubernetes secrets to use when launching pod in Kubernetes. These
366
- secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
367
- in Metaflow configuration.
368
- node_selector: Union[Dict[str,str], str], optional, default None
369
- Kubernetes node selector(s) to apply to the pod running the task.
370
- Can be passed in as a comma separated string of values e.g. "kubernetes.io/os=linux,kubernetes.io/arch=amd64"
371
- or as a dictionary {"kubernetes.io/os": "linux", "kubernetes.io/arch": "amd64"}
372
- namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
373
- Kubernetes namespace to use when launching pod in Kubernetes.
374
- gpu : int, optional, default None
375
- Number of GPUs required for this step. A value of zero implies that
376
- the scheduled node should not have GPUs.
377
- gpu_vendor : str, default KUBERNETES_GPU_VENDOR
378
- The vendor of the GPUs to be used for this step.
379
- tolerations : List[str], default []
380
- The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
381
- Kubernetes tolerations to use when launching pod in Kubernetes.
382
- use_tmpfs : bool, default False
383
- This enables an explicit tmpfs mount for this step.
384
- tmpfs_tempdir : bool, default True
385
- sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
386
- tmpfs_size : int, optional, default: None
387
- The value for the size (in MiB) of the tmpfs mount for this step.
388
- This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
389
- memory allocated for this step.
390
- tmpfs_path : str, optional, default /metaflow_temp
391
- Path to tmpfs mount for this step.
392
- persistent_volume_claims : Dict[str, str], optional, default None
393
- A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
394
- volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
395
- shared_memory: int, optional
396
- Shared memory size (in MiB) required for this step
397
- port: int, optional
398
- Port number to specify in the Kubernetes job object
399
- compute_pool : str, optional, default None
400
- Compute pool to be used for for this step.
401
- If not specified, any accessible compute pool within the perimeter is used.
402
- hostname_resolution_timeout: int, default 10 * 60
403
- Timeout in seconds for the workers tasks in the gang scheduled cluster to resolve the hostname of control task.
404
- Only applicable when @parallel is used.
405
- """
406
- def __init__(self, attributes = None, statically_defined = False):
407
- ...
408
- def step_init(self, flow, graph, step, decos, environment, flow_datastore, logger):
409
- ...
410
- def package_init(self, flow, step_name, environment):
411
- ...
412
- def runtime_init(self, flow, graph, package, run_id):
413
- ...
414
- def runtime_task_created(self, task_datastore, task_id, split_index, input_paths, is_cloned, ubf_context):
415
- ...
416
- def runtime_step_cli(self, cli_args, retry_count, max_user_code_retries, ubf_context):
417
- ...
418
- def task_pre_step(self, step_name, task_datastore, metadata, run_id, task_id, flow, graph, retry_count, max_retries, ubf_context, inputs):
419
- ...
420
- def task_finished(self, step_name, flow, graph, is_task_ok, retry_count, max_retries):
421
- ...
422
- ...
423
-
424
- def validate_tags(tags, existing_tags = None):
425
- """
426
- Raises MetaflowTaggingError if invalid based on these rules:
427
-
428
- Tag set size is too large. But it's OK if tag set is not larger
429
- than an existing tag set (if provided).
430
-
431
- Then, we validate each tag. See validate_tag()
432
- """
433
- ...
434
-
435
- class ArgoWorkflows(object, metaclass=type):
436
- def __init__(self, name, graph: metaflow.graph.FlowGraph, flow, code_package_sha, code_package_url, production_token, metadata, flow_datastore, environment, event_logger, monitor, tags = None, namespace = None, username = None, max_workers = None, workflow_timeout = None, workflow_priority = None, auto_emit_argo_events = False, notify_on_error = False, notify_on_success = False, notify_slack_webhook_url = None, notify_pager_duty_integration_key = None, enable_heartbeat_daemon = True, enable_error_msg_capture = False):
437
- ...
438
- def __str__(self):
439
- ...
440
- def deploy(self):
441
- ...
442
- @staticmethod
443
- def list_templates(flow_name, all = False):
444
- ...
445
- @staticmethod
446
- def delete(name):
447
- ...
448
- @classmethod
449
- def terminate(cls, flow_name, name):
450
- ...
451
- @staticmethod
452
- def get_workflow_status(flow_name, name):
453
- ...
454
- @staticmethod
455
- def suspend(name):
456
- ...
457
- @staticmethod
458
- def unsuspend(name):
459
- ...
460
- @classmethod
461
- def trigger(cls, name, parameters = None):
462
- ...
463
- def schedule(self):
464
- ...
465
- def trigger_explanation(self):
466
- ...
467
- @classmethod
468
- def get_existing_deployment(cls, name):
469
- ...
470
- @classmethod
471
- def get_execution(cls, name):
472
- ...
473
- def list_to_prose(self, items, singular):
474
- ...
475
- ...
476
-
477
39
  unsupported_decorators: dict
478
40
 
479
41
  class IncorrectProductionToken(metaflow.exception.MetaflowException, metaclass=type):