metaflow-stubs 2.12.27__py2.py3-none-any.whl → 2.12.29__py2.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.
Files changed (159) hide show
  1. metaflow-stubs/__init__.pyi +217 -2921
  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 +19 -159
  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 +22 -106
  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 -11
  19. metaflow-stubs/metaflow_current.pyi +8 -7
  20. metaflow-stubs/mflog/__init__.pyi +6 -0
  21. metaflow-stubs/mflog/mflog.pyi +52 -5
  22. metaflow-stubs/multicore_utils.pyi +6 -5
  23. metaflow-stubs/parameters.pyi +13 -23
  24. metaflow-stubs/plugins/__init__.pyi +51 -163
  25. metaflow-stubs/plugins/airflow/__init__.pyi +12 -5
  26. metaflow-stubs/plugins/airflow/airflow.pyi +19 -130
  27. metaflow-stubs/plugins/airflow/airflow_cli.pyi +17 -136
  28. metaflow-stubs/plugins/airflow/airflow_decorator.pyi +7 -26
  29. metaflow-stubs/plugins/airflow/airflow_utils.pyi +7 -6
  30. metaflow-stubs/plugins/airflow/exception.pyi +7 -11
  31. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +10 -97
  32. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +9 -30
  33. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +9 -40
  34. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +9 -40
  35. metaflow-stubs/plugins/argo/__init__.pyi +12 -5
  36. metaflow-stubs/plugins/argo/argo_client.pyi +8 -26
  37. metaflow-stubs/plugins/argo/argo_events.pyi +7 -11
  38. metaflow-stubs/plugins/argo/argo_workflows.pyi +17 -121
  39. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +22 -460
  40. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +13 -405
  41. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +65 -322
  42. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +165 -0
  43. metaflow-stubs/plugins/aws/__init__.pyi +11 -5
  44. metaflow-stubs/plugins/aws/aws_client.pyi +6 -5
  45. metaflow-stubs/plugins/aws/aws_utils.pyi +6 -11
  46. metaflow-stubs/plugins/aws/batch/__init__.pyi +10 -5
  47. metaflow-stubs/plugins/aws/batch/batch.pyi +10 -55
  48. metaflow-stubs/plugins/aws/batch/batch_cli.pyi +10 -31
  49. metaflow-stubs/plugins/aws/batch/batch_client.pyi +7 -11
  50. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +15 -140
  51. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +7 -5
  52. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +10 -21
  53. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +15 -5
  54. metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +6 -5
  55. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +6 -5
  56. metaflow-stubs/plugins/aws/step_functions/production_token.pyi +6 -5
  57. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +7 -5
  58. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +11 -65
  59. metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +19 -175
  60. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +6 -5
  61. metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +8 -37
  62. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +53 -290
  63. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +127 -0
  64. metaflow-stubs/plugins/azure/__init__.pyi +12 -7
  65. metaflow-stubs/plugins/azure/azure_credential.pyi +6 -5
  66. metaflow-stubs/plugins/azure/azure_exceptions.pyi +7 -11
  67. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +11 -24
  68. metaflow-stubs/plugins/azure/azure_utils.pyi +11 -29
  69. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +8 -23
  70. metaflow-stubs/plugins/azure/includefile_support.pyi +7 -17
  71. metaflow-stubs/plugins/cards/__init__.pyi +15 -5
  72. metaflow-stubs/plugins/cards/card_cli.pyi +22 -491
  73. metaflow-stubs/plugins/cards/card_client.pyi +14 -76
  74. metaflow-stubs/plugins/cards/card_creator.pyi +7 -10
  75. metaflow-stubs/plugins/cards/card_datastore.pyi +10 -18
  76. metaflow-stubs/plugins/cards/card_decorator.pyi +10 -126
  77. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +14 -81
  78. metaflow-stubs/plugins/cards/card_modules/basic.pyi +13 -96
  79. metaflow-stubs/plugins/cards/card_modules/card.pyi +6 -5
  80. metaflow-stubs/plugins/cards/card_modules/chevron/__init__.pyi +12 -73
  81. metaflow-stubs/plugins/cards/card_modules/chevron/main.pyi +6 -61
  82. metaflow-stubs/plugins/cards/card_modules/chevron/metadata.pyi +6 -5
  83. metaflow-stubs/plugins/cards/card_modules/chevron/renderer.pyi +8 -45
  84. metaflow-stubs/plugins/cards/card_modules/chevron/tokenizer.pyi +7 -6
  85. metaflow-stubs/plugins/cards/card_modules/components.pyi +24 -107
  86. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +6 -5
  87. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +6 -12
  88. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +11 -88
  89. metaflow-stubs/plugins/cards/card_resolver.pyi +6 -49
  90. metaflow-stubs/plugins/cards/component_serializer.pyi +13 -63
  91. metaflow-stubs/plugins/cards/exception.pyi +7 -11
  92. metaflow-stubs/plugins/catch_decorator.pyi +9 -29
  93. metaflow-stubs/plugins/datatools/__init__.pyi +13 -392
  94. metaflow-stubs/plugins/datatools/local.pyi +7 -11
  95. metaflow-stubs/plugins/datatools/s3/__init__.pyi +19 -653
  96. metaflow-stubs/plugins/datatools/s3/s3.pyi +16 -264
  97. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +7 -10
  98. metaflow-stubs/plugins/datatools/s3/s3util.pyi +6 -11
  99. metaflow-stubs/plugins/debug_logger.pyi +7 -5
  100. metaflow-stubs/plugins/debug_monitor.pyi +7 -5
  101. metaflow-stubs/plugins/environment_decorator.pyi +7 -5
  102. metaflow-stubs/plugins/events_decorator.pyi +8 -14
  103. metaflow-stubs/plugins/frameworks/__init__.pyi +7 -5
  104. metaflow-stubs/plugins/frameworks/pytorch.pyi +8 -45
  105. metaflow-stubs/plugins/gcp/__init__.pyi +11 -7
  106. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +11 -24
  107. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +7 -11
  108. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +6 -5
  109. metaflow-stubs/plugins/gcp/gs_utils.pyi +8 -20
  110. metaflow-stubs/plugins/gcp/includefile_support.pyi +7 -17
  111. metaflow-stubs/plugins/kubernetes/__init__.pyi +13 -5
  112. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +6 -10
  113. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +9 -29
  114. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +16 -155
  115. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +9 -72
  116. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +19 -142
  117. metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +8 -41
  118. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +7 -11
  119. metaflow-stubs/plugins/logs_cli.pyi +10 -9
  120. metaflow-stubs/plugins/package_cli.pyi +7 -5
  121. metaflow-stubs/plugins/parallel_decorator.pyi +11 -59
  122. metaflow-stubs/plugins/project_decorator.pyi +8 -14
  123. metaflow-stubs/plugins/pypi/__init__.pyi +12 -11
  124. metaflow-stubs/plugins/pypi/conda_decorator.pyi +8 -27
  125. metaflow-stubs/plugins/pypi/conda_environment.pyi +12 -18
  126. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +7 -5
  127. metaflow-stubs/plugins/pypi/pypi_environment.pyi +7 -39
  128. metaflow-stubs/plugins/pypi/utils.pyi +7 -11
  129. metaflow-stubs/plugins/resources_decorator.pyi +7 -5
  130. metaflow-stubs/plugins/retry_decorator.pyi +7 -11
  131. metaflow-stubs/plugins/secrets/__init__.pyi +9 -5
  132. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +8 -13
  133. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +7 -11
  134. metaflow-stubs/plugins/storage_executor.pyi +6 -11
  135. metaflow-stubs/plugins/tag_cli.pyi +14 -396
  136. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +9 -34
  137. metaflow-stubs/plugins/timeout_decorator.pyi +7 -11
  138. metaflow-stubs/procpoll.pyi +7 -5
  139. metaflow-stubs/pylint_wrapper.pyi +7 -11
  140. metaflow-stubs/runner/__init__.pyi +13 -5
  141. metaflow-stubs/runner/deployer.pyi +102 -210
  142. metaflow-stubs/runner/deployer_impl.pyi +87 -0
  143. metaflow-stubs/runner/metaflow_runner.pyi +24 -508
  144. metaflow-stubs/runner/nbdeploy.pyi +16 -60
  145. metaflow-stubs/runner/nbrun.pyi +11 -148
  146. metaflow-stubs/runner/subprocess_manager.pyi +9 -10
  147. metaflow-stubs/runner/utils.pyi +44 -9
  148. metaflow-stubs/system/__init__.pyi +9 -107
  149. metaflow-stubs/system/system_logger.pyi +6 -15
  150. metaflow-stubs/system/system_monitor.pyi +6 -16
  151. metaflow-stubs/tagging_util.pyi +6 -10
  152. metaflow-stubs/tuple_util.pyi +6 -5
  153. metaflow-stubs/version.pyi +6 -5
  154. {metaflow_stubs-2.12.27.dist-info → metaflow_stubs-2.12.29.dist-info}/METADATA +2 -2
  155. metaflow_stubs-2.12.29.dist-info/RECORD +158 -0
  156. {metaflow_stubs-2.12.27.dist-info → metaflow_stubs-2.12.29.dist-info}/WHEEL +1 -1
  157. metaflow-stubs/metadata/util.pyi +0 -18
  158. metaflow_stubs-2.12.27.dist-info/RECORD +0 -152
  159. {metaflow_stubs-2.12.27.dist-info → metaflow_stubs-2.12.29.dist-info}/top_level.txt +0 -0
@@ -1,418 +1,26 @@
1
- ##################################################################################
2
- # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.27 #
4
- # Generated on 2024-10-24T19:27:17.961121 #
5
- ##################################################################################
1
+ ######################################################################################################
2
+ # Auto-generated Metaflow stub file #
3
+ # MF version: 2.12.29 #
4
+ # Generated on 2024-11-07T22:19:34.604385 #
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 metaflow.decorators
12
- import metaflow.graph
13
- import metaflow.datastore.inputs
14
12
  import metaflow.flowspec
15
- import metaflow
16
- import typing
17
- import metaflow.events
18
- import metaflow.metaflow_current
19
-
20
- current: metaflow.metaflow_current.Current
21
-
22
- class Trigger(object, metaclass=type):
23
- """
24
- Defines a container of event triggers' metadata.
25
- """
26
- def __init__(self, _meta = None):
27
- ...
28
- @classmethod
29
- def from_runs(cls, run_objs: typing.List["metaflow.Run"]):
30
- ...
31
- @property
32
- def event(self) -> typing.Optional[metaflow.events.MetaflowEvent]:
33
- """
34
- The `MetaflowEvent` object corresponding to the triggering event.
35
-
36
- If multiple events triggered the run, this property is the latest event.
37
-
38
- Returns
39
- -------
40
- MetaflowEvent, optional
41
- The latest event that triggered the run, if applicable.
42
- """
43
- ...
44
- @property
45
- def events(self) -> typing.Optional[typing.List[metaflow.events.MetaflowEvent]]:
46
- """
47
- The list of `MetaflowEvent` objects correspondings to all the triggering events.
48
-
49
- Returns
50
- -------
51
- List[MetaflowEvent], optional
52
- List of all events that triggered the run
53
- """
54
- ...
55
- @property
56
- def run(self) -> typing.Optional["metaflow.Run"]:
57
- """
58
- The corresponding `Run` object if the triggering event is a Metaflow run.
59
-
60
- In case multiple runs triggered the run, this property is the latest run.
61
- Returns `None` if none of the triggering events are a `Run`.
62
-
63
- Returns
64
- -------
65
- Run, optional
66
- Latest Run that triggered this run, if applicable.
67
- """
68
- ...
69
- @property
70
- def runs(self) -> typing.Optional[typing.List["metaflow.Run"]]:
71
- """
72
- The list of `Run` objects in the triggering events.
73
- Returns `None` if none of the triggering events are `Run` objects.
74
-
75
- Returns
76
- -------
77
- List[Run], optional
78
- List of runs that triggered this run, if applicable.
79
- """
80
- ...
81
- def __getitem__(self, key: str) -> typing.Union["metaflow.Run", metaflow.events.MetaflowEvent]:
82
- """
83
- If triggering events are runs, `key` corresponds to the flow name of the triggering run.
84
- Otherwise, `key` corresponds to the event name and a `MetaflowEvent` object is returned.
85
-
86
- Returns
87
- -------
88
- Union[Run, MetaflowEvent]
89
- `Run` object if triggered by a run. Otherwise returns a `MetaflowEvent`.
90
- """
91
- ...
92
- def __iter__(self):
93
- ...
94
- def __contains__(self, ident: str) -> bool:
95
- ...
96
- ...
13
+ import metaflow.graph
14
+ import metaflow.decorators
97
15
 
98
- class MetaDatum(tuple, metaclass=type):
99
- """
100
- MetaDatum(field, value, type, tags)
101
- """
102
- @staticmethod
103
- def __new__(_cls, field, value, type, tags):
104
- """
105
- Create new instance of MetaDatum(field, value, type, tags)
106
- """
107
- ...
108
- def __repr__(self):
109
- """
110
- Return a nicely formatted representation string
111
- """
112
- ...
113
- def __getnewargs__(self):
114
- """
115
- Return self as a plain tuple. Used by copy and pickle.
116
- """
117
- ...
118
- ...
16
+ from ...metaflow_current import current as current
17
+ from ...events import Trigger as Trigger
18
+ from ...metadata_provider.metadata import MetaDatum as MetaDatum
19
+ from ...flowspec import FlowSpec as FlowSpec
20
+ from .argo_events import ArgoEvent as ArgoEvent
119
21
 
120
22
  ARGO_EVENTS_WEBHOOK_URL: None
121
23
 
122
- class FlowSpec(object, metaclass=metaflow.flowspec._FlowSpecMeta):
123
- """
124
- Main class from which all Flows should inherit.
125
-
126
- Attributes
127
- ----------
128
- index
129
- input
130
- """
131
- def __init__(self, use_cli = True):
132
- """
133
- Construct a FlowSpec
134
-
135
- Parameters
136
- ----------
137
- use_cli : bool, default True
138
- Set to True if the flow is invoked from __main__ or the command line
139
- """
140
- ...
141
- @property
142
- def script_name(self) -> str:
143
- """
144
- [Legacy function - do not use. Use `current` instead]
145
-
146
- Returns the name of the script containing the flow
147
-
148
- Returns
149
- -------
150
- str
151
- A string containing the name of the script
152
- """
153
- ...
154
- def __iter__(self):
155
- """
156
- [Legacy function - do not use]
157
-
158
- Iterate over all steps in the Flow
159
-
160
- Returns
161
- -------
162
- Iterator[graph.DAGNode]
163
- Iterator over the steps in the flow
164
- """
165
- ...
166
- def __getattr__(self, name: str):
167
- ...
168
- def cmd(self, cmdline, input = {}, output = []):
169
- """
170
- [Legacy function - do not use]
171
- """
172
- ...
173
- @property
174
- def index(self) -> typing.Optional[int]:
175
- """
176
- The index of this foreach branch.
177
-
178
- In a foreach step, multiple instances of this step (tasks) will be executed,
179
- one for each element in the foreach. This property returns the zero based index
180
- of the current task. If this is not a foreach step, this returns None.
181
-
182
- If you need to know the indices of the parent tasks in a nested foreach, use
183
- `FlowSpec.foreach_stack`.
184
-
185
- Returns
186
- -------
187
- int, optional
188
- Index of the task in a foreach step.
189
- """
190
- ...
191
- @property
192
- def input(self) -> typing.Optional[typing.Any]:
193
- """
194
- The value of the foreach artifact in this foreach branch.
195
-
196
- In a foreach step, multiple instances of this step (tasks) will be executed,
197
- one for each element in the foreach. This property returns the element passed
198
- to the current task. If this is not a foreach step, this returns None.
199
-
200
- If you need to know the values of the parent tasks in a nested foreach, use
201
- `FlowSpec.foreach_stack`.
202
-
203
- Returns
204
- -------
205
- object, optional
206
- Input passed to the foreach task.
207
- """
208
- ...
209
- def foreach_stack(self) -> typing.Optional[typing.List[typing.Tuple[int, int, typing.Any]]]:
210
- """
211
- Returns the current stack of foreach indexes and values for the current step.
212
-
213
- Use this information to understand what data is being processed in the current
214
- foreach branch. For example, considering the following code:
215
- ```
216
- @step
217
- def root(self):
218
- self.split_1 = ['a', 'b', 'c']
219
- self.next(self.nest_1, foreach='split_1')
220
-
221
- @step
222
- def nest_1(self):
223
- self.split_2 = ['d', 'e', 'f', 'g']
224
- self.next(self.nest_2, foreach='split_2'):
225
-
226
- @step
227
- def nest_2(self):
228
- foo = self.foreach_stack()
229
- ```
230
-
231
- `foo` will take the following values in the various tasks for nest_2:
232
- ```
233
- [(0, 3, 'a'), (0, 4, 'd')]
234
- [(0, 3, 'a'), (1, 4, 'e')]
235
- ...
236
- [(0, 3, 'a'), (3, 4, 'g')]
237
- [(1, 3, 'b'), (0, 4, 'd')]
238
- ...
239
- ```
240
- where each tuple corresponds to:
241
-
242
- - The index of the task for that level of the loop.
243
- - The number of splits for that level of the loop.
244
- - The value for that level of the loop.
245
-
246
- Note that the last tuple returned in a task corresponds to:
247
-
248
- - 1st element: value returned by `self.index`.
249
- - 3rd element: value returned by `self.input`.
250
-
251
- Returns
252
- -------
253
- List[Tuple[int, int, Any]]
254
- An array describing the current stack of foreach steps.
255
- """
256
- ...
257
- def merge_artifacts(self, inputs: metaflow.datastore.inputs.Inputs, exclude: typing.Optional[typing.List[str]] = None, include: typing.Optional[typing.List[str]] = None):
258
- """
259
- Helper function for merging artifacts in a join step.
260
-
261
- This function takes all the artifacts coming from the branches of a
262
- join point and assigns them to self in the calling step. Only artifacts
263
- not set in the current step are considered. If, for a given artifact, different
264
- values are present on the incoming edges, an error will be thrown and the artifacts
265
- that conflict will be reported.
266
-
267
- As a few examples, in the simple graph: A splitting into B and C and joining in D:
268
- ```
269
- A:
270
- self.x = 5
271
- self.y = 6
272
- B:
273
- self.b_var = 1
274
- self.x = from_b
275
- C:
276
- self.x = from_c
277
-
278
- D:
279
- merge_artifacts(inputs)
280
- ```
281
- In D, the following artifacts are set:
282
- - `y` (value: 6), `b_var` (value: 1)
283
- - if `from_b` and `from_c` are the same, `x` will be accessible and have value `from_b`
284
- - if `from_b` and `from_c` are different, an error will be thrown. To prevent this error,
285
- you need to manually set `self.x` in D to a merged value (for example the max) prior to
286
- calling `merge_artifacts`.
287
-
288
- Parameters
289
- ----------
290
- inputs : Inputs
291
- Incoming steps to the join point.
292
- exclude : List[str], optional, default None
293
- If specified, do not consider merging artifacts with a name in `exclude`.
294
- Cannot specify if `include` is also specified.
295
- include : List[str], optional, default None
296
- If specified, only merge artifacts specified. Cannot specify if `exclude` is
297
- also specified.
298
-
299
- Raises
300
- ------
301
- MetaflowException
302
- This exception is thrown if this is not called in a join step.
303
- UnhandledInMergeArtifactsException
304
- This exception is thrown in case of unresolved conflicts.
305
- MissingInMergeArtifactsException
306
- This exception is thrown in case an artifact specified in `include` cannot
307
- be found.
308
- """
309
- ...
310
- def next(self, *dsts: typing.Callable[..., None], **kwargs):
311
- """
312
- Indicates the next step to execute after this step has completed.
313
-
314
- This statement should appear as the last statement of each step, except
315
- the end step.
316
-
317
- There are several valid formats to specify the next step:
318
-
319
- - Straight-line connection: `self.next(self.next_step)` where `next_step` is a method in
320
- the current class decorated with the `@step` decorator.
321
-
322
- - Static fan-out connection: `self.next(self.step1, self.step2, ...)` where `stepX` are
323
- methods in the current class decorated with the `@step` decorator.
324
-
325
- - Foreach branch:
326
- ```
327
- self.next(self.foreach_step, foreach='foreach_iterator')
328
- ```
329
- In this situation, `foreach_step` is a method in the current class decorated with the
330
- `@step` decorator and `foreach_iterator` is a variable name in the current class that
331
- evaluates to an iterator. A task will be launched for each value in the iterator and
332
- each task will execute the code specified by the step `foreach_step`.
333
-
334
- Parameters
335
- ----------
336
- dsts : Callable[..., None]
337
- One or more methods annotated with `@step`.
338
-
339
- Raises
340
- ------
341
- InvalidNextException
342
- Raised if the format of the arguments does not match one of the ones given above.
343
- """
344
- ...
345
- def __str__(self):
346
- ...
347
- def __getstate__(self):
348
- ...
349
- ...
350
-
351
- class ArgoEvent(object, metaclass=type):
352
- """
353
- ArgoEvent is a small event, a message, that can be published to Argo Workflows. The
354
- event will eventually start all flows which have been previously deployed with `@trigger`
355
- to wait for this particular named event.
356
-
357
- Parameters
358
- ----------
359
- name : str,
360
- Name of the event
361
- url : str, optional
362
- Override the event endpoint from `ARGO_EVENTS_WEBHOOK_URL`.
363
- payload : Dict, optional
364
- A set of key-value pairs delivered in this event. Used to set parameters of triggered flows.
365
- """
366
- def __init__(self, name, url = None, payload = None, access_token = None):
367
- ...
368
- def add_to_payload(self, key, value):
369
- """
370
- Add a key-value pair in the payload. This is typically used to set parameters
371
- of triggered flows. Often, `key` is the parameter name you want to set to
372
- `value`. Overrides any existing value of `key`.
373
-
374
- Parameters
375
- ----------
376
- key : str
377
- Key
378
- value : str
379
- Value
380
- """
381
- ...
382
- def safe_publish(self, payload = None, ignore_errors = True):
383
- """
384
- Publishes an event when called inside a deployed workflow. Outside a deployed workflow
385
- this function does nothing.
386
-
387
- Use this function inside flows to create events safely. As this function is a no-op
388
- for local runs, you can safely call it during local development without causing unintended
389
- side-effects. It takes effect only when deployed on Argo Workflows.
390
-
391
- Parameters
392
- ----------
393
- payload : dict
394
- Additional key-value pairs to add to the payload.
395
- ignore_errors : bool, default True
396
- If True, events are created on a best effort basis - errors are silently ignored.
397
- """
398
- ...
399
- def publish(self, payload = None, force = True, ignore_errors = True):
400
- """
401
- Publishes an event.
402
-
403
- Note that the function returns immediately after the event has been sent. It
404
- does not wait for flows to start, nor it guarantees that any flows will start.
405
-
406
- Parameters
407
- ----------
408
- payload : dict
409
- Additional key-value pairs to add to the payload.
410
- ignore_errors : bool, default True
411
- If True, events are created on a best effort basis - errors are silently ignored.
412
- """
413
- ...
414
- ...
415
-
416
24
  class ArgoWorkflowsInternalDecorator(metaflow.decorators.StepDecorator, metaclass=type):
417
25
  def task_pre_step(self, step_name, task_datastore, metadata, run_id, task_id, flow, graph, retry_count, max_user_code_retries, ubf_context, inputs):
418
26
  ...