metaflow-stubs 2.16.0__py2.py3-none-any.whl → 2.16.1__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.

Potentially problematic release.


This version of metaflow-stubs might be problematic. Click here for more details.

Files changed (166) hide show
  1. metaflow-stubs/__init__.pyi +486 -486
  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 +3 -3
  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 +4 -4
  14. metaflow-stubs/meta_files.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 +3 -3
  18. metaflow-stubs/metadata_provider/util.pyi +2 -2
  19. metaflow-stubs/metaflow_config.pyi +2 -2
  20. metaflow-stubs/metaflow_current.pyi +5 -5
  21. metaflow-stubs/metaflow_git.pyi +2 -2
  22. metaflow-stubs/multicore_utils.pyi +2 -2
  23. metaflow-stubs/packaging_sys/__init__.pyi +6 -6
  24. metaflow-stubs/packaging_sys/backend.pyi +4 -4
  25. metaflow-stubs/packaging_sys/distribution_support.pyi +4 -4
  26. metaflow-stubs/packaging_sys/tar_backend.pyi +5 -5
  27. metaflow-stubs/packaging_sys/utils.pyi +2 -2
  28. metaflow-stubs/packaging_sys/v1.pyi +4 -4
  29. metaflow-stubs/parameters.pyi +4 -4
  30. metaflow-stubs/plugins/__init__.pyi +13 -13
  31. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  32. metaflow-stubs/plugins/airflow/airflow_decorator.pyi +2 -2
  33. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  34. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  35. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
  36. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
  37. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
  38. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
  39. metaflow-stubs/plugins/argo/__init__.pyi +2 -2
  40. metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
  41. metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
  42. metaflow-stubs/plugins/argo/argo_workflows.pyi +3 -3
  43. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +2 -2
  44. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +4 -4
  45. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +3 -3
  46. metaflow-stubs/plugins/argo/exit_hooks.pyi +3 -3
  47. metaflow-stubs/plugins/aws/__init__.pyi +3 -3
  48. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  49. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  50. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  51. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  52. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  53. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -2
  54. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  55. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +5 -5
  56. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
  57. metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +2 -2
  58. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  59. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
  60. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
  61. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  62. metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +2 -2
  63. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +4 -4
  64. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +4 -4
  65. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  66. metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
  67. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  68. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +5 -5
  69. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  70. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  71. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  72. metaflow-stubs/plugins/cards/__init__.pyi +2 -2
  73. metaflow-stubs/plugins/cards/card_client.pyi +2 -2
  74. metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
  75. metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
  76. metaflow-stubs/plugins/cards/card_decorator.pyi +3 -3
  77. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  78. metaflow-stubs/plugins/cards/card_modules/basic.pyi +3 -3
  79. metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
  80. metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
  81. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
  82. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  83. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
  84. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  85. metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
  86. metaflow-stubs/plugins/cards/exception.pyi +2 -2
  87. metaflow-stubs/plugins/catch_decorator.pyi +2 -2
  88. metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
  89. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  90. metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
  91. metaflow-stubs/plugins/datatools/s3/s3.pyi +4 -4
  92. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  93. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  94. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  95. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  96. metaflow-stubs/plugins/environment_decorator.pyi +2 -2
  97. metaflow-stubs/plugins/events_decorator.pyi +2 -2
  98. metaflow-stubs/plugins/exit_hook/__init__.pyi +2 -2
  99. metaflow-stubs/plugins/exit_hook/exit_hook_decorator.pyi +2 -2
  100. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  101. metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
  102. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  103. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +5 -5
  104. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  105. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  106. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  107. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  108. metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
  109. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +3 -3
  110. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
  111. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  112. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
  113. metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +2 -2
  114. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
  115. metaflow-stubs/plugins/kubernetes/spot_monitor_sidecar.pyi +2 -2
  116. metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
  117. metaflow-stubs/plugins/project_decorator.pyi +2 -2
  118. metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
  119. metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
  120. metaflow-stubs/plugins/pypi/conda_environment.pyi +5 -5
  121. metaflow-stubs/plugins/pypi/parsers.pyi +2 -2
  122. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
  123. metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
  124. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  125. metaflow-stubs/plugins/resources_decorator.pyi +2 -2
  126. metaflow-stubs/plugins/retry_decorator.pyi +2 -2
  127. metaflow-stubs/plugins/secrets/__init__.pyi +3 -3
  128. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +4 -4
  129. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
  130. metaflow-stubs/plugins/secrets/secrets_func.pyi +2 -2
  131. metaflow-stubs/plugins/secrets/secrets_spec.pyi +2 -2
  132. metaflow-stubs/plugins/secrets/utils.pyi +2 -2
  133. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  134. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +2 -2
  135. metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
  136. metaflow-stubs/plugins/uv/__init__.pyi +2 -2
  137. metaflow-stubs/plugins/uv/uv_environment.pyi +2 -2
  138. metaflow-stubs/pylint_wrapper.pyi +2 -2
  139. metaflow-stubs/runner/__init__.pyi +2 -2
  140. metaflow-stubs/runner/deployer.pyi +30 -30
  141. metaflow-stubs/runner/deployer_impl.pyi +3 -3
  142. metaflow-stubs/runner/metaflow_runner.pyi +3 -3
  143. metaflow-stubs/runner/nbdeploy.pyi +2 -2
  144. metaflow-stubs/runner/nbrun.pyi +2 -2
  145. metaflow-stubs/runner/subprocess_manager.pyi +2 -2
  146. metaflow-stubs/runner/utils.pyi +4 -4
  147. metaflow-stubs/system/__init__.pyi +2 -2
  148. metaflow-stubs/system/system_logger.pyi +3 -3
  149. metaflow-stubs/system/system_monitor.pyi +2 -2
  150. metaflow-stubs/tagging_util.pyi +2 -2
  151. metaflow-stubs/tuple_util.pyi +2 -2
  152. metaflow-stubs/user_configs/__init__.pyi +2 -2
  153. metaflow-stubs/user_configs/config_options.pyi +3 -3
  154. metaflow-stubs/user_configs/config_parameters.pyi +6 -6
  155. metaflow-stubs/user_decorators/__init__.pyi +2 -2
  156. metaflow-stubs/user_decorators/common.pyi +2 -2
  157. metaflow-stubs/user_decorators/mutable_flow.pyi +4 -4
  158. metaflow-stubs/user_decorators/mutable_step.pyi +5 -5
  159. metaflow-stubs/user_decorators/user_flow_decorator.pyi +4 -4
  160. metaflow-stubs/user_decorators/user_step_decorator.pyi +6 -6
  161. metaflow-stubs/version.pyi +2 -2
  162. {metaflow_stubs-2.16.0.dist-info → metaflow_stubs-2.16.1.dist-info}/METADATA +2 -2
  163. metaflow_stubs-2.16.1.dist-info/RECORD +166 -0
  164. metaflow_stubs-2.16.0.dist-info/RECORD +0 -166
  165. {metaflow_stubs-2.16.0.dist-info → metaflow_stubs-2.16.1.dist-info}/WHEEL +0 -0
  166. {metaflow_stubs-2.16.0.dist-info → metaflow_stubs-2.16.1.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.16.0 #
4
- # Generated on 2025-07-12T15:28:57.479372 #
3
+ # MF version: 2.16.1 #
4
+ # Generated on 2025-07-15T19:29:43.053659 #
5
5
  ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -48,8 +48,8 @@ from .plugins.datatools.s3.s3 import S3 as S3
48
48
  from . import includefile as includefile
49
49
  from .includefile import IncludeFile as IncludeFile
50
50
  from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
51
- from .plugins.pypi.parsers import conda_environment_yml_parser as conda_environment_yml_parser
52
51
  from .plugins.pypi.parsers import requirements_txt_parser as requirements_txt_parser
52
+ from .plugins.pypi.parsers import conda_environment_yml_parser as conda_environment_yml_parser
53
53
  from . import cards as cards
54
54
  from . import client as client
55
55
  from .client.core import namespace as namespace
@@ -211,57 +211,6 @@ def conda(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
211
211
  """
212
212
  ...
213
213
 
214
- @typing.overload
215
- 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]]]:
216
- """
217
- Specifies that the step will success under all circumstances.
218
-
219
- The decorator will create an optional artifact, specified by `var`, which
220
- contains the exception raised. You can use it to detect the presence
221
- of errors, indicating that all happy-path artifacts produced by the step
222
- are missing.
223
-
224
-
225
- Parameters
226
- ----------
227
- var : str, optional, default None
228
- Name of the artifact in which to store the caught exception.
229
- If not specified, the exception is not stored.
230
- print_exception : bool, default True
231
- Determines whether or not the exception is printed to
232
- stdout when caught.
233
- """
234
- ...
235
-
236
- @typing.overload
237
- def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
238
- ...
239
-
240
- @typing.overload
241
- def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
242
- ...
243
-
244
- 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):
245
- """
246
- Specifies that the step will success under all circumstances.
247
-
248
- The decorator will create an optional artifact, specified by `var`, which
249
- contains the exception raised. You can use it to detect the presence
250
- of errors, indicating that all happy-path artifacts produced by the step
251
- are missing.
252
-
253
-
254
- Parameters
255
- ----------
256
- var : str, optional, default None
257
- Name of the artifact in which to store the caught exception.
258
- If not specified, the exception is not stored.
259
- print_exception : bool, default True
260
- Determines whether or not the exception is printed to
261
- stdout when caught.
262
- """
263
- ...
264
-
265
214
  @typing.overload
266
215
  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]]]:
267
216
  """
@@ -321,148 +270,6 @@ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
321
270
  """
322
271
  ...
323
272
 
324
- @typing.overload
325
- 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]]]:
326
- """
327
- Specifies the PyPI packages for the step.
328
-
329
- Information in this decorator will augment any
330
- attributes set in the `@pyi_base` flow-level decorator. Hence,
331
- you can use `@pypi_base` to set packages required by all
332
- steps and use `@pypi` to specify step-specific overrides.
333
-
334
-
335
- Parameters
336
- ----------
337
- packages : Dict[str, str], default: {}
338
- Packages to use for this step. The key is the name of the package
339
- and the value is the version to use.
340
- python : str, optional, default: None
341
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
342
- that the version used will correspond to the version of the Python interpreter used to start the run.
343
- """
344
- ...
345
-
346
- @typing.overload
347
- def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
348
- ...
349
-
350
- @typing.overload
351
- def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
352
- ...
353
-
354
- 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):
355
- """
356
- Specifies the PyPI packages for the step.
357
-
358
- Information in this decorator will augment any
359
- attributes set in the `@pyi_base` flow-level decorator. Hence,
360
- you can use `@pypi_base` to set packages required by all
361
- steps and use `@pypi` to specify step-specific overrides.
362
-
363
-
364
- Parameters
365
- ----------
366
- packages : Dict[str, str], default: {}
367
- Packages to use for this step. The key is the name of the package
368
- and the value is the version to use.
369
- python : str, optional, default: None
370
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
371
- that the version used will correspond to the version of the Python interpreter used to start the run.
372
- """
373
- ...
374
-
375
- @typing.overload
376
- def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
377
- """
378
- Decorator prototype for all step decorators. This function gets specialized
379
- and imported for all decorators types by _import_plugin_decorators().
380
- """
381
- ...
382
-
383
- @typing.overload
384
- def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
385
- ...
386
-
387
- def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
388
- """
389
- Decorator prototype for all step decorators. This function gets specialized
390
- and imported for all decorators types by _import_plugin_decorators().
391
- """
392
- ...
393
-
394
- @typing.overload
395
- 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]]]:
396
- """
397
- Specifies environment variables to be set prior to the execution of a step.
398
-
399
-
400
- Parameters
401
- ----------
402
- vars : Dict[str, str], default {}
403
- Dictionary of environment variables to set.
404
- """
405
- ...
406
-
407
- @typing.overload
408
- def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
409
- ...
410
-
411
- @typing.overload
412
- def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
413
- ...
414
-
415
- def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
416
- """
417
- Specifies environment variables to be set prior to the execution of a step.
418
-
419
-
420
- Parameters
421
- ----------
422
- vars : Dict[str, str], default {}
423
- Dictionary of environment variables to set.
424
- """
425
- ...
426
-
427
- @typing.overload
428
- def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], role: 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]]]:
429
- """
430
- Specifies secrets to be retrieved and injected as environment variables prior to
431
- the execution of a step.
432
-
433
-
434
- Parameters
435
- ----------
436
- sources : List[Union[str, Dict[str, Any]]], default: []
437
- List of secret specs, defining how the secrets are to be retrieved
438
- role : str, optional, default: None
439
- Role to use for fetching secrets
440
- """
441
- ...
442
-
443
- @typing.overload
444
- def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
445
- ...
446
-
447
- @typing.overload
448
- def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
449
- ...
450
-
451
- 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]]] = [], role: typing.Optional[str] = None):
452
- """
453
- Specifies secrets to be retrieved and injected as environment variables prior to
454
- the execution of a step.
455
-
456
-
457
- Parameters
458
- ----------
459
- sources : List[Union[str, Dict[str, Any]]], default: []
460
- List of secret specs, defining how the secrets are to be retrieved
461
- role : str, optional, default: None
462
- Role to use for fetching secrets
463
- """
464
- ...
465
-
466
273
  @typing.overload
467
274
  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]]]:
468
275
  """
@@ -543,83 +350,237 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
543
350
  ...
544
351
 
545
352
  @typing.overload
546
- 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]]]:
353
+ 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]]]:
547
354
  """
548
- Creates a human-readable report, a Metaflow Card, after this step completes.
549
-
550
- Note that you may add multiple `@card` decorators in a step with different parameters.
355
+ Specifies environment variables to be set prior to the execution of a step.
551
356
 
552
357
 
553
358
  Parameters
554
359
  ----------
555
- type : str, default 'default'
556
- Card type.
557
- id : str, optional, default None
558
- If multiple cards are present, use this id to identify this card.
559
- options : Dict[str, Any], default {}
560
- Options passed to the card. The contents depend on the card type.
561
- timeout : int, default 45
562
- Interrupt reporting if it takes more than this many seconds.
360
+ vars : Dict[str, str], default {}
361
+ Dictionary of environment variables to set.
563
362
  """
564
363
  ...
565
364
 
566
365
  @typing.overload
567
- def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
366
+ def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
568
367
  ...
569
368
 
570
369
  @typing.overload
571
- def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
370
+ def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
572
371
  ...
573
372
 
574
- 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):
373
+ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
575
374
  """
576
- Creates a human-readable report, a Metaflow Card, after this step completes.
577
-
578
- Note that you may add multiple `@card` decorators in a step with different parameters.
375
+ Specifies environment variables to be set prior to the execution of a step.
579
376
 
580
377
 
581
378
  Parameters
582
379
  ----------
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.
380
+ vars : Dict[str, str], default {}
381
+ Dictionary of environment variables to set.
591
382
  """
592
383
  ...
593
384
 
594
385
  @typing.overload
595
- 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]]]:
386
+ def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
596
387
  """
597
- Specifies the number of times the task corresponding
598
- to a step needs to be retried.
599
-
600
- This decorator is useful for handling transient errors, such as networking issues.
601
- If your task contains operations that can't be retried safely, e.g. database updates,
602
- it is advisable to annotate it with `@retry(times=0)`.
603
-
604
- This can be used in conjunction with the `@catch` decorator. The `@catch`
605
- decorator will execute a no-op task after all retries have been exhausted,
606
- ensuring that the flow execution can continue.
607
-
608
-
609
- Parameters
610
- ----------
611
- times : int, default 3
612
- Number of times to retry this task.
613
- minutes_between_retries : int, default 2
614
- Number of minutes between retries.
388
+ Decorator prototype for all step decorators. This function gets specialized
389
+ and imported for all decorators types by _import_plugin_decorators().
615
390
  """
616
391
  ...
617
392
 
618
393
  @typing.overload
619
- def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
394
+ def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
620
395
  ...
621
396
 
622
- @typing.overload
397
+ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
398
+ """
399
+ Decorator prototype for all step decorators. This function gets specialized
400
+ and imported for all decorators types by _import_plugin_decorators().
401
+ """
402
+ ...
403
+
404
+ @typing.overload
405
+ 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]]]:
406
+ """
407
+ Specifies the PyPI packages for the step.
408
+
409
+ Information in this decorator will augment any
410
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
411
+ you can use `@pypi_base` to set packages required by all
412
+ steps and use `@pypi` to specify step-specific overrides.
413
+
414
+
415
+ Parameters
416
+ ----------
417
+ packages : Dict[str, str], default: {}
418
+ Packages to use for this step. The key is the name of the package
419
+ and the value is the version to use.
420
+ python : str, optional, default: None
421
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
422
+ that the version used will correspond to the version of the Python interpreter used to start the run.
423
+ """
424
+ ...
425
+
426
+ @typing.overload
427
+ def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
428
+ ...
429
+
430
+ @typing.overload
431
+ def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
432
+ ...
433
+
434
+ 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):
435
+ """
436
+ Specifies the PyPI packages for the step.
437
+
438
+ Information in this decorator will augment any
439
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
440
+ you can use `@pypi_base` to set packages required by all
441
+ steps and use `@pypi` to specify step-specific overrides.
442
+
443
+
444
+ Parameters
445
+ ----------
446
+ packages : Dict[str, str], default: {}
447
+ Packages to use for this step. The key is the name of the package
448
+ and the value is the version to use.
449
+ python : str, optional, default: None
450
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
451
+ that the version used will correspond to the version of the Python interpreter used to start the run.
452
+ """
453
+ ...
454
+
455
+ @typing.overload
456
+ 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]]]:
457
+ """
458
+ Specifies that the step will success under all circumstances.
459
+
460
+ The decorator will create an optional artifact, specified by `var`, which
461
+ contains the exception raised. You can use it to detect the presence
462
+ of errors, indicating that all happy-path artifacts produced by the step
463
+ are missing.
464
+
465
+
466
+ Parameters
467
+ ----------
468
+ var : str, optional, default None
469
+ Name of the artifact in which to store the caught exception.
470
+ If not specified, the exception is not stored.
471
+ print_exception : bool, default True
472
+ Determines whether or not the exception is printed to
473
+ stdout when caught.
474
+ """
475
+ ...
476
+
477
+ @typing.overload
478
+ def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
479
+ ...
480
+
481
+ @typing.overload
482
+ def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
483
+ ...
484
+
485
+ 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):
486
+ """
487
+ Specifies that the step will success under all circumstances.
488
+
489
+ The decorator will create an optional artifact, specified by `var`, which
490
+ contains the exception raised. You can use it to detect the presence
491
+ of errors, indicating that all happy-path artifacts produced by the step
492
+ are missing.
493
+
494
+
495
+ Parameters
496
+ ----------
497
+ var : str, optional, default None
498
+ Name of the artifact in which to store the caught exception.
499
+ If not specified, the exception is not stored.
500
+ print_exception : bool, default True
501
+ Determines whether or not the exception is printed to
502
+ stdout when caught.
503
+ """
504
+ ...
505
+
506
+ @typing.overload
507
+ 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]]]:
508
+ """
509
+ Creates a human-readable report, a Metaflow Card, after this step completes.
510
+
511
+ Note that you may add multiple `@card` decorators in a step with different parameters.
512
+
513
+
514
+ Parameters
515
+ ----------
516
+ type : str, default 'default'
517
+ Card type.
518
+ id : str, optional, default None
519
+ If multiple cards are present, use this id to identify this card.
520
+ options : Dict[str, Any], default {}
521
+ Options passed to the card. The contents depend on the card type.
522
+ timeout : int, default 45
523
+ Interrupt reporting if it takes more than this many seconds.
524
+ """
525
+ ...
526
+
527
+ @typing.overload
528
+ def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
529
+ ...
530
+
531
+ @typing.overload
532
+ def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
533
+ ...
534
+
535
+ 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):
536
+ """
537
+ Creates a human-readable report, a Metaflow Card, after this step completes.
538
+
539
+ Note that you may add multiple `@card` decorators in a step with different parameters.
540
+
541
+
542
+ Parameters
543
+ ----------
544
+ type : str, default 'default'
545
+ Card type.
546
+ id : str, optional, default None
547
+ If multiple cards are present, use this id to identify this card.
548
+ options : Dict[str, Any], default {}
549
+ Options passed to the card. The contents depend on the card type.
550
+ timeout : int, default 45
551
+ Interrupt reporting if it takes more than this many seconds.
552
+ """
553
+ ...
554
+
555
+ @typing.overload
556
+ 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]]]:
557
+ """
558
+ Specifies the number of times the task corresponding
559
+ to a step needs to be retried.
560
+
561
+ This decorator is useful for handling transient errors, such as networking issues.
562
+ If your task contains operations that can't be retried safely, e.g. database updates,
563
+ it is advisable to annotate it with `@retry(times=0)`.
564
+
565
+ This can be used in conjunction with the `@catch` decorator. The `@catch`
566
+ decorator will execute a no-op task after all retries have been exhausted,
567
+ ensuring that the flow execution can continue.
568
+
569
+
570
+ Parameters
571
+ ----------
572
+ times : int, default 3
573
+ Number of times to retry this task.
574
+ minutes_between_retries : int, default 2
575
+ Number of minutes between retries.
576
+ """
577
+ ...
578
+
579
+ @typing.overload
580
+ def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
581
+ ...
582
+
583
+ @typing.overload
623
584
  def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
624
585
  ...
625
586
 
@@ -646,6 +607,95 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
646
607
  """
647
608
  ...
648
609
 
610
+ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: typing.Optional[str] = None, image_pull_policy: str = 'KUBERNETES_IMAGE_PULL_POLICY', image_pull_secrets: typing.List[str] = [], 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', security_context: typing.Optional[typing.Dict[str, typing.Any]] = 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]]]:
611
+ """
612
+ Specifies that this step should execute on Kubernetes.
613
+
614
+
615
+ Parameters
616
+ ----------
617
+ cpu : int, default 1
618
+ Number of CPUs required for this step. If `@resources` is
619
+ also present, the maximum value from all decorators is used.
620
+ memory : int, default 4096
621
+ Memory size (in MB) required for this step. If
622
+ `@resources` is also present, the maximum value from all decorators is
623
+ used.
624
+ disk : int, default 10240
625
+ Disk size (in MB) required for this step. If
626
+ `@resources` is also present, the maximum value from all decorators is
627
+ used.
628
+ image : str, optional, default None
629
+ Docker image to use when launching on Kubernetes. If not specified, and
630
+ METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
631
+ not, a default Docker image mapping to the current version of Python is used.
632
+ image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
633
+ If given, the imagePullPolicy to be applied to the Docker image of the step.
634
+ image_pull_secrets: List[str], default []
635
+ The default is extracted from METAFLOW_KUBERNETES_IMAGE_PULL_SECRETS.
636
+ Kubernetes image pull secrets to use when pulling container images
637
+ in Kubernetes.
638
+ service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
639
+ Kubernetes service account to use when launching pod in Kubernetes.
640
+ secrets : List[str], optional, default None
641
+ Kubernetes secrets to use when launching pod in Kubernetes. These
642
+ secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
643
+ in Metaflow configuration.
644
+ node_selector: Union[Dict[str,str], str], optional, default None
645
+ Kubernetes node selector(s) to apply to the pod running the task.
646
+ Can be passed in as a comma separated string of values e.g.
647
+ 'kubernetes.io/os=linux,kubernetes.io/arch=amd64' or as a dictionary
648
+ {'kubernetes.io/os': 'linux', 'kubernetes.io/arch': 'amd64'}
649
+ namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
650
+ Kubernetes namespace to use when launching pod in Kubernetes.
651
+ gpu : int, optional, default None
652
+ Number of GPUs required for this step. A value of zero implies that
653
+ the scheduled node should not have GPUs.
654
+ gpu_vendor : str, default KUBERNETES_GPU_VENDOR
655
+ The vendor of the GPUs to be used for this step.
656
+ tolerations : List[str], default []
657
+ The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
658
+ Kubernetes tolerations to use when launching pod in Kubernetes.
659
+ labels: Dict[str, str], default: METAFLOW_KUBERNETES_LABELS
660
+ Kubernetes labels to use when launching pod in Kubernetes.
661
+ annotations: Dict[str, str], default: METAFLOW_KUBERNETES_ANNOTATIONS
662
+ Kubernetes annotations to use when launching pod in Kubernetes.
663
+ use_tmpfs : bool, default False
664
+ This enables an explicit tmpfs mount for this step.
665
+ tmpfs_tempdir : bool, default True
666
+ sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
667
+ tmpfs_size : int, optional, default: None
668
+ The value for the size (in MiB) of the tmpfs mount for this step.
669
+ This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
670
+ memory allocated for this step.
671
+ tmpfs_path : str, optional, default /metaflow_temp
672
+ Path to tmpfs mount for this step.
673
+ persistent_volume_claims : Dict[str, str], optional, default None
674
+ A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
675
+ volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
676
+ shared_memory: int, optional
677
+ Shared memory size (in MiB) required for this step
678
+ port: int, optional
679
+ Port number to specify in the Kubernetes job object
680
+ compute_pool : str, optional, default None
681
+ Compute pool to be used for for this step.
682
+ If not specified, any accessible compute pool within the perimeter is used.
683
+ hostname_resolution_timeout: int, default 10 * 60
684
+ Timeout in seconds for the workers tasks in the gang scheduled cluster to resolve the hostname of control task.
685
+ Only applicable when @parallel is used.
686
+ qos: str, default: Burstable
687
+ Quality of Service class to assign to the pod. Supported values are: Guaranteed, Burstable, BestEffort
688
+
689
+ security_context: Dict[str, Any], optional, default None
690
+ Container security context. Applies to the task container. Allows the following keys:
691
+ - privileged: bool, optional, default None
692
+ - allow_privilege_escalation: bool, optional, default None
693
+ - run_as_user: int, optional, default None
694
+ - run_as_group: int, optional, default None
695
+ - run_as_non_root: bool, optional, default None
696
+ """
697
+ ...
698
+
649
699
  @typing.overload
650
700
  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]]]:
651
701
  """
@@ -795,127 +845,42 @@ def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
795
845
  """
796
846
  ...
797
847
 
798
- def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: typing.Optional[str] = None, image_pull_policy: str = 'KUBERNETES_IMAGE_PULL_POLICY', image_pull_secrets: typing.List[str] = [], 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', security_context: typing.Optional[typing.Dict[str, typing.Any]] = 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]]]:
848
+ @typing.overload
849
+ def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], role: 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]]]:
799
850
  """
800
- Specifies that this step should execute on Kubernetes.
851
+ Specifies secrets to be retrieved and injected as environment variables prior to
852
+ the execution of a step.
801
853
 
802
854
 
803
855
  Parameters
804
856
  ----------
805
- cpu : int, default 1
806
- Number of CPUs required for this step. If `@resources` is
807
- also present, the maximum value from all decorators is used.
808
- memory : int, default 4096
809
- Memory size (in MB) required for this step. If
810
- `@resources` is also present, the maximum value from all decorators is
811
- used.
812
- disk : int, default 10240
813
- Disk size (in MB) required for this step. If
814
- `@resources` is also present, the maximum value from all decorators is
815
- used.
816
- image : str, optional, default None
817
- Docker image to use when launching on Kubernetes. If not specified, and
818
- METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
819
- not, a default Docker image mapping to the current version of Python is used.
820
- image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
821
- If given, the imagePullPolicy to be applied to the Docker image of the step.
822
- image_pull_secrets: List[str], default []
823
- The default is extracted from METAFLOW_KUBERNETES_IMAGE_PULL_SECRETS.
824
- Kubernetes image pull secrets to use when pulling container images
825
- in Kubernetes.
826
- service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
827
- Kubernetes service account to use when launching pod in Kubernetes.
828
- secrets : List[str], optional, default None
829
- Kubernetes secrets to use when launching pod in Kubernetes. These
830
- secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
831
- in Metaflow configuration.
832
- node_selector: Union[Dict[str,str], str], optional, default None
833
- Kubernetes node selector(s) to apply to the pod running the task.
834
- Can be passed in as a comma separated string of values e.g.
835
- 'kubernetes.io/os=linux,kubernetes.io/arch=amd64' or as a dictionary
836
- {'kubernetes.io/os': 'linux', 'kubernetes.io/arch': 'amd64'}
837
- namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
838
- Kubernetes namespace to use when launching pod in Kubernetes.
839
- gpu : int, optional, default None
840
- Number of GPUs required for this step. A value of zero implies that
841
- the scheduled node should not have GPUs.
842
- gpu_vendor : str, default KUBERNETES_GPU_VENDOR
843
- The vendor of the GPUs to be used for this step.
844
- tolerations : List[str], default []
845
- The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
846
- Kubernetes tolerations to use when launching pod in Kubernetes.
847
- labels: Dict[str, str], default: METAFLOW_KUBERNETES_LABELS
848
- Kubernetes labels to use when launching pod in Kubernetes.
849
- annotations: Dict[str, str], default: METAFLOW_KUBERNETES_ANNOTATIONS
850
- Kubernetes annotations to use when launching pod in Kubernetes.
851
- use_tmpfs : bool, default False
852
- This enables an explicit tmpfs mount for this step.
853
- tmpfs_tempdir : bool, default True
854
- sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
855
- tmpfs_size : int, optional, default: None
856
- The value for the size (in MiB) of the tmpfs mount for this step.
857
- This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
858
- memory allocated for this step.
859
- tmpfs_path : str, optional, default /metaflow_temp
860
- Path to tmpfs mount for this step.
861
- persistent_volume_claims : Dict[str, str], optional, default None
862
- A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
863
- volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
864
- shared_memory: int, optional
865
- Shared memory size (in MiB) required for this step
866
- port: int, optional
867
- Port number to specify in the Kubernetes job object
868
- compute_pool : str, optional, default None
869
- Compute pool to be used for for this step.
870
- If not specified, any accessible compute pool within the perimeter is used.
871
- hostname_resolution_timeout: int, default 10 * 60
872
- Timeout in seconds for the workers tasks in the gang scheduled cluster to resolve the hostname of control task.
873
- Only applicable when @parallel is used.
874
- qos: str, default: Burstable
875
- Quality of Service class to assign to the pod. Supported values are: Guaranteed, Burstable, BestEffort
876
-
877
- security_context: Dict[str, Any], optional, default None
878
- Container security context. Applies to the task container. Allows the following keys:
879
- - privileged: bool, optional, default None
880
- - allow_privilege_escalation: bool, optional, default None
881
- - run_as_user: int, optional, default None
882
- - run_as_group: int, optional, default None
883
- - run_as_non_root: bool, optional, default None
857
+ sources : List[Union[str, Dict[str, Any]]], default: []
858
+ List of secret specs, defining how the secrets are to be retrieved
859
+ role : str, optional, default: None
860
+ Role to use for fetching secrets
884
861
  """
885
862
  ...
886
863
 
887
- def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
864
+ @typing.overload
865
+ def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
866
+ ...
867
+
868
+ @typing.overload
869
+ def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
870
+ ...
871
+
872
+ 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]]] = [], role: typing.Optional[str] = None):
888
873
  """
889
- Specifies what flows belong to the same project.
890
-
891
- A project-specific namespace is created for all flows that
892
- use the same `@project(name)`.
874
+ Specifies secrets to be retrieved and injected as environment variables prior to
875
+ the execution of a step.
893
876
 
894
877
 
895
878
  Parameters
896
879
  ----------
897
- name : str
898
- Project name. Make sure that the name is unique amongst all
899
- projects that use the same production scheduler. The name may
900
- contain only lowercase alphanumeric characters and underscores.
901
-
902
- branch : Optional[str], default None
903
- The branch to use. If not specified, the branch is set to
904
- `user.<username>` unless `production` is set to `True`. This can
905
- also be set on the command line using `--branch` as a top-level option.
906
- It is an error to specify `branch` in the decorator and on the command line.
907
-
908
- production : bool, default False
909
- Whether or not the branch is the production branch. This can also be set on the
910
- command line using `--production` as a top-level option. It is an error to specify
911
- `production` in the decorator and on the command line.
912
- The project branch name will be:
913
- - if `branch` is specified:
914
- - if `production` is True: `prod.<branch>`
915
- - if `production` is False: `test.<branch>`
916
- - if `branch` is not specified:
917
- - if `production` is True: `prod`
918
- - if `production` is False: `user.<username>`
880
+ sources : List[Union[str, Dict[str, Any]]], default: []
881
+ List of secret specs, defining how the secrets are to be retrieved
882
+ role : str, optional, default: None
883
+ Role to use for fetching secrets
919
884
  """
920
885
  ...
921
886
 
@@ -1003,104 +968,38 @@ def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str,
1003
968
  """
1004
969
  ...
1005
970
 
1006
- @typing.overload
1007
- 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]]:
1008
- """
1009
- Specifies the flow(s) that this flow depends on.
1010
-
1011
- ```
1012
- @trigger_on_finish(flow='FooFlow')
1013
- ```
1014
- or
1015
- ```
1016
- @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1017
- ```
1018
- This decorator respects the @project decorator and triggers the flow
1019
- when upstream runs within the same namespace complete successfully
1020
-
1021
- Additionally, you can specify project aware upstream flow dependencies
1022
- by specifying the fully qualified project_flow_name.
1023
- ```
1024
- @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1025
- ```
1026
- or
1027
- ```
1028
- @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1029
- ```
1030
-
1031
- You can also specify just the project or project branch (other values will be
1032
- inferred from the current project or project branch):
1033
- ```
1034
- @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1035
- ```
1036
-
1037
- Note that `branch` is typically one of:
1038
- - `prod`
1039
- - `user.bob`
1040
- - `test.my_experiment`
1041
- - `prod.staging`
1042
-
1043
-
1044
- Parameters
1045
- ----------
1046
- flow : Union[str, Dict[str, str]], optional, default None
1047
- Upstream flow dependency for this flow.
1048
- flows : List[Union[str, Dict[str, str]]], default []
1049
- Upstream flow dependencies for this flow.
1050
- options : Dict[str, Any], default {}
1051
- Backend-specific configuration for tuning eventing behavior.
1052
- """
1053
- ...
1054
-
1055
- @typing.overload
1056
- def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1057
- ...
1058
-
1059
- def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, 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] = {}):
971
+ def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1060
972
  """
1061
- Specifies the flow(s) that this flow depends on.
1062
-
1063
- ```
1064
- @trigger_on_finish(flow='FooFlow')
1065
- ```
1066
- or
1067
- ```
1068
- @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1069
- ```
1070
- This decorator respects the @project decorator and triggers the flow
1071
- when upstream runs within the same namespace complete successfully
1072
-
1073
- Additionally, you can specify project aware upstream flow dependencies
1074
- by specifying the fully qualified project_flow_name.
1075
- ```
1076
- @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1077
- ```
1078
- or
1079
- ```
1080
- @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1081
- ```
1082
-
1083
- You can also specify just the project or project branch (other values will be
1084
- inferred from the current project or project branch):
1085
- ```
1086
- @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1087
- ```
973
+ Specifies what flows belong to the same project.
1088
974
 
1089
- Note that `branch` is typically one of:
1090
- - `prod`
1091
- - `user.bob`
1092
- - `test.my_experiment`
1093
- - `prod.staging`
975
+ A project-specific namespace is created for all flows that
976
+ use the same `@project(name)`.
1094
977
 
1095
978
 
1096
979
  Parameters
1097
980
  ----------
1098
- flow : Union[str, Dict[str, str]], optional, default None
1099
- Upstream flow dependency for this flow.
1100
- flows : List[Union[str, Dict[str, str]]], default []
1101
- Upstream flow dependencies for this flow.
1102
- options : Dict[str, Any], default {}
1103
- Backend-specific configuration for tuning eventing behavior.
981
+ name : str
982
+ Project name. Make sure that the name is unique amongst all
983
+ projects that use the same production scheduler. The name may
984
+ contain only lowercase alphanumeric characters and underscores.
985
+
986
+ branch : Optional[str], default None
987
+ The branch to use. If not specified, the branch is set to
988
+ `user.<username>` unless `production` is set to `True`. This can
989
+ also be set on the command line using `--branch` as a top-level option.
990
+ It is an error to specify `branch` in the decorator and on the command line.
991
+
992
+ production : bool, default False
993
+ Whether or not the branch is the production branch. This can also be set on the
994
+ command line using `--production` as a top-level option. It is an error to specify
995
+ `production` in the decorator and on the command line.
996
+ The project branch name will be:
997
+ - if `branch` is specified:
998
+ - if `production` is True: `prod.<branch>`
999
+ - if `production` is False: `test.<branch>`
1000
+ - if `branch` is not specified:
1001
+ - if `production` is True: `prod`
1002
+ - if `production` is False: `user.<username>`
1104
1003
  """
1105
1004
  ...
1106
1005
 
@@ -1155,6 +1054,49 @@ def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly:
1155
1054
  """
1156
1055
  ...
1157
1056
 
1057
+ 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]]:
1058
+ """
1059
+ 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)
1060
+ before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
1061
+ and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
1062
+ added as a flow decorators. Adding more than one decorator will ensure that `start` step
1063
+ starts only after all sensors finish.
1064
+
1065
+
1066
+ Parameters
1067
+ ----------
1068
+ timeout : int
1069
+ Time, in seconds before the task times out and fails. (Default: 3600)
1070
+ poke_interval : int
1071
+ Time in seconds that the job should wait in between each try. (Default: 60)
1072
+ mode : str
1073
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1074
+ exponential_backoff : bool
1075
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1076
+ pool : str
1077
+ the slot pool this task should run in,
1078
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
1079
+ soft_fail : bool
1080
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
1081
+ name : str
1082
+ Name of the sensor on Airflow
1083
+ description : str
1084
+ Description of sensor in the Airflow UI
1085
+ bucket_key : Union[str, List[str]]
1086
+ The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1087
+ When it's specified as a full s3:// url, please leave `bucket_name` as None
1088
+ bucket_name : str
1089
+ Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1090
+ When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1091
+ wildcard_match : bool
1092
+ whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1093
+ aws_conn_id : str
1094
+ a reference to the s3 connection on Airflow. (Default: None)
1095
+ verify : bool
1096
+ Whether or not to verify SSL certificates for S3 connection. (Default: None)
1097
+ """
1098
+ ...
1099
+
1158
1100
  @typing.overload
1159
1101
  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]]:
1160
1102
  """
@@ -1248,6 +1190,107 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
1248
1190
  """
1249
1191
  ...
1250
1192
 
1193
+ @typing.overload
1194
+ 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]]:
1195
+ """
1196
+ Specifies the flow(s) that this flow depends on.
1197
+
1198
+ ```
1199
+ @trigger_on_finish(flow='FooFlow')
1200
+ ```
1201
+ or
1202
+ ```
1203
+ @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1204
+ ```
1205
+ This decorator respects the @project decorator and triggers the flow
1206
+ when upstream runs within the same namespace complete successfully
1207
+
1208
+ Additionally, you can specify project aware upstream flow dependencies
1209
+ by specifying the fully qualified project_flow_name.
1210
+ ```
1211
+ @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1212
+ ```
1213
+ or
1214
+ ```
1215
+ @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1216
+ ```
1217
+
1218
+ You can also specify just the project or project branch (other values will be
1219
+ inferred from the current project or project branch):
1220
+ ```
1221
+ @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1222
+ ```
1223
+
1224
+ Note that `branch` is typically one of:
1225
+ - `prod`
1226
+ - `user.bob`
1227
+ - `test.my_experiment`
1228
+ - `prod.staging`
1229
+
1230
+
1231
+ Parameters
1232
+ ----------
1233
+ flow : Union[str, Dict[str, str]], optional, default None
1234
+ Upstream flow dependency for this flow.
1235
+ flows : List[Union[str, Dict[str, str]]], default []
1236
+ Upstream flow dependencies for this flow.
1237
+ options : Dict[str, Any], default {}
1238
+ Backend-specific configuration for tuning eventing behavior.
1239
+ """
1240
+ ...
1241
+
1242
+ @typing.overload
1243
+ def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1244
+ ...
1245
+
1246
+ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, 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] = {}):
1247
+ """
1248
+ Specifies the flow(s) that this flow depends on.
1249
+
1250
+ ```
1251
+ @trigger_on_finish(flow='FooFlow')
1252
+ ```
1253
+ or
1254
+ ```
1255
+ @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1256
+ ```
1257
+ This decorator respects the @project decorator and triggers the flow
1258
+ when upstream runs within the same namespace complete successfully
1259
+
1260
+ Additionally, you can specify project aware upstream flow dependencies
1261
+ by specifying the fully qualified project_flow_name.
1262
+ ```
1263
+ @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1264
+ ```
1265
+ or
1266
+ ```
1267
+ @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1268
+ ```
1269
+
1270
+ You can also specify just the project or project branch (other values will be
1271
+ inferred from the current project or project branch):
1272
+ ```
1273
+ @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1274
+ ```
1275
+
1276
+ Note that `branch` is typically one of:
1277
+ - `prod`
1278
+ - `user.bob`
1279
+ - `test.my_experiment`
1280
+ - `prod.staging`
1281
+
1282
+
1283
+ Parameters
1284
+ ----------
1285
+ flow : Union[str, Dict[str, str]], optional, default None
1286
+ Upstream flow dependency for this flow.
1287
+ flows : List[Union[str, Dict[str, str]]], default []
1288
+ Upstream flow dependencies for this flow.
1289
+ options : Dict[str, Any], default {}
1290
+ Backend-specific configuration for tuning eventing behavior.
1291
+ """
1292
+ ...
1293
+
1251
1294
  @typing.overload
1252
1295
  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]]:
1253
1296
  """
@@ -1299,46 +1342,3 @@ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packa
1299
1342
  """
1300
1343
  ...
1301
1344
 
1302
- 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]]:
1303
- """
1304
- 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)
1305
- before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
1306
- and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
1307
- added as a flow decorators. Adding more than one decorator will ensure that `start` step
1308
- starts only after all sensors finish.
1309
-
1310
-
1311
- Parameters
1312
- ----------
1313
- timeout : int
1314
- Time, in seconds before the task times out and fails. (Default: 3600)
1315
- poke_interval : int
1316
- Time in seconds that the job should wait in between each try. (Default: 60)
1317
- mode : str
1318
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1319
- exponential_backoff : bool
1320
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1321
- pool : str
1322
- the slot pool this task should run in,
1323
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1324
- soft_fail : bool
1325
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1326
- name : str
1327
- Name of the sensor on Airflow
1328
- description : str
1329
- Description of sensor in the Airflow UI
1330
- bucket_key : Union[str, List[str]]
1331
- The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1332
- When it's specified as a full s3:// url, please leave `bucket_name` as None
1333
- bucket_name : str
1334
- Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1335
- When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1336
- wildcard_match : bool
1337
- whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1338
- aws_conn_id : str
1339
- a reference to the s3 connection on Airflow. (Default: None)
1340
- verify : bool
1341
- Whether or not to verify SSL certificates for S3 connection. (Default: None)
1342
- """
1343
- ...
1344
-