metaflow-stubs 2.15.11__py2.py3-none-any.whl → 2.15.12__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 (149) hide show
  1. metaflow-stubs/__init__.pyi +452 -452
  2. metaflow-stubs/cards.pyi +2 -2
  3. metaflow-stubs/cli.pyi +2 -2
  4. metaflow-stubs/cli_components/__init__.pyi +2 -2
  5. metaflow-stubs/cli_components/utils.pyi +2 -2
  6. metaflow-stubs/client/__init__.pyi +2 -2
  7. metaflow-stubs/client/core.pyi +5 -5
  8. metaflow-stubs/client/filecache.pyi +2 -2
  9. metaflow-stubs/events.pyi +3 -3
  10. metaflow-stubs/exception.pyi +2 -2
  11. metaflow-stubs/flowspec.pyi +5 -5
  12. metaflow-stubs/generated_for.txt +1 -1
  13. metaflow-stubs/includefile.pyi +3 -3
  14. metaflow-stubs/info_file.pyi +2 -2
  15. metaflow-stubs/metadata_provider/__init__.pyi +2 -2
  16. metaflow-stubs/metadata_provider/heartbeat.pyi +2 -2
  17. metaflow-stubs/metadata_provider/metadata.pyi +2 -2
  18. metaflow-stubs/metadata_provider/util.pyi +2 -2
  19. metaflow-stubs/metaflow_config.pyi +4 -2
  20. metaflow-stubs/metaflow_current.pyi +4 -4
  21. metaflow-stubs/metaflow_git.pyi +2 -2
  22. metaflow-stubs/multicore_utils.pyi +2 -2
  23. metaflow-stubs/parameters.pyi +3 -3
  24. metaflow-stubs/plugins/__init__.pyi +9 -9
  25. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  26. metaflow-stubs/plugins/airflow/airflow_decorator.pyi +2 -2
  27. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  28. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  29. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
  30. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
  31. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
  32. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
  33. metaflow-stubs/plugins/argo/__init__.pyi +2 -2
  34. metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
  35. metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
  36. metaflow-stubs/plugins/argo/argo_workflows.pyi +2 -2
  37. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +3 -3
  38. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
  39. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +3 -3
  40. metaflow-stubs/plugins/aws/__init__.pyi +3 -3
  41. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  42. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  43. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  44. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  45. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  46. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -2
  47. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  48. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +5 -5
  49. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
  50. metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +2 -2
  51. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  52. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
  53. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
  54. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  55. metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +2 -2
  56. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +3 -3
  57. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +3 -3
  58. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  59. metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
  60. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  61. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +5 -5
  62. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  63. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  64. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  65. metaflow-stubs/plugins/cards/__init__.pyi +2 -2
  66. metaflow-stubs/plugins/cards/card_client.pyi +3 -3
  67. metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
  68. metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
  69. metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
  70. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  71. metaflow-stubs/plugins/cards/card_modules/basic.pyi +3 -3
  72. metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
  73. metaflow-stubs/plugins/cards/card_modules/components.pyi +3 -3
  74. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
  75. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  76. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
  77. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  78. metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
  79. metaflow-stubs/plugins/cards/exception.pyi +2 -2
  80. metaflow-stubs/plugins/catch_decorator.pyi +3 -3
  81. metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
  82. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  83. metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
  84. metaflow-stubs/plugins/datatools/s3/s3.pyi +3 -3
  85. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  86. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  87. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  88. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  89. metaflow-stubs/plugins/environment_decorator.pyi +2 -2
  90. metaflow-stubs/plugins/events_decorator.pyi +2 -2
  91. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  92. metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
  93. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  94. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +5 -5
  95. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  96. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  97. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  98. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  99. metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
  100. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
  101. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
  102. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  103. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
  104. metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +2 -2
  105. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
  106. metaflow-stubs/plugins/kubernetes/spot_monitor_sidecar.pyi +2 -2
  107. metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
  108. metaflow-stubs/plugins/project_decorator.pyi +2 -2
  109. metaflow-stubs/plugins/pypi/__init__.pyi +3 -3
  110. metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
  111. metaflow-stubs/plugins/pypi/conda_environment.pyi +5 -5
  112. metaflow-stubs/plugins/pypi/parsers.pyi +2 -2
  113. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
  114. metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
  115. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  116. metaflow-stubs/plugins/resources_decorator.pyi +2 -2
  117. metaflow-stubs/plugins/retry_decorator.pyi +2 -2
  118. metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
  119. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +4 -4
  120. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
  121. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  122. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +3 -3
  123. metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
  124. metaflow-stubs/plugins/uv/__init__.pyi +2 -2
  125. metaflow-stubs/plugins/uv/uv_environment.pyi +3 -3
  126. metaflow-stubs/pylint_wrapper.pyi +2 -2
  127. metaflow-stubs/runner/__init__.pyi +2 -2
  128. metaflow-stubs/runner/deployer.pyi +27 -27
  129. metaflow-stubs/runner/deployer_impl.pyi +2 -2
  130. metaflow-stubs/runner/metaflow_runner.pyi +3 -3
  131. metaflow-stubs/runner/nbdeploy.pyi +2 -2
  132. metaflow-stubs/runner/nbrun.pyi +2 -2
  133. metaflow-stubs/runner/subprocess_manager.pyi +3 -3
  134. metaflow-stubs/runner/utils.pyi +3 -3
  135. metaflow-stubs/system/__init__.pyi +2 -2
  136. metaflow-stubs/system/system_logger.pyi +2 -2
  137. metaflow-stubs/system/system_monitor.pyi +2 -2
  138. metaflow-stubs/tagging_util.pyi +2 -2
  139. metaflow-stubs/tuple_util.pyi +2 -2
  140. metaflow-stubs/user_configs/__init__.pyi +2 -2
  141. metaflow-stubs/user_configs/config_decorators.pyi +6 -6
  142. metaflow-stubs/user_configs/config_options.pyi +2 -2
  143. metaflow-stubs/user_configs/config_parameters.pyi +5 -5
  144. metaflow-stubs/version.pyi +2 -2
  145. {metaflow_stubs-2.15.11.dist-info → metaflow_stubs-2.15.12.dist-info}/METADATA +2 -2
  146. metaflow_stubs-2.15.12.dist-info/RECORD +149 -0
  147. {metaflow_stubs-2.15.11.dist-info → metaflow_stubs-2.15.12.dist-info}/WHEEL +1 -1
  148. metaflow_stubs-2.15.11.dist-info/RECORD +0 -149
  149. {metaflow_stubs-2.15.11.dist-info → metaflow_stubs-2.15.12.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.15.11 #
4
- # Generated on 2025-05-06T23:47:09.203033 #
3
+ # MF version: 2.15.12 #
4
+ # Generated on 2025-05-15T19:09:53.993231 #
5
5
  ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -35,16 +35,16 @@ from .user_configs.config_parameters import ConfigValue as ConfigValue
35
35
  from .user_configs.config_parameters import config_expr as config_expr
36
36
  from .user_configs.config_decorators import CustomFlowDecorator as CustomFlowDecorator
37
37
  from .user_configs.config_decorators import CustomStepDecorator as CustomStepDecorator
38
- from . import metaflow_git as metaflow_git
39
- from . import tuple_util as tuple_util
40
38
  from . import events as events
39
+ from . import tuple_util as tuple_util
40
+ from . import metaflow_git as metaflow_git
41
41
  from . import runner as runner
42
42
  from . import plugins as plugins
43
43
  from .plugins.datatools.s3.s3 import S3 as S3
44
44
  from . import includefile as includefile
45
45
  from .includefile import IncludeFile as IncludeFile
46
- from .plugins.pypi.parsers import requirements_txt_parser as requirements_txt_parser
47
46
  from .plugins.pypi.parsers import conda_environment_yml_parser as conda_environment_yml_parser
47
+ from .plugins.pypi.parsers import requirements_txt_parser as requirements_txt_parser
48
48
  from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
49
49
  from . import cards as cards
50
50
  from . import client as client
@@ -147,141 +147,86 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
147
147
  ...
148
148
 
149
149
  @typing.overload
150
- def catch(*, var: typing.Optional[str] = None, print_exception: bool = True) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
150
+ def card(*, type: str = 'default', id: typing.Optional[str] = None, options: typing.Dict[str, typing.Any] = {}, timeout: int = 45) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
151
151
  """
152
- Specifies that the step will success under all circumstances.
152
+ Creates a human-readable report, a Metaflow Card, after this step completes.
153
153
 
154
- The decorator will create an optional artifact, specified by `var`, which
155
- contains the exception raised. You can use it to detect the presence
156
- of errors, indicating that all happy-path artifacts produced by the step
157
- are missing.
154
+ Note that you may add multiple `@card` decorators in a step with different parameters.
158
155
 
159
156
 
160
157
  Parameters
161
158
  ----------
162
- var : str, optional, default None
163
- Name of the artifact in which to store the caught exception.
164
- If not specified, the exception is not stored.
165
- print_exception : bool, default True
166
- Determines whether or not the exception is printed to
167
- stdout when caught.
159
+ type : str, default 'default'
160
+ Card type.
161
+ id : str, optional, default None
162
+ If multiple cards are present, use this id to identify this card.
163
+ options : Dict[str, Any], default {}
164
+ Options passed to the card. The contents depend on the card type.
165
+ timeout : int, default 45
166
+ Interrupt reporting if it takes more than this many seconds.
168
167
  """
169
168
  ...
170
169
 
171
170
  @typing.overload
172
- def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
171
+ def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
173
172
  ...
174
173
 
175
174
  @typing.overload
176
- def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
177
- ...
178
-
179
- def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, var: typing.Optional[str] = None, print_exception: bool = True):
180
- """
181
- Specifies that the step will success under all circumstances.
182
-
183
- The decorator will create an optional artifact, specified by `var`, which
184
- contains the exception raised. You can use it to detect the presence
185
- of errors, indicating that all happy-path artifacts produced by the step
186
- are missing.
187
-
188
-
189
- Parameters
190
- ----------
191
- var : str, optional, default None
192
- Name of the artifact in which to store the caught exception.
193
- If not specified, the exception is not stored.
194
- print_exception : bool, default True
195
- Determines whether or not the exception is printed to
196
- stdout when caught.
197
- """
175
+ def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
198
176
  ...
199
177
 
200
- @typing.overload
201
- def environment(*, vars: typing.Dict[str, str] = {}) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
178
+ def card(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, type: str = 'default', id: typing.Optional[str] = None, options: typing.Dict[str, typing.Any] = {}, timeout: int = 45):
202
179
  """
203
- Specifies environment variables to be set prior to the execution of a step.
204
-
180
+ Creates a human-readable report, a Metaflow Card, after this step completes.
205
181
 
206
- Parameters
207
- ----------
208
- vars : Dict[str, str], default {}
209
- Dictionary of environment variables to set.
210
- """
211
- ...
212
-
213
- @typing.overload
214
- def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
215
- ...
216
-
217
- @typing.overload
218
- def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
219
- ...
220
-
221
- def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
222
- """
223
- Specifies environment variables to be set prior to the execution of a step.
182
+ Note that you may add multiple `@card` decorators in a step with different parameters.
224
183
 
225
184
 
226
185
  Parameters
227
186
  ----------
228
- vars : Dict[str, str], default {}
229
- Dictionary of environment variables to set.
187
+ type : str, default 'default'
188
+ Card type.
189
+ id : str, optional, default None
190
+ If multiple cards are present, use this id to identify this card.
191
+ options : Dict[str, Any], default {}
192
+ Options passed to the card. The contents depend on the card type.
193
+ timeout : int, default 45
194
+ Interrupt reporting if it takes more than this many seconds.
230
195
  """
231
196
  ...
232
197
 
233
198
  @typing.overload
234
- def retry(*, times: int = 3, minutes_between_retries: int = 2) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
199
+ def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = []) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
235
200
  """
236
- Specifies the number of times the task corresponding
237
- to a step needs to be retried.
238
-
239
- This decorator is useful for handling transient errors, such as networking issues.
240
- If your task contains operations that can't be retried safely, e.g. database updates,
241
- it is advisable to annotate it with `@retry(times=0)`.
242
-
243
- This can be used in conjunction with the `@catch` decorator. The `@catch`
244
- decorator will execute a no-op task after all retries have been exhausted,
245
- ensuring that the flow execution can continue.
201
+ Specifies secrets to be retrieved and injected as environment variables prior to
202
+ the execution of a step.
246
203
 
247
204
 
248
205
  Parameters
249
206
  ----------
250
- times : int, default 3
251
- Number of times to retry this task.
252
- minutes_between_retries : int, default 2
253
- Number of minutes between retries.
207
+ sources : List[Union[str, Dict[str, Any]]], default: []
208
+ List of secret specs, defining how the secrets are to be retrieved
254
209
  """
255
210
  ...
256
211
 
257
212
  @typing.overload
258
- def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
213
+ def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
259
214
  ...
260
215
 
261
216
  @typing.overload
262
- def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
217
+ def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
263
218
  ...
264
219
 
265
- def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, times: int = 3, minutes_between_retries: int = 2):
220
+ def secrets(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = []):
266
221
  """
267
- Specifies the number of times the task corresponding
268
- to a step needs to be retried.
269
-
270
- This decorator is useful for handling transient errors, such as networking issues.
271
- If your task contains operations that can't be retried safely, e.g. database updates,
272
- it is advisable to annotate it with `@retry(times=0)`.
273
-
274
- This can be used in conjunction with the `@catch` decorator. The `@catch`
275
- decorator will execute a no-op task after all retries have been exhausted,
276
- ensuring that the flow execution can continue.
222
+ Specifies secrets to be retrieved and injected as environment variables prior to
223
+ the execution of a step.
277
224
 
278
225
 
279
226
  Parameters
280
227
  ----------
281
- times : int, default 3
282
- Number of times to retry this task.
283
- minutes_between_retries : int, default 2
284
- Number of minutes between retries.
228
+ sources : List[Union[str, Dict[str, Any]]], default: []
229
+ List of secret specs, defining how the secrets are to be retrieved
285
230
  """
286
231
  ...
287
232
 
@@ -370,57 +315,6 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
370
315
  """
371
316
  ...
372
317
 
373
- @typing.overload
374
- def pypi(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
375
- """
376
- Specifies the PyPI packages for the step.
377
-
378
- Information in this decorator will augment any
379
- attributes set in the `@pyi_base` flow-level decorator. Hence,
380
- you can use `@pypi_base` to set packages required by all
381
- steps and use `@pypi` to specify step-specific overrides.
382
-
383
-
384
- Parameters
385
- ----------
386
- packages : Dict[str, str], default: {}
387
- Packages to use for this step. The key is the name of the package
388
- and the value is the version to use.
389
- python : str, optional, default: None
390
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
391
- that the version used will correspond to the version of the Python interpreter used to start the run.
392
- """
393
- ...
394
-
395
- @typing.overload
396
- def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
397
- ...
398
-
399
- @typing.overload
400
- def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
401
- ...
402
-
403
- def pypi(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
404
- """
405
- Specifies the PyPI packages for the step.
406
-
407
- Information in this decorator will augment any
408
- attributes set in the `@pyi_base` flow-level decorator. Hence,
409
- you can use `@pypi_base` to set packages required by all
410
- steps and use `@pypi` to specify step-specific overrides.
411
-
412
-
413
- Parameters
414
- ----------
415
- packages : Dict[str, str], default: {}
416
- Packages to use for this step. The key is the name of the package
417
- and the value is the version to use.
418
- python : str, optional, default: None
419
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
420
- that the version used will correspond to the version of the Python interpreter used to start the run.
421
- """
422
- ...
423
-
424
318
  @typing.overload
425
319
  def batch(*, cpu: int = 1, gpu: int = 0, memory: int = 4096, image: typing.Optional[str] = None, queue: str = 'METAFLOW_BATCH_JOB_QUEUE', iam_role: str = 'METAFLOW_ECS_S3_ACCESS_IAM_ROLE', execution_role: str = 'METAFLOW_ECS_FARGATE_EXECUTION_ROLE', shared_memory: typing.Optional[int] = None, max_swap: typing.Optional[int] = None, swappiness: typing.Optional[int] = None, use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = None, inferentia: int = 0, trainium: int = None, efa: int = 0, ephemeral_storage: int = None, log_driver: typing.Optional[str] = None, log_options: typing.Optional[typing.List[str]] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
426
320
  """
@@ -571,208 +465,131 @@ def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
571
465
  ...
572
466
 
573
467
  @typing.overload
574
- def card(*, type: str = 'default', id: typing.Optional[str] = None, options: typing.Dict[str, typing.Any] = {}, timeout: int = 45) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
468
+ def conda(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
575
469
  """
576
- Creates a human-readable report, a Metaflow Card, after this step completes.
470
+ Specifies the Conda environment for the step.
577
471
 
578
- Note that you may add multiple `@card` decorators in a step with different parameters.
472
+ Information in this decorator will augment any
473
+ attributes set in the `@conda_base` flow-level decorator. Hence,
474
+ you can use `@conda_base` to set packages required by all
475
+ steps and use `@conda` to specify step-specific overrides.
579
476
 
580
477
 
581
478
  Parameters
582
479
  ----------
583
- type : str, default 'default'
584
- Card type.
585
- id : str, optional, default None
586
- If multiple cards are present, use this id to identify this card.
587
- options : Dict[str, Any], default {}
588
- Options passed to the card. The contents depend on the card type.
589
- timeout : int, default 45
590
- Interrupt reporting if it takes more than this many seconds.
480
+ packages : Dict[str, str], default {}
481
+ Packages to use for this step. The key is the name of the package
482
+ and the value is the version to use.
483
+ libraries : Dict[str, str], default {}
484
+ Supported for backward compatibility. When used with packages, packages will take precedence.
485
+ python : str, optional, default None
486
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
487
+ that the version used will correspond to the version of the Python interpreter used to start the run.
488
+ disabled : bool, default False
489
+ If set to True, disables @conda.
591
490
  """
592
491
  ...
593
492
 
594
493
  @typing.overload
595
- def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
494
+ def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
596
495
  ...
597
496
 
598
497
  @typing.overload
599
- def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
498
+ def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
600
499
  ...
601
500
 
602
- def card(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, type: str = 'default', id: typing.Optional[str] = None, options: typing.Dict[str, typing.Any] = {}, timeout: int = 45):
501
+ def conda(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
603
502
  """
604
- Creates a human-readable report, a Metaflow Card, after this step completes.
503
+ Specifies the Conda environment for the step.
605
504
 
606
- Note that you may add multiple `@card` decorators in a step with different parameters.
505
+ Information in this decorator will augment any
506
+ attributes set in the `@conda_base` flow-level decorator. Hence,
507
+ you can use `@conda_base` to set packages required by all
508
+ steps and use `@conda` to specify step-specific overrides.
607
509
 
608
510
 
609
511
  Parameters
610
512
  ----------
611
- type : str, default 'default'
612
- Card type.
613
- id : str, optional, default None
614
- If multiple cards are present, use this id to identify this card.
615
- options : Dict[str, Any], default {}
616
- Options passed to the card. The contents depend on the card type.
617
- timeout : int, default 45
618
- Interrupt reporting if it takes more than this many seconds.
619
- """
620
- ...
621
-
622
- @typing.overload
623
- def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
624
- """
625
- Decorator prototype for all step decorators. This function gets specialized
626
- and imported for all decorators types by _import_plugin_decorators().
513
+ packages : Dict[str, str], default {}
514
+ Packages to use for this step. The key is the name of the package
515
+ and the value is the version to use.
516
+ libraries : Dict[str, str], default {}
517
+ Supported for backward compatibility. When used with packages, packages will take precedence.
518
+ python : str, optional, default None
519
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
520
+ that the version used will correspond to the version of the Python interpreter used to start the run.
521
+ disabled : bool, default False
522
+ If set to True, disables @conda.
627
523
  """
628
524
  ...
629
525
 
630
526
  @typing.overload
631
- def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
632
- ...
633
-
634
- def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
527
+ def pypi(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
635
528
  """
636
- Decorator prototype for all step decorators. This function gets specialized
637
- and imported for all decorators types by _import_plugin_decorators().
638
- """
639
- ...
640
-
641
- @typing.overload
642
- def resources(*, cpu: int = 1, gpu: typing.Optional[int] = None, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
643
- """
644
- Specifies the resources needed when executing this step.
645
-
646
- Use `@resources` to specify the resource requirements
647
- independently of the specific compute layer (`@batch`, `@kubernetes`).
529
+ Specifies the PyPI packages for the step.
648
530
 
649
- You can choose the compute layer on the command line by executing e.g.
650
- ```
651
- python myflow.py run --with batch
652
- ```
653
- or
654
- ```
655
- python myflow.py run --with kubernetes
656
- ```
657
- which executes the flow on the desired system using the
658
- requirements specified in `@resources`.
531
+ Information in this decorator will augment any
532
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
533
+ you can use `@pypi_base` to set packages required by all
534
+ steps and use `@pypi` to specify step-specific overrides.
659
535
 
660
536
 
661
537
  Parameters
662
538
  ----------
663
- cpu : int, default 1
664
- Number of CPUs required for this step.
665
- gpu : int, optional, default None
666
- Number of GPUs required for this step.
667
- disk : int, optional, default None
668
- Disk size (in MB) required for this step. Only applies on Kubernetes.
669
- memory : int, default 4096
670
- Memory size (in MB) required for this step.
671
- shared_memory : int, optional, default None
672
- The value for the size (in MiB) of the /dev/shm volume for this step.
673
- This parameter maps to the `--shm-size` option in Docker.
539
+ packages : Dict[str, str], default: {}
540
+ Packages to use for this step. The key is the name of the package
541
+ and the value is the version to use.
542
+ python : str, optional, default: None
543
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
544
+ that the version used will correspond to the version of the Python interpreter used to start the run.
674
545
  """
675
546
  ...
676
547
 
677
548
  @typing.overload
678
- def resources(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
549
+ def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
679
550
  ...
680
551
 
681
552
  @typing.overload
682
- def resources(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
683
- ...
684
-
685
- def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, cpu: int = 1, gpu: typing.Optional[int] = None, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None):
686
- """
687
- Specifies the resources needed when executing this step.
688
-
689
- Use `@resources` to specify the resource requirements
690
- independently of the specific compute layer (`@batch`, `@kubernetes`).
691
-
692
- You can choose the compute layer on the command line by executing e.g.
693
- ```
694
- python myflow.py run --with batch
695
- ```
696
- or
697
- ```
698
- python myflow.py run --with kubernetes
699
- ```
700
- which executes the flow on the desired system using the
701
- requirements specified in `@resources`.
702
-
703
-
704
- Parameters
705
- ----------
706
- cpu : int, default 1
707
- Number of CPUs required for this step.
708
- gpu : int, optional, default None
709
- Number of GPUs required for this step.
710
- disk : int, optional, default None
711
- Disk size (in MB) required for this step. Only applies on Kubernetes.
712
- memory : int, default 4096
713
- Memory size (in MB) required for this step.
714
- shared_memory : int, optional, default None
715
- The value for the size (in MiB) of the /dev/shm volume for this step.
716
- This parameter maps to the `--shm-size` option in Docker.
717
- """
553
+ def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
718
554
  ...
719
555
 
720
- @typing.overload
721
- def conda(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
556
+ def pypi(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
722
557
  """
723
- Specifies the Conda environment for the step.
558
+ Specifies the PyPI packages for the step.
724
559
 
725
560
  Information in this decorator will augment any
726
- attributes set in the `@conda_base` flow-level decorator. Hence,
727
- you can use `@conda_base` to set packages required by all
728
- steps and use `@conda` to specify step-specific overrides.
561
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
562
+ you can use `@pypi_base` to set packages required by all
563
+ steps and use `@pypi` to specify step-specific overrides.
729
564
 
730
565
 
731
566
  Parameters
732
567
  ----------
733
- packages : Dict[str, str], default {}
568
+ packages : Dict[str, str], default: {}
734
569
  Packages to use for this step. The key is the name of the package
735
570
  and the value is the version to use.
736
- libraries : Dict[str, str], default {}
737
- Supported for backward compatibility. When used with packages, packages will take precedence.
738
- python : str, optional, default None
571
+ python : str, optional, default: None
739
572
  Version of Python to use, e.g. '3.7.4'. A default value of None implies
740
573
  that the version used will correspond to the version of the Python interpreter used to start the run.
741
- disabled : bool, default False
742
- If set to True, disables @conda.
743
574
  """
744
575
  ...
745
576
 
746
577
  @typing.overload
747
- def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
578
+ def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
579
+ """
580
+ Decorator prototype for all step decorators. This function gets specialized
581
+ and imported for all decorators types by _import_plugin_decorators().
582
+ """
748
583
  ...
749
584
 
750
585
  @typing.overload
751
- def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
586
+ def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
752
587
  ...
753
588
 
754
- def conda(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
589
+ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
755
590
  """
756
- Specifies the Conda environment for the step.
757
-
758
- Information in this decorator will augment any
759
- attributes set in the `@conda_base` flow-level decorator. Hence,
760
- you can use `@conda_base` to set packages required by all
761
- steps and use `@conda` to specify step-specific overrides.
762
-
763
-
764
- Parameters
765
- ----------
766
- packages : Dict[str, str], default {}
767
- Packages to use for this step. The key is the name of the package
768
- and the value is the version to use.
769
- libraries : Dict[str, str], default {}
770
- Supported for backward compatibility. When used with packages, packages will take precedence.
771
- python : str, optional, default None
772
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
773
- that the version used will correspond to the version of the Python interpreter used to start the run.
774
- disabled : bool, default False
775
- If set to True, disables @conda.
591
+ Decorator prototype for all step decorators. This function gets specialized
592
+ and imported for all decorators types by _import_plugin_decorators().
776
593
  """
777
594
  ...
778
595
 
@@ -836,88 +653,306 @@ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
836
653
  ...
837
654
 
838
655
  @typing.overload
839
- def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = []) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
656
+ def retry(*, times: int = 3, minutes_between_retries: int = 2) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
840
657
  """
841
- Specifies secrets to be retrieved and injected as environment variables prior to
842
- the execution of a step.
658
+ Specifies the number of times the task corresponding
659
+ to a step needs to be retried.
660
+
661
+ This decorator is useful for handling transient errors, such as networking issues.
662
+ If your task contains operations that can't be retried safely, e.g. database updates,
663
+ it is advisable to annotate it with `@retry(times=0)`.
664
+
665
+ This can be used in conjunction with the `@catch` decorator. The `@catch`
666
+ decorator will execute a no-op task after all retries have been exhausted,
667
+ ensuring that the flow execution can continue.
843
668
 
844
669
 
845
670
  Parameters
846
671
  ----------
847
- sources : List[Union[str, Dict[str, Any]]], default: []
848
- List of secret specs, defining how the secrets are to be retrieved
672
+ times : int, default 3
673
+ Number of times to retry this task.
674
+ minutes_between_retries : int, default 2
675
+ Number of minutes between retries.
849
676
  """
850
677
  ...
851
678
 
852
679
  @typing.overload
853
- def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
680
+ def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
854
681
  ...
855
682
 
856
683
  @typing.overload
857
- def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
684
+ def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
858
685
  ...
859
686
 
860
- def secrets(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = []):
687
+ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, times: int = 3, minutes_between_retries: int = 2):
861
688
  """
862
- Specifies secrets to be retrieved and injected as environment variables prior to
863
- the execution of a step.
689
+ Specifies the number of times the task corresponding
690
+ to a step needs to be retried.
691
+
692
+ This decorator is useful for handling transient errors, such as networking issues.
693
+ If your task contains operations that can't be retried safely, e.g. database updates,
694
+ it is advisable to annotate it with `@retry(times=0)`.
695
+
696
+ This can be used in conjunction with the `@catch` decorator. The `@catch`
697
+ decorator will execute a no-op task after all retries have been exhausted,
698
+ ensuring that the flow execution can continue.
864
699
 
865
700
 
866
701
  Parameters
867
702
  ----------
868
- sources : List[Union[str, Dict[str, Any]]], default: []
869
- List of secret specs, defining how the secrets are to be retrieved
703
+ times : int, default 3
704
+ Number of times to retry this task.
705
+ minutes_between_retries : int, default 2
706
+ Number of minutes between retries.
870
707
  """
871
708
  ...
872
709
 
873
710
  @typing.overload
874
- def schedule(*, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
711
+ def environment(*, vars: typing.Dict[str, str] = {}) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
875
712
  """
876
- Specifies the times when the flow should be run when running on a
877
- production scheduler.
713
+ Specifies environment variables to be set prior to the execution of a step.
878
714
 
879
715
 
880
716
  Parameters
881
717
  ----------
882
- hourly : bool, default False
883
- Run the workflow hourly.
884
- daily : bool, default True
885
- Run the workflow daily.
886
- weekly : bool, default False
887
- Run the workflow weekly.
888
- cron : str, optional, default None
889
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
890
- specified by this expression.
891
- timezone : str, optional, default None
892
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
893
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
718
+ vars : Dict[str, str], default {}
719
+ Dictionary of environment variables to set.
894
720
  """
895
721
  ...
896
722
 
897
723
  @typing.overload
898
- def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
724
+ def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
899
725
  ...
900
726
 
901
- def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None):
727
+ @typing.overload
728
+ def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
729
+ ...
730
+
731
+ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
732
+ """
733
+ Specifies environment variables to be set prior to the execution of a step.
734
+
735
+
736
+ Parameters
737
+ ----------
738
+ vars : Dict[str, str], default {}
739
+ Dictionary of environment variables to set.
740
+ """
741
+ ...
742
+
743
+ @typing.overload
744
+ def resources(*, cpu: int = 1, gpu: typing.Optional[int] = None, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
745
+ """
746
+ Specifies the resources needed when executing this step.
747
+
748
+ Use `@resources` to specify the resource requirements
749
+ independently of the specific compute layer (`@batch`, `@kubernetes`).
750
+
751
+ You can choose the compute layer on the command line by executing e.g.
752
+ ```
753
+ python myflow.py run --with batch
754
+ ```
755
+ or
756
+ ```
757
+ python myflow.py run --with kubernetes
758
+ ```
759
+ which executes the flow on the desired system using the
760
+ requirements specified in `@resources`.
761
+
762
+
763
+ Parameters
764
+ ----------
765
+ cpu : int, default 1
766
+ Number of CPUs required for this step.
767
+ gpu : int, optional, default None
768
+ Number of GPUs required for this step.
769
+ disk : int, optional, default None
770
+ Disk size (in MB) required for this step. Only applies on Kubernetes.
771
+ memory : int, default 4096
772
+ Memory size (in MB) required for this step.
773
+ shared_memory : int, optional, default None
774
+ The value for the size (in MiB) of the /dev/shm volume for this step.
775
+ This parameter maps to the `--shm-size` option in Docker.
776
+ """
777
+ ...
778
+
779
+ @typing.overload
780
+ def resources(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
781
+ ...
782
+
783
+ @typing.overload
784
+ def resources(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
785
+ ...
786
+
787
+ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, cpu: int = 1, gpu: typing.Optional[int] = None, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None):
788
+ """
789
+ Specifies the resources needed when executing this step.
790
+
791
+ Use `@resources` to specify the resource requirements
792
+ independently of the specific compute layer (`@batch`, `@kubernetes`).
793
+
794
+ You can choose the compute layer on the command line by executing e.g.
795
+ ```
796
+ python myflow.py run --with batch
797
+ ```
798
+ or
799
+ ```
800
+ python myflow.py run --with kubernetes
801
+ ```
802
+ which executes the flow on the desired system using the
803
+ requirements specified in `@resources`.
804
+
805
+
806
+ Parameters
807
+ ----------
808
+ cpu : int, default 1
809
+ Number of CPUs required for this step.
810
+ gpu : int, optional, default None
811
+ Number of GPUs required for this step.
812
+ disk : int, optional, default None
813
+ Disk size (in MB) required for this step. Only applies on Kubernetes.
814
+ memory : int, default 4096
815
+ Memory size (in MB) required for this step.
816
+ shared_memory : int, optional, default None
817
+ The value for the size (in MiB) of the /dev/shm volume for this step.
818
+ This parameter maps to the `--shm-size` option in Docker.
819
+ """
820
+ ...
821
+
822
+ @typing.overload
823
+ def catch(*, var: typing.Optional[str] = None, print_exception: bool = True) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
824
+ """
825
+ Specifies that the step will success under all circumstances.
826
+
827
+ The decorator will create an optional artifact, specified by `var`, which
828
+ contains the exception raised. You can use it to detect the presence
829
+ of errors, indicating that all happy-path artifacts produced by the step
830
+ are missing.
831
+
832
+
833
+ Parameters
834
+ ----------
835
+ var : str, optional, default None
836
+ Name of the artifact in which to store the caught exception.
837
+ If not specified, the exception is not stored.
838
+ print_exception : bool, default True
839
+ Determines whether or not the exception is printed to
840
+ stdout when caught.
841
+ """
842
+ ...
843
+
844
+ @typing.overload
845
+ def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
846
+ ...
847
+
848
+ @typing.overload
849
+ def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
850
+ ...
851
+
852
+ def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, var: typing.Optional[str] = None, print_exception: bool = True):
853
+ """
854
+ Specifies that the step will success under all circumstances.
855
+
856
+ The decorator will create an optional artifact, specified by `var`, which
857
+ contains the exception raised. You can use it to detect the presence
858
+ of errors, indicating that all happy-path artifacts produced by the step
859
+ are missing.
860
+
861
+
862
+ Parameters
863
+ ----------
864
+ var : str, optional, default None
865
+ Name of the artifact in which to store the caught exception.
866
+ If not specified, the exception is not stored.
867
+ print_exception : bool, default True
868
+ Determines whether or not the exception is printed to
869
+ stdout when caught.
870
+ """
871
+ ...
872
+
873
+ def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, bucket_key: typing.Union[str, typing.List[str]], bucket_name: str, wildcard_match: bool, aws_conn_id: str, verify: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
874
+ """
875
+ The `@airflow_s3_key_sensor` decorator attaches a Airflow [S3KeySensor](https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/_api/airflow/providers/amazon/aws/sensors/s3/index.html#airflow.providers.amazon.aws.sensors.s3.S3KeySensor)
876
+ before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
877
+ and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
878
+ added as a flow decorators. Adding more than one decorator will ensure that `start` step
879
+ starts only after all sensors finish.
880
+
881
+
882
+ Parameters
883
+ ----------
884
+ timeout : int
885
+ Time, in seconds before the task times out and fails. (Default: 3600)
886
+ poke_interval : int
887
+ Time in seconds that the job should wait in between each try. (Default: 60)
888
+ mode : str
889
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
890
+ exponential_backoff : bool
891
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
892
+ pool : str
893
+ the slot pool this task should run in,
894
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
895
+ soft_fail : bool
896
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
897
+ name : str
898
+ Name of the sensor on Airflow
899
+ description : str
900
+ Description of sensor in the Airflow UI
901
+ bucket_key : Union[str, List[str]]
902
+ The key(s) being waited on. Supports full s3:// style url or relative path from root level.
903
+ When it's specified as a full s3:// url, please leave `bucket_name` as None
904
+ bucket_name : str
905
+ Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
906
+ When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
907
+ wildcard_match : bool
908
+ whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
909
+ aws_conn_id : str
910
+ a reference to the s3 connection on Airflow. (Default: None)
911
+ verify : bool
912
+ Whether or not to verify SSL certificates for S3 connection. (Default: None)
913
+ """
914
+ ...
915
+
916
+ def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, external_dag_id: str, external_task_ids: typing.List[str], allowed_states: typing.List[str], failed_states: typing.List[str], execution_delta: "datetime.timedelta", check_existence: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
902
917
  """
903
- Specifies the times when the flow should be run when running on a
904
- production scheduler.
918
+ The `@airflow_external_task_sensor` decorator attaches a Airflow [ExternalTaskSensor](https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/sensors/external_task/index.html#airflow.sensors.external_task.ExternalTaskSensor) before the start step of the flow.
919
+ This decorator only works when a flow is scheduled on Airflow and is compiled using `airflow create`. More than one `@airflow_external_task_sensor` can be added as a flow decorators. Adding more than one decorator will ensure that `start` step starts only after all sensors finish.
905
920
 
906
921
 
907
922
  Parameters
908
923
  ----------
909
- hourly : bool, default False
910
- Run the workflow hourly.
911
- daily : bool, default True
912
- Run the workflow daily.
913
- weekly : bool, default False
914
- Run the workflow weekly.
915
- cron : str, optional, default None
916
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
917
- specified by this expression.
918
- timezone : str, optional, default None
919
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
920
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
924
+ timeout : int
925
+ Time, in seconds before the task times out and fails. (Default: 3600)
926
+ poke_interval : int
927
+ Time in seconds that the job should wait in between each try. (Default: 60)
928
+ mode : str
929
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
930
+ exponential_backoff : bool
931
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
932
+ pool : str
933
+ the slot pool this task should run in,
934
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
935
+ soft_fail : bool
936
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
937
+ name : str
938
+ Name of the sensor on Airflow
939
+ description : str
940
+ Description of sensor in the Airflow UI
941
+ external_dag_id : str
942
+ The dag_id that contains the task you want to wait for.
943
+ external_task_ids : List[str]
944
+ The list of task_ids that you want to wait for.
945
+ If None (default value) the sensor waits for the DAG. (Default: None)
946
+ allowed_states : List[str]
947
+ Iterable of allowed states, (Default: ['success'])
948
+ failed_states : List[str]
949
+ Iterable of failed or dis-allowed states. (Default: None)
950
+ execution_delta : datetime.timedelta
951
+ time difference with the previous execution to look at,
952
+ the default is the same logical date as the current task or DAG. (Default: None)
953
+ check_existence: bool
954
+ Set to True to check if the external task exists or check if
955
+ the DAG to wait for exists. (Default: True)
921
956
  """
922
957
  ...
923
958
 
@@ -1073,92 +1108,6 @@ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packa
1073
1108
  """
1074
1109
  ...
1075
1110
 
1076
- def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, external_dag_id: str, external_task_ids: typing.List[str], allowed_states: typing.List[str], failed_states: typing.List[str], execution_delta: "datetime.timedelta", check_existence: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1077
- """
1078
- The `@airflow_external_task_sensor` decorator attaches a Airflow [ExternalTaskSensor](https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/sensors/external_task/index.html#airflow.sensors.external_task.ExternalTaskSensor) before the start step of the flow.
1079
- This decorator only works when a flow is scheduled on Airflow and is compiled using `airflow create`. More than one `@airflow_external_task_sensor` can be added as a flow decorators. Adding more than one decorator will ensure that `start` step starts only after all sensors finish.
1080
-
1081
-
1082
- Parameters
1083
- ----------
1084
- timeout : int
1085
- Time, in seconds before the task times out and fails. (Default: 3600)
1086
- poke_interval : int
1087
- Time in seconds that the job should wait in between each try. (Default: 60)
1088
- mode : str
1089
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1090
- exponential_backoff : bool
1091
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1092
- pool : str
1093
- the slot pool this task should run in,
1094
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1095
- soft_fail : bool
1096
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1097
- name : str
1098
- Name of the sensor on Airflow
1099
- description : str
1100
- Description of sensor in the Airflow UI
1101
- external_dag_id : str
1102
- The dag_id that contains the task you want to wait for.
1103
- external_task_ids : List[str]
1104
- The list of task_ids that you want to wait for.
1105
- If None (default value) the sensor waits for the DAG. (Default: None)
1106
- allowed_states : List[str]
1107
- Iterable of allowed states, (Default: ['success'])
1108
- failed_states : List[str]
1109
- Iterable of failed or dis-allowed states. (Default: None)
1110
- execution_delta : datetime.timedelta
1111
- time difference with the previous execution to look at,
1112
- the default is the same logical date as the current task or DAG. (Default: None)
1113
- check_existence: bool
1114
- Set to True to check if the external task exists or check if
1115
- the DAG to wait for exists. (Default: True)
1116
- """
1117
- ...
1118
-
1119
- def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, bucket_key: typing.Union[str, typing.List[str]], bucket_name: str, wildcard_match: bool, aws_conn_id: str, verify: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1120
- """
1121
- The `@airflow_s3_key_sensor` decorator attaches a Airflow [S3KeySensor](https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/_api/airflow/providers/amazon/aws/sensors/s3/index.html#airflow.providers.amazon.aws.sensors.s3.S3KeySensor)
1122
- before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
1123
- and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
1124
- added as a flow decorators. Adding more than one decorator will ensure that `start` step
1125
- starts only after all sensors finish.
1126
-
1127
-
1128
- Parameters
1129
- ----------
1130
- timeout : int
1131
- Time, in seconds before the task times out and fails. (Default: 3600)
1132
- poke_interval : int
1133
- Time in seconds that the job should wait in between each try. (Default: 60)
1134
- mode : str
1135
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1136
- exponential_backoff : bool
1137
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1138
- pool : str
1139
- the slot pool this task should run in,
1140
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1141
- soft_fail : bool
1142
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1143
- name : str
1144
- Name of the sensor on Airflow
1145
- description : str
1146
- Description of sensor in the Airflow UI
1147
- bucket_key : Union[str, List[str]]
1148
- The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1149
- When it's specified as a full s3:// url, please leave `bucket_name` as None
1150
- bucket_name : str
1151
- Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1152
- When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1153
- wildcard_match : bool
1154
- whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1155
- aws_conn_id : str
1156
- a reference to the s3 connection on Airflow. (Default: None)
1157
- verify : bool
1158
- Whether or not to verify SSL certificates for S3 connection. (Default: None)
1159
- """
1160
- ...
1161
-
1162
1111
  @typing.overload
1163
1112
  def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1164
1113
  """
@@ -1200,41 +1149,6 @@ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packag
1200
1149
  """
1201
1150
  ...
1202
1151
 
1203
- def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1204
- """
1205
- Specifies what flows belong to the same project.
1206
-
1207
- A project-specific namespace is created for all flows that
1208
- use the same `@project(name)`.
1209
-
1210
-
1211
- Parameters
1212
- ----------
1213
- name : str
1214
- Project name. Make sure that the name is unique amongst all
1215
- projects that use the same production scheduler. The name may
1216
- contain only lowercase alphanumeric characters and underscores.
1217
-
1218
- branch : Optional[str], default None
1219
- The branch to use. If not specified, the branch is set to
1220
- `user.<username>` unless `production` is set to `True`. This can
1221
- also be set on the command line using `--branch` as a top-level option.
1222
- It is an error to specify `branch` in the decorator and on the command line.
1223
-
1224
- production : bool, default False
1225
- Whether or not the branch is the production branch. This can also be set on the
1226
- command line using `--production` as a top-level option. It is an error to specify
1227
- `production` in the decorator and on the command line.
1228
- The project branch name will be:
1229
- - if `branch` is specified:
1230
- - if `production` is True: `prod.<branch>`
1231
- - if `production` is False: `test.<branch>`
1232
- - if `branch` is not specified:
1233
- - if `production` is True: `prod`
1234
- - if `production` is False: `user.<username>`
1235
- """
1236
- ...
1237
-
1238
1152
  @typing.overload
1239
1153
  def trigger(*, event: typing.Union[str, typing.Dict[str, typing.Any], None] = None, events: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], options: typing.Dict[str, typing.Any] = {}) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1240
1154
  """
@@ -1328,3 +1242,89 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
1328
1242
  """
1329
1243
  ...
1330
1244
 
1245
+ def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1246
+ """
1247
+ Specifies what flows belong to the same project.
1248
+
1249
+ A project-specific namespace is created for all flows that
1250
+ use the same `@project(name)`.
1251
+
1252
+
1253
+ Parameters
1254
+ ----------
1255
+ name : str
1256
+ Project name. Make sure that the name is unique amongst all
1257
+ projects that use the same production scheduler. The name may
1258
+ contain only lowercase alphanumeric characters and underscores.
1259
+
1260
+ branch : Optional[str], default None
1261
+ The branch to use. If not specified, the branch is set to
1262
+ `user.<username>` unless `production` is set to `True`. This can
1263
+ also be set on the command line using `--branch` as a top-level option.
1264
+ It is an error to specify `branch` in the decorator and on the command line.
1265
+
1266
+ production : bool, default False
1267
+ Whether or not the branch is the production branch. This can also be set on the
1268
+ command line using `--production` as a top-level option. It is an error to specify
1269
+ `production` in the decorator and on the command line.
1270
+ The project branch name will be:
1271
+ - if `branch` is specified:
1272
+ - if `production` is True: `prod.<branch>`
1273
+ - if `production` is False: `test.<branch>`
1274
+ - if `branch` is not specified:
1275
+ - if `production` is True: `prod`
1276
+ - if `production` is False: `user.<username>`
1277
+ """
1278
+ ...
1279
+
1280
+ @typing.overload
1281
+ def schedule(*, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1282
+ """
1283
+ Specifies the times when the flow should be run when running on a
1284
+ production scheduler.
1285
+
1286
+
1287
+ Parameters
1288
+ ----------
1289
+ hourly : bool, default False
1290
+ Run the workflow hourly.
1291
+ daily : bool, default True
1292
+ Run the workflow daily.
1293
+ weekly : bool, default False
1294
+ Run the workflow weekly.
1295
+ cron : str, optional, default None
1296
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1297
+ specified by this expression.
1298
+ timezone : str, optional, default None
1299
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1300
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1301
+ """
1302
+ ...
1303
+
1304
+ @typing.overload
1305
+ def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1306
+ ...
1307
+
1308
+ def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None):
1309
+ """
1310
+ Specifies the times when the flow should be run when running on a
1311
+ production scheduler.
1312
+
1313
+
1314
+ Parameters
1315
+ ----------
1316
+ hourly : bool, default False
1317
+ Run the workflow hourly.
1318
+ daily : bool, default True
1319
+ Run the workflow daily.
1320
+ weekly : bool, default False
1321
+ Run the workflow weekly.
1322
+ cron : str, optional, default None
1323
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1324
+ specified by this expression.
1325
+ timezone : str, optional, default None
1326
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1327
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1328
+ """
1329
+ ...
1330
+