metaflow-stubs 2.14.1__py2.py3-none-any.whl → 2.14.3__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 (145) hide show
  1. metaflow-stubs/__init__.pyi +467 -467
  2. metaflow-stubs/cards.pyi +2 -2
  3. metaflow-stubs/cli.pyi +2 -7
  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 +2 -2
  10. metaflow-stubs/exception.pyi +2 -2
  11. metaflow-stubs/flowspec.pyi +4 -4
  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 +5 -3
  20. metaflow-stubs/metaflow_current.pyi +23 -23
  21. metaflow-stubs/multicore_utils.pyi +2 -2
  22. metaflow-stubs/parameters.pyi +3 -3
  23. metaflow-stubs/plugins/__init__.pyi +9 -9
  24. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  25. metaflow-stubs/plugins/airflow/airflow_decorator.pyi +2 -2
  26. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  27. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  28. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
  29. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
  30. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
  31. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
  32. metaflow-stubs/plugins/argo/__init__.pyi +2 -2
  33. metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
  34. metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
  35. metaflow-stubs/plugins/argo/argo_workflows.pyi +2 -2
  36. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +4 -4
  37. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
  38. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +2 -2
  39. metaflow-stubs/plugins/aws/__init__.pyi +4 -4
  40. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  41. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  42. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  43. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  44. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  45. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -2
  46. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  47. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +2 -2
  48. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
  49. metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +2 -2
  50. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  51. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
  52. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
  53. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  54. metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +2 -2
  55. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +3 -3
  56. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +2 -2
  57. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  58. metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
  59. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  60. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +2 -2
  61. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  62. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  63. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  64. metaflow-stubs/plugins/cards/__init__.pyi +2 -2
  65. metaflow-stubs/plugins/cards/card_client.pyi +3 -3
  66. metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
  67. metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
  68. metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
  69. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  70. metaflow-stubs/plugins/cards/card_modules/basic.pyi +3 -3
  71. metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
  72. metaflow-stubs/plugins/cards/card_modules/components.pyi +3 -3
  73. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
  74. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  75. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
  76. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  77. metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
  78. metaflow-stubs/plugins/cards/exception.pyi +2 -2
  79. metaflow-stubs/plugins/catch_decorator.pyi +3 -3
  80. metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
  81. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  82. metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
  83. metaflow-stubs/plugins/datatools/s3/s3.pyi +4 -4
  84. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  85. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  86. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  87. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  88. metaflow-stubs/plugins/environment_decorator.pyi +2 -2
  89. metaflow-stubs/plugins/events_decorator.pyi +2 -2
  90. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  91. metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
  92. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  93. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +2 -2
  94. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  95. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  96. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  97. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  98. metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
  99. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
  100. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
  101. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  102. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
  103. metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +2 -2
  104. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
  105. metaflow-stubs/plugins/kubernetes/spot_monitor_sidecar.pyi +2 -2
  106. metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
  107. metaflow-stubs/plugins/project_decorator.pyi +2 -2
  108. metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
  109. metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
  110. metaflow-stubs/plugins/pypi/conda_environment.pyi +4 -4
  111. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
  112. metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
  113. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  114. metaflow-stubs/plugins/resources_decorator.pyi +2 -2
  115. metaflow-stubs/plugins/retry_decorator.pyi +2 -2
  116. metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
  117. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
  118. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
  119. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  120. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +3 -3
  121. metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
  122. metaflow-stubs/pylint_wrapper.pyi +2 -2
  123. metaflow-stubs/runner/__init__.pyi +2 -2
  124. metaflow-stubs/runner/deployer.pyi +29 -29
  125. metaflow-stubs/runner/deployer_impl.pyi +2 -2
  126. metaflow-stubs/runner/metaflow_runner.pyi +3 -3
  127. metaflow-stubs/runner/nbdeploy.pyi +2 -2
  128. metaflow-stubs/runner/nbrun.pyi +2 -2
  129. metaflow-stubs/runner/subprocess_manager.pyi +2 -2
  130. metaflow-stubs/runner/utils.pyi +4 -4
  131. metaflow-stubs/system/__init__.pyi +2 -2
  132. metaflow-stubs/system/system_logger.pyi +3 -3
  133. metaflow-stubs/system/system_monitor.pyi +2 -2
  134. metaflow-stubs/tagging_util.pyi +2 -2
  135. metaflow-stubs/tuple_util.pyi +2 -2
  136. metaflow-stubs/user_configs/__init__.pyi +2 -2
  137. metaflow-stubs/user_configs/config_decorators.pyi +6 -6
  138. metaflow-stubs/user_configs/config_options.pyi +2 -2
  139. metaflow-stubs/user_configs/config_parameters.pyi +5 -5
  140. metaflow-stubs/version.pyi +2 -2
  141. {metaflow_stubs-2.14.1.dist-info → metaflow_stubs-2.14.3.dist-info}/METADATA +2 -2
  142. metaflow_stubs-2.14.3.dist-info/RECORD +145 -0
  143. metaflow_stubs-2.14.1.dist-info/RECORD +0 -145
  144. {metaflow_stubs-2.14.1.dist-info → metaflow_stubs-2.14.3.dist-info}/WHEEL +0 -0
  145. {metaflow_stubs-2.14.1.dist-info → metaflow_stubs-2.14.3.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.14.1 #
4
- # Generated on 2025-02-21T00:53:08.401724 #
3
+ # MF version: 2.14.3 #
4
+ # Generated on 2025-02-22T04:36:00.916575 #
5
5
  ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -35,8 +35,8 @@ 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 events as events
39
38
  from . import tuple_util as tuple_util
39
+ from . import events as events
40
40
  from . import runner as runner
41
41
  from . import plugins as plugins
42
42
  from .plugins.datatools.s3.s3 import S3 as S3
@@ -193,55 +193,6 @@ def pypi(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typ
193
193
  """
194
194
  ...
195
195
 
196
- @typing.overload
197
- 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]]]:
198
- """
199
- Creates a human-readable report, a Metaflow Card, after this step completes.
200
-
201
- Note that you may add multiple `@card` decorators in a step with different parameters.
202
-
203
-
204
- Parameters
205
- ----------
206
- type : str, default 'default'
207
- Card type.
208
- id : str, optional, default None
209
- If multiple cards are present, use this id to identify this card.
210
- options : Dict[str, Any], default {}
211
- Options passed to the card. The contents depend on the card type.
212
- timeout : int, default 45
213
- Interrupt reporting if it takes more than this many seconds.
214
- """
215
- ...
216
-
217
- @typing.overload
218
- def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
219
- ...
220
-
221
- @typing.overload
222
- def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
223
- ...
224
-
225
- 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):
226
- """
227
- Creates a human-readable report, a Metaflow Card, after this step completes.
228
-
229
- Note that you may add multiple `@card` decorators in a step with different parameters.
230
-
231
-
232
- Parameters
233
- ----------
234
- type : str, default 'default'
235
- Card type.
236
- id : str, optional, default None
237
- If multiple cards are present, use this id to identify this card.
238
- options : Dict[str, Any], default {}
239
- Options passed to the card. The contents depend on the card type.
240
- timeout : int, default 45
241
- Interrupt reporting if it takes more than this many seconds.
242
- """
243
- ...
244
-
245
196
  @typing.overload
246
197
  def timeout(*, seconds: int = 0, minutes: int = 0, hours: int = 0) -> 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]]]:
247
198
  """
@@ -302,114 +253,121 @@ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
302
253
  ...
303
254
 
304
255
  @typing.overload
305
- 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]]]:
256
+ def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
306
257
  """
307
- Specifies secrets to be retrieved and injected as environment variables prior to
308
- the execution of a step.
258
+ Parameters
259
+ ----------
260
+ """
261
+ ...
262
+
263
+ @typing.overload
264
+ def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
265
+ ...
266
+
267
+ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
268
+ """
269
+ Parameters
270
+ ----------
271
+ """
272
+ ...
273
+
274
+ @typing.overload
275
+ 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]]]:
276
+ """
277
+ Creates a human-readable report, a Metaflow Card, after this step completes.
278
+
279
+ Note that you may add multiple `@card` decorators in a step with different parameters.
309
280
 
310
281
 
311
282
  Parameters
312
283
  ----------
313
- sources : List[Union[str, Dict[str, Any]]], default: []
314
- List of secret specs, defining how the secrets are to be retrieved
284
+ type : str, default 'default'
285
+ Card type.
286
+ id : str, optional, default None
287
+ If multiple cards are present, use this id to identify this card.
288
+ options : Dict[str, Any], default {}
289
+ Options passed to the card. The contents depend on the card type.
290
+ timeout : int, default 45
291
+ Interrupt reporting if it takes more than this many seconds.
315
292
  """
316
293
  ...
317
294
 
318
295
  @typing.overload
319
- def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
296
+ def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
320
297
  ...
321
298
 
322
299
  @typing.overload
323
- def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
300
+ def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
324
301
  ...
325
302
 
326
- 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]]] = []):
303
+ 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):
327
304
  """
328
- Specifies secrets to be retrieved and injected as environment variables prior to
329
- the execution of a step.
305
+ Creates a human-readable report, a Metaflow Card, after this step completes.
306
+
307
+ Note that you may add multiple `@card` decorators in a step with different parameters.
330
308
 
331
309
 
332
310
  Parameters
333
311
  ----------
334
- sources : List[Union[str, Dict[str, Any]]], default: []
335
- List of secret specs, defining how the secrets are to be retrieved
312
+ type : str, default 'default'
313
+ Card type.
314
+ id : str, optional, default None
315
+ If multiple cards are present, use this id to identify this card.
316
+ options : Dict[str, Any], default {}
317
+ Options passed to the card. The contents depend on the card type.
318
+ timeout : int, default 45
319
+ Interrupt reporting if it takes more than this many seconds.
336
320
  """
337
321
  ...
338
322
 
339
- def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: typing.Optional[str] = None, image_pull_policy: str = 'KUBERNETES_IMAGE_PULL_POLICY', service_account: str = 'METAFLOW_KUBERNETES_SERVICE_ACCOUNT', secrets: typing.Optional[typing.List[str]] = None, node_selector: typing.Union[typing.Dict[str, str], str, None] = None, namespace: str = 'METAFLOW_KUBERNETES_NAMESPACE', gpu: typing.Optional[int] = None, gpu_vendor: str = 'KUBERNETES_GPU_VENDOR', tolerations: typing.List[str] = [], labels: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_LABELS', annotations: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_ANNOTATIONS', use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = '/metaflow_temp', persistent_volume_claims: typing.Optional[typing.Dict[str, str]] = None, shared_memory: typing.Optional[int] = None, port: typing.Optional[int] = None, compute_pool: typing.Optional[str] = None, hostname_resolution_timeout: int = 600, qos: str = 'Burstable') -> 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]]]:
323
+ @typing.overload
324
+ 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]]]:
340
325
  """
341
- Specifies that this step should execute on Kubernetes.
326
+ Specifies that the step will success under all circumstances.
327
+
328
+ The decorator will create an optional artifact, specified by `var`, which
329
+ contains the exception raised. You can use it to detect the presence
330
+ of errors, indicating that all happy-path artifacts produced by the step
331
+ are missing.
342
332
 
343
333
 
344
334
  Parameters
345
335
  ----------
346
- cpu : int, default 1
347
- Number of CPUs required for this step. If `@resources` is
348
- also present, the maximum value from all decorators is used.
349
- memory : int, default 4096
350
- Memory size (in MB) required for this step. If
351
- `@resources` is also present, the maximum value from all decorators is
352
- used.
353
- disk : int, default 10240
354
- Disk size (in MB) required for this step. If
355
- `@resources` is also present, the maximum value from all decorators is
356
- used.
357
- image : str, optional, default None
358
- Docker image to use when launching on Kubernetes. If not specified, and
359
- METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
360
- not, a default Docker image mapping to the current version of Python is used.
361
- image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
362
- If given, the imagePullPolicy to be applied to the Docker image of the step.
363
- service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
364
- Kubernetes service account to use when launching pod in Kubernetes.
365
- secrets : List[str], optional, default None
366
- Kubernetes secrets to use when launching pod in Kubernetes. These
367
- secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
368
- in Metaflow configuration.
369
- node_selector: Union[Dict[str,str], str], optional, default None
370
- Kubernetes node selector(s) to apply to the pod running the task.
371
- Can be passed in as a comma separated string of values e.g.
372
- 'kubernetes.io/os=linux,kubernetes.io/arch=amd64' or as a dictionary
373
- {'kubernetes.io/os': 'linux', 'kubernetes.io/arch': 'amd64'}
374
- namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
375
- Kubernetes namespace to use when launching pod in Kubernetes.
376
- gpu : int, optional, default None
377
- Number of GPUs required for this step. A value of zero implies that
378
- the scheduled node should not have GPUs.
379
- gpu_vendor : str, default KUBERNETES_GPU_VENDOR
380
- The vendor of the GPUs to be used for this step.
381
- tolerations : List[str], default []
382
- The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
383
- Kubernetes tolerations to use when launching pod in Kubernetes.
384
- labels: Dict[str, str], default: METAFLOW_KUBERNETES_LABELS
385
- Kubernetes labels to use when launching pod in Kubernetes.
386
- annotations: Dict[str, str], default: METAFLOW_KUBERNETES_ANNOTATIONS
387
- Kubernetes annotations to use when launching pod in Kubernetes.
388
- use_tmpfs : bool, default False
389
- This enables an explicit tmpfs mount for this step.
390
- tmpfs_tempdir : bool, default True
391
- sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
392
- tmpfs_size : int, optional, default: None
393
- The value for the size (in MiB) of the tmpfs mount for this step.
394
- This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
395
- memory allocated for this step.
396
- tmpfs_path : str, optional, default /metaflow_temp
397
- Path to tmpfs mount for this step.
398
- persistent_volume_claims : Dict[str, str], optional, default None
399
- A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
400
- volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
401
- shared_memory: int, optional
402
- Shared memory size (in MiB) required for this step
403
- port: int, optional
404
- Port number to specify in the Kubernetes job object
405
- compute_pool : str, optional, default None
406
- Compute pool to be used for for this step.
407
- If not specified, any accessible compute pool within the perimeter is used.
408
- hostname_resolution_timeout: int, default 10 * 60
409
- Timeout in seconds for the workers tasks in the gang scheduled cluster to resolve the hostname of control task.
410
- Only applicable when @parallel is used.
411
- qos: str, default: Burstable
412
- Quality of Service class to assign to the pod. Supported values are: Guaranteed, Burstable, BestEffort
336
+ var : str, optional, default None
337
+ Name of the artifact in which to store the caught exception.
338
+ If not specified, the exception is not stored.
339
+ print_exception : bool, default True
340
+ Determines whether or not the exception is printed to
341
+ stdout when caught.
342
+ """
343
+ ...
344
+
345
+ @typing.overload
346
+ def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
347
+ ...
348
+
349
+ @typing.overload
350
+ def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
351
+ ...
352
+
353
+ 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):
354
+ """
355
+ Specifies that the step will success under all circumstances.
356
+
357
+ The decorator will create an optional artifact, specified by `var`, which
358
+ contains the exception raised. You can use it to detect the presence
359
+ of errors, indicating that all happy-path artifacts produced by the step
360
+ are missing.
361
+
362
+
363
+ Parameters
364
+ ----------
365
+ var : str, optional, default None
366
+ Name of the artifact in which to store the caught exception.
367
+ If not specified, the exception is not stored.
368
+ print_exception : bool, default True
369
+ Determines whether or not the exception is printed to
370
+ stdout when caught.
413
371
  """
414
372
  ...
415
373
 
@@ -493,53 +451,61 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
493
451
  ...
494
452
 
495
453
  @typing.overload
496
- 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]]]:
454
+ 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]]]:
497
455
  """
498
- Specifies that the step will success under all circumstances.
456
+ Specifies the Conda environment for the step.
499
457
 
500
- The decorator will create an optional artifact, specified by `var`, which
501
- contains the exception raised. You can use it to detect the presence
502
- of errors, indicating that all happy-path artifacts produced by the step
503
- are missing.
458
+ Information in this decorator will augment any
459
+ attributes set in the `@conda_base` flow-level decorator. Hence,
460
+ you can use `@conda_base` to set packages required by all
461
+ steps and use `@conda` to specify step-specific overrides.
504
462
 
505
463
 
506
464
  Parameters
507
465
  ----------
508
- var : str, optional, default None
509
- Name of the artifact in which to store the caught exception.
510
- If not specified, the exception is not stored.
511
- print_exception : bool, default True
512
- Determines whether or not the exception is printed to
513
- stdout when caught.
466
+ packages : Dict[str, str], default {}
467
+ Packages to use for this step. The key is the name of the package
468
+ and the value is the version to use.
469
+ libraries : Dict[str, str], default {}
470
+ Supported for backward compatibility. When used with packages, packages will take precedence.
471
+ python : str, optional, default None
472
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
473
+ that the version used will correspond to the version of the Python interpreter used to start the run.
474
+ disabled : bool, default False
475
+ If set to True, disables @conda.
514
476
  """
515
477
  ...
516
478
 
517
479
  @typing.overload
518
- def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
480
+ def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
519
481
  ...
520
482
 
521
483
  @typing.overload
522
- def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
484
+ def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
523
485
  ...
524
486
 
525
- 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):
487
+ 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):
526
488
  """
527
- Specifies that the step will success under all circumstances.
489
+ Specifies the Conda environment for the step.
528
490
 
529
- The decorator will create an optional artifact, specified by `var`, which
530
- contains the exception raised. You can use it to detect the presence
531
- of errors, indicating that all happy-path artifacts produced by the step
532
- are missing.
491
+ Information in this decorator will augment any
492
+ attributes set in the `@conda_base` flow-level decorator. Hence,
493
+ you can use `@conda_base` to set packages required by all
494
+ steps and use `@conda` to specify step-specific overrides.
533
495
 
534
496
 
535
497
  Parameters
536
498
  ----------
537
- var : str, optional, default None
538
- Name of the artifact in which to store the caught exception.
539
- If not specified, the exception is not stored.
540
- print_exception : bool, default True
541
- Determines whether or not the exception is printed to
542
- stdout when caught.
499
+ packages : Dict[str, str], default {}
500
+ Packages to use for this step. The key is the name of the package
501
+ and the value is the version to use.
502
+ libraries : Dict[str, str], default {}
503
+ Supported for backward compatibility. When used with packages, packages will take precedence.
504
+ python : str, optional, default None
505
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
506
+ that the version used will correspond to the version of the Python interpreter used to start the run.
507
+ disabled : bool, default False
508
+ If set to True, disables @conda.
543
509
  """
544
510
  ...
545
511
 
@@ -692,114 +658,115 @@ def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
692
658
  """
693
659
  ...
694
660
 
695
- @typing.overload
696
- def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
697
- """
698
- Parameters
699
- ----------
700
- """
701
- ...
702
-
703
- @typing.overload
704
- def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
705
- ...
706
-
707
- def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
708
- """
709
- Parameters
710
- ----------
711
- """
712
- ...
713
-
714
- @typing.overload
715
- 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]]]:
716
- """
717
- Specifies environment variables to be set prior to the execution of a step.
718
-
719
-
720
- Parameters
721
- ----------
722
- vars : Dict[str, str], default {}
723
- Dictionary of environment variables to set.
724
- """
725
- ...
726
-
727
- @typing.overload
728
- def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
729
- ...
730
-
731
- @typing.overload
732
- def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
733
- ...
734
-
735
- def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
661
+ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: typing.Optional[str] = None, image_pull_policy: str = 'KUBERNETES_IMAGE_PULL_POLICY', service_account: str = 'METAFLOW_KUBERNETES_SERVICE_ACCOUNT', secrets: typing.Optional[typing.List[str]] = None, node_selector: typing.Union[typing.Dict[str, str], str, None] = None, namespace: str = 'METAFLOW_KUBERNETES_NAMESPACE', gpu: typing.Optional[int] = None, gpu_vendor: str = 'KUBERNETES_GPU_VENDOR', tolerations: typing.List[str] = [], labels: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_LABELS', annotations: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_ANNOTATIONS', use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = '/metaflow_temp', persistent_volume_claims: typing.Optional[typing.Dict[str, str]] = None, shared_memory: typing.Optional[int] = None, port: typing.Optional[int] = None, compute_pool: typing.Optional[str] = None, hostname_resolution_timeout: int = 600, qos: str = 'Burstable') -> 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]]]:
736
662
  """
737
- Specifies environment variables to be set prior to the execution of a step.
663
+ Specifies that this step should execute on Kubernetes.
738
664
 
739
665
 
740
666
  Parameters
741
667
  ----------
742
- vars : Dict[str, str], default {}
743
- Dictionary of environment variables to set.
668
+ cpu : int, default 1
669
+ Number of CPUs required for this step. If `@resources` is
670
+ also present, the maximum value from all decorators is used.
671
+ memory : int, default 4096
672
+ Memory size (in MB) required for this step. If
673
+ `@resources` is also present, the maximum value from all decorators is
674
+ used.
675
+ disk : int, default 10240
676
+ Disk size (in MB) required for this step. If
677
+ `@resources` is also present, the maximum value from all decorators is
678
+ used.
679
+ image : str, optional, default None
680
+ Docker image to use when launching on Kubernetes. If not specified, and
681
+ METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
682
+ not, a default Docker image mapping to the current version of Python is used.
683
+ image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
684
+ If given, the imagePullPolicy to be applied to the Docker image of the step.
685
+ service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
686
+ Kubernetes service account to use when launching pod in Kubernetes.
687
+ secrets : List[str], optional, default None
688
+ Kubernetes secrets to use when launching pod in Kubernetes. These
689
+ secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
690
+ in Metaflow configuration.
691
+ node_selector: Union[Dict[str,str], str], optional, default None
692
+ Kubernetes node selector(s) to apply to the pod running the task.
693
+ Can be passed in as a comma separated string of values e.g.
694
+ 'kubernetes.io/os=linux,kubernetes.io/arch=amd64' or as a dictionary
695
+ {'kubernetes.io/os': 'linux', 'kubernetes.io/arch': 'amd64'}
696
+ namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
697
+ Kubernetes namespace to use when launching pod in Kubernetes.
698
+ gpu : int, optional, default None
699
+ Number of GPUs required for this step. A value of zero implies that
700
+ the scheduled node should not have GPUs.
701
+ gpu_vendor : str, default KUBERNETES_GPU_VENDOR
702
+ The vendor of the GPUs to be used for this step.
703
+ tolerations : List[str], default []
704
+ The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
705
+ Kubernetes tolerations to use when launching pod in Kubernetes.
706
+ labels: Dict[str, str], default: METAFLOW_KUBERNETES_LABELS
707
+ Kubernetes labels to use when launching pod in Kubernetes.
708
+ annotations: Dict[str, str], default: METAFLOW_KUBERNETES_ANNOTATIONS
709
+ Kubernetes annotations to use when launching pod in Kubernetes.
710
+ use_tmpfs : bool, default False
711
+ This enables an explicit tmpfs mount for this step.
712
+ tmpfs_tempdir : bool, default True
713
+ sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
714
+ tmpfs_size : int, optional, default: None
715
+ The value for the size (in MiB) of the tmpfs mount for this step.
716
+ This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
717
+ memory allocated for this step.
718
+ tmpfs_path : str, optional, default /metaflow_temp
719
+ Path to tmpfs mount for this step.
720
+ persistent_volume_claims : Dict[str, str], optional, default None
721
+ A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
722
+ volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
723
+ shared_memory: int, optional
724
+ Shared memory size (in MiB) required for this step
725
+ port: int, optional
726
+ Port number to specify in the Kubernetes job object
727
+ compute_pool : str, optional, default None
728
+ Compute pool to be used for for this step.
729
+ If not specified, any accessible compute pool within the perimeter is used.
730
+ hostname_resolution_timeout: int, default 10 * 60
731
+ Timeout in seconds for the workers tasks in the gang scheduled cluster to resolve the hostname of control task.
732
+ Only applicable when @parallel is used.
733
+ qos: str, default: Burstable
734
+ Quality of Service class to assign to the pod. Supported values are: Guaranteed, Burstable, BestEffort
744
735
  """
745
736
  ...
746
737
 
747
738
  @typing.overload
748
- 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]]]:
739
+ 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]]]:
749
740
  """
750
- Specifies the Conda environment for the step.
751
-
752
- Information in this decorator will augment any
753
- attributes set in the `@conda_base` flow-level decorator. Hence,
754
- you can use `@conda_base` to set packages required by all
755
- steps and use `@conda` to specify step-specific overrides.
741
+ Specifies secrets to be retrieved and injected as environment variables prior to
742
+ the execution of a step.
756
743
 
757
744
 
758
745
  Parameters
759
746
  ----------
760
- packages : Dict[str, str], default {}
761
- Packages to use for this step. The key is the name of the package
762
- and the value is the version to use.
763
- libraries : Dict[str, str], default {}
764
- Supported for backward compatibility. When used with packages, packages will take precedence.
765
- python : str, optional, default None
766
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
767
- that the version used will correspond to the version of the Python interpreter used to start the run.
768
- disabled : bool, default False
769
- If set to True, disables @conda.
747
+ sources : List[Union[str, Dict[str, Any]]], default: []
748
+ List of secret specs, defining how the secrets are to be retrieved
770
749
  """
771
750
  ...
772
751
 
773
752
  @typing.overload
774
- def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
753
+ def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
775
754
  ...
776
755
 
777
756
  @typing.overload
778
- def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
757
+ def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
779
758
  ...
780
759
 
781
- 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):
760
+ 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]]] = []):
782
761
  """
783
- Specifies the Conda environment for the step.
784
-
785
- Information in this decorator will augment any
786
- attributes set in the `@conda_base` flow-level decorator. Hence,
787
- you can use `@conda_base` to set packages required by all
788
- steps and use `@conda` to specify step-specific overrides.
762
+ Specifies secrets to be retrieved and injected as environment variables prior to
763
+ the execution of a step.
789
764
 
790
765
 
791
766
  Parameters
792
767
  ----------
793
- packages : Dict[str, str], default {}
794
- Packages to use for this step. The key is the name of the package
795
- and the value is the version to use.
796
- libraries : Dict[str, str], default {}
797
- Supported for backward compatibility. When used with packages, packages will take precedence.
798
- python : str, optional, default None
799
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
800
- that the version used will correspond to the version of the Python interpreter used to start the run.
801
- disabled : bool, default False
802
- If set to True, disables @conda.
768
+ sources : List[Union[str, Dict[str, Any]]], default: []
769
+ List of secret specs, defining how the secrets are to be retrieved
803
770
  """
804
771
  ...
805
772
 
@@ -859,178 +826,67 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
859
826
  ...
860
827
 
861
828
  @typing.overload
862
- 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]]:
829
+ 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]]]:
863
830
  """
864
- Specifies the times when the flow should be run when running on a
865
- production scheduler.
831
+ Specifies environment variables to be set prior to the execution of a step.
866
832
 
867
833
 
868
834
  Parameters
869
835
  ----------
870
- hourly : bool, default False
871
- Run the workflow hourly.
872
- daily : bool, default True
873
- Run the workflow daily.
874
- weekly : bool, default False
875
- Run the workflow weekly.
876
- cron : str, optional, default None
877
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
878
- specified by this expression.
879
- timezone : str, optional, default None
880
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
881
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
836
+ vars : Dict[str, str], default {}
837
+ Dictionary of environment variables to set.
882
838
  """
883
839
  ...
884
840
 
885
841
  @typing.overload
886
- def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
842
+ def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
887
843
  ...
888
844
 
889
- 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):
845
+ @typing.overload
846
+ def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
847
+ ...
848
+
849
+ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
890
850
  """
891
- Specifies the times when the flow should be run when running on a
892
- production scheduler.
851
+ Specifies environment variables to be set prior to the execution of a step.
893
852
 
894
853
 
895
854
  Parameters
896
855
  ----------
897
- hourly : bool, default False
898
- Run the workflow hourly.
899
- daily : bool, default True
900
- Run the workflow daily.
901
- weekly : bool, default False
902
- Run the workflow weekly.
903
- cron : str, optional, default None
904
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
905
- specified by this expression.
906
- timezone : str, optional, default None
907
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
908
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
856
+ vars : Dict[str, str], default {}
857
+ Dictionary of environment variables to set.
909
858
  """
910
859
  ...
911
860
 
912
861
  @typing.overload
913
- 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]]:
862
+ def trigger_on_finish(*, flow: typing.Union[typing.Dict[str, str], str, None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
914
863
  """
915
- Specifies the event(s) that this flow depends on.
864
+ Specifies the flow(s) that this flow depends on.
916
865
 
917
866
  ```
918
- @trigger(event='foo')
867
+ @trigger_on_finish(flow='FooFlow')
919
868
  ```
920
869
  or
921
870
  ```
922
- @trigger(events=['foo', 'bar'])
871
+ @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
923
872
  ```
873
+ This decorator respects the @project decorator and triggers the flow
874
+ when upstream runs within the same namespace complete successfully
924
875
 
925
- Additionally, you can specify the parameter mappings
926
- to map event payload to Metaflow parameters for the flow.
876
+ Additionally, you can specify project aware upstream flow dependencies
877
+ by specifying the fully qualified project_flow_name.
927
878
  ```
928
- @trigger(event={'name':'foo', 'parameters':{'flow_param': 'event_field'}})
879
+ @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
929
880
  ```
930
881
  or
931
882
  ```
932
- @trigger(events=[{'name':'foo', 'parameters':{'flow_param_1': 'event_field_1'},
933
- {'name':'bar', 'parameters':{'flow_param_2': 'event_field_2'}])
883
+ @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
934
884
  ```
935
885
 
936
- 'parameters' can also be a list of strings and tuples like so:
937
- ```
938
- @trigger(event={'name':'foo', 'parameters':['common_name', ('flow_param', 'event_field')]})
886
+ You can also specify just the project or project branch (other values will be
887
+ inferred from the current project or project branch):
939
888
  ```
940
- This is equivalent to:
941
- ```
942
- @trigger(event={'name':'foo', 'parameters':{'common_name': 'common_name', 'flow_param': 'event_field'}})
943
- ```
944
-
945
-
946
- Parameters
947
- ----------
948
- event : Union[str, Dict[str, Any]], optional, default None
949
- Event dependency for this flow.
950
- events : List[Union[str, Dict[str, Any]]], default []
951
- Events dependency for this flow.
952
- options : Dict[str, Any], default {}
953
- Backend-specific configuration for tuning eventing behavior.
954
- """
955
- ...
956
-
957
- @typing.overload
958
- def trigger(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
959
- ...
960
-
961
- def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, 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] = {}):
962
- """
963
- Specifies the event(s) that this flow depends on.
964
-
965
- ```
966
- @trigger(event='foo')
967
- ```
968
- or
969
- ```
970
- @trigger(events=['foo', 'bar'])
971
- ```
972
-
973
- Additionally, you can specify the parameter mappings
974
- to map event payload to Metaflow parameters for the flow.
975
- ```
976
- @trigger(event={'name':'foo', 'parameters':{'flow_param': 'event_field'}})
977
- ```
978
- or
979
- ```
980
- @trigger(events=[{'name':'foo', 'parameters':{'flow_param_1': 'event_field_1'},
981
- {'name':'bar', 'parameters':{'flow_param_2': 'event_field_2'}])
982
- ```
983
-
984
- 'parameters' can also be a list of strings and tuples like so:
985
- ```
986
- @trigger(event={'name':'foo', 'parameters':['common_name', ('flow_param', 'event_field')]})
987
- ```
988
- This is equivalent to:
989
- ```
990
- @trigger(event={'name':'foo', 'parameters':{'common_name': 'common_name', 'flow_param': 'event_field'}})
991
- ```
992
-
993
-
994
- Parameters
995
- ----------
996
- event : Union[str, Dict[str, Any]], optional, default None
997
- Event dependency for this flow.
998
- events : List[Union[str, Dict[str, Any]]], default []
999
- Events dependency for this flow.
1000
- options : Dict[str, Any], default {}
1001
- Backend-specific configuration for tuning eventing behavior.
1002
- """
1003
- ...
1004
-
1005
- @typing.overload
1006
- def trigger_on_finish(*, flow: typing.Union[typing.Dict[str, str], str, None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1007
- """
1008
- Specifies the flow(s) that this flow depends on.
1009
-
1010
- ```
1011
- @trigger_on_finish(flow='FooFlow')
1012
- ```
1013
- or
1014
- ```
1015
- @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1016
- ```
1017
- This decorator respects the @project decorator and triggers the flow
1018
- when upstream runs within the same namespace complete successfully
1019
-
1020
- Additionally, you can specify project aware upstream flow dependencies
1021
- by specifying the fully qualified project_flow_name.
1022
- ```
1023
- @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1024
- ```
1025
- or
1026
- ```
1027
- @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1028
- ```
1029
-
1030
- You can also specify just the project or project branch (other values will be
1031
- inferred from the current project or project branch):
1032
- ```
1033
- @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
889
+ @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1034
890
  ```
1035
891
 
1036
892
  Note that `branch` is typically one of:
@@ -1103,54 +959,46 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
1103
959
  """
1104
960
  ...
1105
961
 
1106
- @typing.overload
1107
- def conda_base(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1108
- """
1109
- Specifies the Conda environment for all steps of the flow.
1110
-
1111
- Use `@conda_base` to set common libraries required by all
1112
- steps and use `@conda` to specify step-specific additions.
1113
-
1114
-
1115
- Parameters
1116
- ----------
1117
- packages : Dict[str, str], default {}
1118
- Packages to use for this flow. The key is the name of the package
1119
- and the value is the version to use.
1120
- libraries : Dict[str, str], default {}
1121
- Supported for backward compatibility. When used with packages, packages will take precedence.
1122
- python : str, optional, default None
1123
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1124
- that the version used will correspond to the version of the Python interpreter used to start the run.
1125
- disabled : bool, default False
1126
- If set to True, disables Conda.
1127
- """
1128
- ...
1129
-
1130
- @typing.overload
1131
- def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1132
- ...
1133
-
1134
- def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
962
+ 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]]:
1135
963
  """
1136
- Specifies the Conda environment for all steps of the flow.
1137
-
1138
- Use `@conda_base` to set common libraries required by all
1139
- steps and use `@conda` to specify step-specific additions.
964
+ 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.
965
+ 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.
1140
966
 
1141
967
 
1142
968
  Parameters
1143
969
  ----------
1144
- packages : Dict[str, str], default {}
1145
- Packages to use for this flow. The key is the name of the package
1146
- and the value is the version to use.
1147
- libraries : Dict[str, str], default {}
1148
- Supported for backward compatibility. When used with packages, packages will take precedence.
1149
- python : str, optional, default None
1150
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1151
- that the version used will correspond to the version of the Python interpreter used to start the run.
1152
- disabled : bool, default False
1153
- If set to True, disables Conda.
970
+ timeout : int
971
+ Time, in seconds before the task times out and fails. (Default: 3600)
972
+ poke_interval : int
973
+ Time in seconds that the job should wait in between each try. (Default: 60)
974
+ mode : str
975
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
976
+ exponential_backoff : bool
977
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
978
+ pool : str
979
+ the slot pool this task should run in,
980
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
981
+ soft_fail : bool
982
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
983
+ name : str
984
+ Name of the sensor on Airflow
985
+ description : str
986
+ Description of sensor in the Airflow UI
987
+ external_dag_id : str
988
+ The dag_id that contains the task you want to wait for.
989
+ external_task_ids : List[str]
990
+ The list of task_ids that you want to wait for.
991
+ If None (default value) the sensor waits for the DAG. (Default: None)
992
+ allowed_states : List[str]
993
+ Iterable of allowed states, (Default: ['success'])
994
+ failed_states : List[str]
995
+ Iterable of failed or dis-allowed states. (Default: None)
996
+ execution_delta : datetime.timedelta
997
+ time difference with the previous execution to look at,
998
+ the default is the same logical date as the current task or DAG. (Default: None)
999
+ check_existence: bool
1000
+ Set to True to check if the external task exists or check if
1001
+ the DAG to wait for exists. (Default: True)
1154
1002
  """
1155
1003
  ...
1156
1004
 
@@ -1197,46 +1045,188 @@ def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, expone
1197
1045
  """
1198
1046
  ...
1199
1047
 
1200
- 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]]:
1048
+ @typing.overload
1049
+ def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1201
1050
  """
1202
- 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.
1203
- 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.
1051
+ Specifies the PyPI packages for all steps of the flow.
1204
1052
 
1053
+ Use `@pypi_base` to set common packages required by all
1054
+ steps and use `@pypi` to specify step-specific overrides.
1205
1055
 
1206
1056
  Parameters
1207
1057
  ----------
1208
- timeout : int
1209
- Time, in seconds before the task times out and fails. (Default: 3600)
1210
- poke_interval : int
1211
- Time in seconds that the job should wait in between each try. (Default: 60)
1212
- mode : str
1213
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1214
- exponential_backoff : bool
1215
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1216
- pool : str
1217
- the slot pool this task should run in,
1218
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1219
- soft_fail : bool
1220
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1221
- name : str
1222
- Name of the sensor on Airflow
1223
- description : str
1224
- Description of sensor in the Airflow UI
1225
- external_dag_id : str
1226
- The dag_id that contains the task you want to wait for.
1227
- external_task_ids : List[str]
1228
- The list of task_ids that you want to wait for.
1229
- If None (default value) the sensor waits for the DAG. (Default: None)
1230
- allowed_states : List[str]
1231
- Iterable of allowed states, (Default: ['success'])
1232
- failed_states : List[str]
1233
- Iterable of failed or dis-allowed states. (Default: None)
1234
- execution_delta : datetime.timedelta
1235
- time difference with the previous execution to look at,
1236
- the default is the same logical date as the current task or DAG. (Default: None)
1237
- check_existence: bool
1238
- Set to True to check if the external task exists or check if
1239
- the DAG to wait for exists. (Default: True)
1058
+ packages : Dict[str, str], default: {}
1059
+ Packages to use for this flow. The key is the name of the package
1060
+ and the value is the version to use.
1061
+ python : str, optional, default: None
1062
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1063
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1064
+ """
1065
+ ...
1066
+
1067
+ @typing.overload
1068
+ def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1069
+ ...
1070
+
1071
+ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1072
+ """
1073
+ Specifies the PyPI packages for all steps of the flow.
1074
+
1075
+ Use `@pypi_base` to set common packages required by all
1076
+ steps and use `@pypi` to specify step-specific overrides.
1077
+
1078
+ Parameters
1079
+ ----------
1080
+ packages : Dict[str, str], default: {}
1081
+ Packages to use for this flow. The key is the name of the package
1082
+ and the value is the version to use.
1083
+ python : str, optional, default: None
1084
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1085
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1086
+ """
1087
+ ...
1088
+
1089
+ @typing.overload
1090
+ 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]]:
1091
+ """
1092
+ Specifies the event(s) that this flow depends on.
1093
+
1094
+ ```
1095
+ @trigger(event='foo')
1096
+ ```
1097
+ or
1098
+ ```
1099
+ @trigger(events=['foo', 'bar'])
1100
+ ```
1101
+
1102
+ Additionally, you can specify the parameter mappings
1103
+ to map event payload to Metaflow parameters for the flow.
1104
+ ```
1105
+ @trigger(event={'name':'foo', 'parameters':{'flow_param': 'event_field'}})
1106
+ ```
1107
+ or
1108
+ ```
1109
+ @trigger(events=[{'name':'foo', 'parameters':{'flow_param_1': 'event_field_1'},
1110
+ {'name':'bar', 'parameters':{'flow_param_2': 'event_field_2'}])
1111
+ ```
1112
+
1113
+ 'parameters' can also be a list of strings and tuples like so:
1114
+ ```
1115
+ @trigger(event={'name':'foo', 'parameters':['common_name', ('flow_param', 'event_field')]})
1116
+ ```
1117
+ This is equivalent to:
1118
+ ```
1119
+ @trigger(event={'name':'foo', 'parameters':{'common_name': 'common_name', 'flow_param': 'event_field'}})
1120
+ ```
1121
+
1122
+
1123
+ Parameters
1124
+ ----------
1125
+ event : Union[str, Dict[str, Any]], optional, default None
1126
+ Event dependency for this flow.
1127
+ events : List[Union[str, Dict[str, Any]]], default []
1128
+ Events dependency for this flow.
1129
+ options : Dict[str, Any], default {}
1130
+ Backend-specific configuration for tuning eventing behavior.
1131
+ """
1132
+ ...
1133
+
1134
+ @typing.overload
1135
+ def trigger(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1136
+ ...
1137
+
1138
+ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, 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] = {}):
1139
+ """
1140
+ Specifies the event(s) that this flow depends on.
1141
+
1142
+ ```
1143
+ @trigger(event='foo')
1144
+ ```
1145
+ or
1146
+ ```
1147
+ @trigger(events=['foo', 'bar'])
1148
+ ```
1149
+
1150
+ Additionally, you can specify the parameter mappings
1151
+ to map event payload to Metaflow parameters for the flow.
1152
+ ```
1153
+ @trigger(event={'name':'foo', 'parameters':{'flow_param': 'event_field'}})
1154
+ ```
1155
+ or
1156
+ ```
1157
+ @trigger(events=[{'name':'foo', 'parameters':{'flow_param_1': 'event_field_1'},
1158
+ {'name':'bar', 'parameters':{'flow_param_2': 'event_field_2'}])
1159
+ ```
1160
+
1161
+ 'parameters' can also be a list of strings and tuples like so:
1162
+ ```
1163
+ @trigger(event={'name':'foo', 'parameters':['common_name', ('flow_param', 'event_field')]})
1164
+ ```
1165
+ This is equivalent to:
1166
+ ```
1167
+ @trigger(event={'name':'foo', 'parameters':{'common_name': 'common_name', 'flow_param': 'event_field'}})
1168
+ ```
1169
+
1170
+
1171
+ Parameters
1172
+ ----------
1173
+ event : Union[str, Dict[str, Any]], optional, default None
1174
+ Event dependency for this flow.
1175
+ events : List[Union[str, Dict[str, Any]]], default []
1176
+ Events dependency for this flow.
1177
+ options : Dict[str, Any], default {}
1178
+ Backend-specific configuration for tuning eventing behavior.
1179
+ """
1180
+ ...
1181
+
1182
+ @typing.overload
1183
+ 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]]:
1184
+ """
1185
+ Specifies the times when the flow should be run when running on a
1186
+ production scheduler.
1187
+
1188
+
1189
+ Parameters
1190
+ ----------
1191
+ hourly : bool, default False
1192
+ Run the workflow hourly.
1193
+ daily : bool, default True
1194
+ Run the workflow daily.
1195
+ weekly : bool, default False
1196
+ Run the workflow weekly.
1197
+ cron : str, optional, default None
1198
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1199
+ specified by this expression.
1200
+ timezone : str, optional, default None
1201
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1202
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1203
+ """
1204
+ ...
1205
+
1206
+ @typing.overload
1207
+ def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1208
+ ...
1209
+
1210
+ 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):
1211
+ """
1212
+ Specifies the times when the flow should be run when running on a
1213
+ production scheduler.
1214
+
1215
+
1216
+ Parameters
1217
+ ----------
1218
+ hourly : bool, default False
1219
+ Run the workflow hourly.
1220
+ daily : bool, default True
1221
+ Run the workflow daily.
1222
+ weekly : bool, default False
1223
+ Run the workflow weekly.
1224
+ cron : str, optional, default None
1225
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1226
+ specified by this expression.
1227
+ timezone : str, optional, default None
1228
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1229
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1240
1230
  """
1241
1231
  ...
1242
1232
 
@@ -1276,43 +1266,53 @@ def project(*, name: str, branch: typing.Optional[str] = None, production: bool
1276
1266
  ...
1277
1267
 
1278
1268
  @typing.overload
1279
- def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1269
+ def conda_base(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1280
1270
  """
1281
- Specifies the PyPI packages for all steps of the flow.
1271
+ Specifies the Conda environment for all steps of the flow.
1272
+
1273
+ Use `@conda_base` to set common libraries required by all
1274
+ steps and use `@conda` to specify step-specific additions.
1282
1275
 
1283
- Use `@pypi_base` to set common packages required by all
1284
- steps and use `@pypi` to specify step-specific overrides.
1285
1276
 
1286
1277
  Parameters
1287
1278
  ----------
1288
- packages : Dict[str, str], default: {}
1279
+ packages : Dict[str, str], default {}
1289
1280
  Packages to use for this flow. The key is the name of the package
1290
1281
  and the value is the version to use.
1291
- python : str, optional, default: None
1282
+ libraries : Dict[str, str], default {}
1283
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1284
+ python : str, optional, default None
1292
1285
  Version of Python to use, e.g. '3.7.4'. A default value of None implies
1293
1286
  that the version used will correspond to the version of the Python interpreter used to start the run.
1287
+ disabled : bool, default False
1288
+ If set to True, disables Conda.
1294
1289
  """
1295
1290
  ...
1296
1291
 
1297
1292
  @typing.overload
1298
- def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1293
+ def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1299
1294
  ...
1300
1295
 
1301
- def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1296
+ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
1302
1297
  """
1303
- Specifies the PyPI packages for all steps of the flow.
1298
+ Specifies the Conda environment for all steps of the flow.
1299
+
1300
+ Use `@conda_base` to set common libraries required by all
1301
+ steps and use `@conda` to specify step-specific additions.
1304
1302
 
1305
- Use `@pypi_base` to set common packages required by all
1306
- steps and use `@pypi` to specify step-specific overrides.
1307
1303
 
1308
1304
  Parameters
1309
1305
  ----------
1310
- packages : Dict[str, str], default: {}
1306
+ packages : Dict[str, str], default {}
1311
1307
  Packages to use for this flow. The key is the name of the package
1312
1308
  and the value is the version to use.
1313
- python : str, optional, default: None
1309
+ libraries : Dict[str, str], default {}
1310
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1311
+ python : str, optional, default None
1314
1312
  Version of Python to use, e.g. '3.7.4'. A default value of None implies
1315
1313
  that the version used will correspond to the version of the Python interpreter used to start the run.
1314
+ disabled : bool, default False
1315
+ If set to True, disables Conda.
1316
1316
  """
1317
1317
  ...
1318
1318