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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. metaflow-stubs/__init__.pyi +243 -243
  2. metaflow-stubs/cards.pyi +2 -2
  3. metaflow-stubs/cli.pyi +2 -2
  4. metaflow-stubs/client/__init__.pyi +2 -2
  5. metaflow-stubs/client/core.pyi +4 -4
  6. metaflow-stubs/client/filecache.pyi +2 -2
  7. metaflow-stubs/clone_util.pyi +2 -2
  8. metaflow-stubs/events.pyi +2 -2
  9. metaflow-stubs/exception.pyi +2 -2
  10. metaflow-stubs/flowspec.pyi +4 -4
  11. metaflow-stubs/generated_for.txt +1 -1
  12. metaflow-stubs/includefile.pyi +4 -4
  13. metaflow-stubs/info_file.pyi +2 -2
  14. metaflow-stubs/metadata_provider/__init__.pyi +2 -2
  15. metaflow-stubs/metadata_provider/heartbeat.pyi +2 -2
  16. metaflow-stubs/metadata_provider/metadata.pyi +2 -2
  17. metaflow-stubs/metadata_provider/util.pyi +2 -2
  18. metaflow-stubs/metaflow_config.pyi +2 -2
  19. metaflow-stubs/metaflow_current.pyi +149 -149
  20. metaflow-stubs/mf_extensions/__init__.pyi +2 -2
  21. metaflow-stubs/mf_extensions/obcheckpoint/__init__.pyi +2 -2
  22. metaflow-stubs/mf_extensions/obcheckpoint/plugins/__init__.pyi +2 -2
  23. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/__init__.pyi +2 -2
  24. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/__init__.pyi +2 -2
  25. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +3 -3
  26. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +2 -2
  27. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi +3 -3
  28. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/exceptions.pyi +2 -2
  29. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +2 -2
  30. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +2 -2
  31. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +2 -2
  32. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +2 -2
  33. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/task_utils.pyi +2 -2
  34. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi +2 -2
  35. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi +2 -2
  36. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/exceptions.pyi +2 -2
  37. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +2 -2
  38. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +2 -2
  39. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +2 -2
  40. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +2 -2
  41. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +2 -2
  42. metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +2 -2
  43. metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +2 -2
  44. metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +2 -2
  45. metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +2 -2
  46. metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +2 -2
  47. metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +2 -2
  48. metaflow-stubs/mflog/__init__.pyi +2 -2
  49. metaflow-stubs/mflog/mflog.pyi +2 -2
  50. metaflow-stubs/multicore_utils.pyi +2 -2
  51. metaflow-stubs/parameters.pyi +4 -4
  52. metaflow-stubs/plugins/__init__.pyi +11 -11
  53. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  54. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  55. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  56. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
  57. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
  58. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
  59. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
  60. metaflow-stubs/plugins/argo/__init__.pyi +2 -2
  61. metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
  62. metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
  63. metaflow-stubs/plugins/argo/argo_workflows.pyi +3 -3
  64. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +2 -2
  65. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +2 -2
  66. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +4 -4
  67. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +3 -3
  68. metaflow-stubs/plugins/aws/__init__.pyi +2 -2
  69. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  70. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  71. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  72. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  73. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  74. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -2
  75. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  76. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +2 -2
  77. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
  78. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  79. metaflow-stubs/plugins/aws/step_functions/production_token.pyi +2 -2
  80. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
  81. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
  82. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  83. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +3 -3
  84. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +2 -2
  85. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  86. metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
  87. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  88. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +2 -2
  89. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  90. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  91. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  92. metaflow-stubs/plugins/cards/__init__.pyi +2 -2
  93. metaflow-stubs/plugins/cards/card_cli.pyi +2 -2
  94. metaflow-stubs/plugins/cards/card_client.pyi +2 -2
  95. metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
  96. metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
  97. metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
  98. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  99. metaflow-stubs/plugins/cards/card_modules/basic.pyi +2 -2
  100. metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
  101. metaflow-stubs/plugins/cards/card_modules/components.pyi +3 -3
  102. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
  103. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  104. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
  105. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  106. metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
  107. metaflow-stubs/plugins/cards/exception.pyi +2 -2
  108. metaflow-stubs/plugins/catch_decorator.pyi +2 -2
  109. metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
  110. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  111. metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
  112. metaflow-stubs/plugins/datatools/s3/s3.pyi +3 -3
  113. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  114. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  115. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  116. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  117. metaflow-stubs/plugins/environment_decorator.pyi +2 -2
  118. metaflow-stubs/plugins/events_decorator.pyi +2 -2
  119. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  120. metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
  121. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  122. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +2 -2
  123. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  124. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  125. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  126. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  127. metaflow-stubs/plugins/kubernetes/__init__.pyi +3 -3
  128. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
  129. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
  130. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +2 -2
  131. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  132. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
  133. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
  134. metaflow-stubs/plugins/logs_cli.pyi +2 -2
  135. metaflow-stubs/plugins/package_cli.pyi +2 -2
  136. metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
  137. metaflow-stubs/plugins/perimeters.pyi +2 -2
  138. metaflow-stubs/plugins/project_decorator.pyi +2 -2
  139. metaflow-stubs/plugins/pypi/__init__.pyi +3 -3
  140. metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
  141. metaflow-stubs/plugins/pypi/conda_environment.pyi +4 -4
  142. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
  143. metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
  144. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  145. metaflow-stubs/plugins/resources_decorator.pyi +2 -2
  146. metaflow-stubs/plugins/retry_decorator.pyi +2 -2
  147. metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
  148. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
  149. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
  150. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  151. metaflow-stubs/plugins/tag_cli.pyi +2 -2
  152. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +2 -2
  153. metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
  154. metaflow-stubs/procpoll.pyi +2 -2
  155. metaflow-stubs/profilers/__init__.pyi +2 -2
  156. metaflow-stubs/pylint_wrapper.pyi +2 -2
  157. metaflow-stubs/runner/__init__.pyi +2 -2
  158. metaflow-stubs/runner/deployer.pyi +5 -5
  159. metaflow-stubs/runner/deployer_impl.pyi +2 -2
  160. metaflow-stubs/runner/metaflow_runner.pyi +3 -3
  161. metaflow-stubs/runner/nbdeploy.pyi +2 -2
  162. metaflow-stubs/runner/nbrun.pyi +2 -2
  163. metaflow-stubs/runner/subprocess_manager.pyi +2 -2
  164. metaflow-stubs/runner/utils.pyi +4 -4
  165. metaflow-stubs/system/__init__.pyi +2 -2
  166. metaflow-stubs/system/system_logger.pyi +2 -2
  167. metaflow-stubs/system/system_monitor.pyi +2 -2
  168. metaflow-stubs/tagging_util.pyi +2 -2
  169. metaflow-stubs/tuple_util.pyi +2 -2
  170. {ob_metaflow_stubs-6.0.3.119.dist-info → ob_metaflow_stubs-6.0.3.121.dist-info}/METADATA +1 -1
  171. ob_metaflow_stubs-6.0.3.121.dist-info/RECORD +174 -0
  172. {ob_metaflow_stubs-6.0.3.119.dist-info → ob_metaflow_stubs-6.0.3.121.dist-info}/WHEEL +1 -1
  173. ob_metaflow_stubs-6.0.3.119.dist-info/RECORD +0 -174
  174. {ob_metaflow_stubs-6.0.3.119.dist-info → ob_metaflow_stubs-6.0.3.121.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.30.2+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-11-21T22:12:20.897909 #
3
+ # MF version: 2.12.33.1+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-12-02T17:17:46.476932 #
5
5
  ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -140,48 +140,53 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
140
140
  """
141
141
  ...
142
142
 
143
- 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] = [], 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) -> 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]]]:
143
+ @typing.overload
144
+ def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
144
145
  """
145
- Specifies that this step should execute on Kubernetes.
146
+ Decorator prototype for all step decorators. This function gets specialized
147
+ and imported for all decorators types by _import_plugin_decorators().
146
148
  """
147
149
  ...
148
150
 
149
151
  @typing.overload
150
- 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]]]:
152
+ def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
153
+ ...
154
+
155
+ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
151
156
  """
152
- Specifies a timeout for your step.
153
-
154
- This decorator is useful if this step may hang indefinitely.
155
-
156
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
157
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
158
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
157
+ Decorator prototype for all step decorators. This function gets specialized
158
+ and imported for all decorators types by _import_plugin_decorators().
159
+ """
160
+ ...
161
+
162
+ @typing.overload
163
+ 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]]]:
164
+ """
165
+ Specifies the Conda environment for the step.
159
166
 
160
- Note that all the values specified in parameters are added together so if you specify
161
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
167
+ Information in this decorator will augment any
168
+ attributes set in the `@conda_base` flow-level decorator. Hence,
169
+ you can use `@conda_base` to set packages required by all
170
+ steps and use `@conda` to specify step-specific overrides.
162
171
  """
163
172
  ...
164
173
 
165
174
  @typing.overload
166
- def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
175
+ def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
167
176
  ...
168
177
 
169
178
  @typing.overload
170
- def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
179
+ def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
171
180
  ...
172
181
 
173
- def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, seconds: int = 0, minutes: int = 0, hours: int = 0):
182
+ 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):
174
183
  """
175
- Specifies a timeout for your step.
176
-
177
- This decorator is useful if this step may hang indefinitely.
178
-
179
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
180
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
181
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
184
+ Specifies the Conda environment for the step.
182
185
 
183
- Note that all the values specified in parameters are added together so if you specify
184
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
186
+ Information in this decorator will augment any
187
+ attributes set in the `@conda_base` flow-level decorator. Hence,
188
+ you can use `@conda_base` to set packages required by all
189
+ steps and use `@conda` to specify step-specific overrides.
185
190
  """
186
191
  ...
187
192
 
@@ -234,20 +239,9 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
234
239
  """
235
240
  ...
236
241
 
237
- @typing.overload
238
- def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
239
- """
240
- Internal decorator to support Fast bakery
241
- """
242
- ...
243
-
244
- @typing.overload
245
- def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
246
- ...
247
-
248
- def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
242
+ def huggingface_hub(*, temp_dir_root: typing.Optional[str] = None, load: typing.Union[typing.List[str], typing.List[typing.Tuple[typing.Dict, str]], typing.List[typing.Tuple[str, str]], typing.List[typing.Dict], 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]]]:
249
243
  """
250
- Internal decorator to support Fast bakery
244
+ Decorator that helps cache, version and store models/datasets from huggingface hub.
251
245
  """
252
246
  ...
253
247
 
@@ -283,87 +277,47 @@ def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
283
277
  ...
284
278
 
285
279
  @typing.overload
286
- def model(*, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, temp_dir_root: 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]]]:
287
- """
288
- Enables loading / saving of models within a step.
289
- """
290
- ...
291
-
292
- @typing.overload
293
- def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
294
- ...
295
-
296
- @typing.overload
297
- def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
298
- ...
299
-
300
- def model(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, temp_dir_root: str = None):
301
- """
302
- Enables loading / saving of models within a step.
303
- """
304
- ...
305
-
306
- @typing.overload
307
- 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]]]:
280
+ 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]]]:
308
281
  """
309
- Creates a human-readable report, a Metaflow Card, after this step completes.
282
+ Specifies a timeout for your step.
310
283
 
311
- Note that you may add multiple `@card` decorators in a step with different parameters.
284
+ This decorator is useful if this step may hang indefinitely.
285
+
286
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
287
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
288
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
289
+
290
+ Note that all the values specified in parameters are added together so if you specify
291
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
312
292
  """
313
293
  ...
314
294
 
315
295
  @typing.overload
316
- def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
296
+ def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
317
297
  ...
318
298
 
319
299
  @typing.overload
320
- def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
300
+ def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
321
301
  ...
322
302
 
323
- 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):
303
+ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, seconds: int = 0, minutes: int = 0, hours: int = 0):
324
304
  """
325
- Creates a human-readable report, a Metaflow Card, after this step completes.
305
+ Specifies a timeout for your step.
326
306
 
327
- Note that you may add multiple `@card` decorators in a step with different parameters.
328
- """
329
- ...
330
-
331
- @typing.overload
332
- 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]]]:
333
- """
334
- Specifies the number of times the task corresponding
335
- to a step needs to be retried.
307
+ This decorator is useful if this step may hang indefinitely.
336
308
 
337
- This decorator is useful for handling transient errors, such as networking issues.
338
- If your task contains operations that can't be retried safely, e.g. database updates,
339
- it is advisable to annotate it with `@retry(times=0)`.
309
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
310
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
311
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
340
312
 
341
- This can be used in conjunction with the `@catch` decorator. The `@catch`
342
- decorator will execute a no-op task after all retries have been exhausted,
343
- ensuring that the flow execution can continue.
313
+ Note that all the values specified in parameters are added together so if you specify
314
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
344
315
  """
345
316
  ...
346
317
 
347
- @typing.overload
348
- def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
349
- ...
350
-
351
- @typing.overload
352
- def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
353
- ...
354
-
355
- def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, times: int = 3, minutes_between_retries: int = 2):
318
+ 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] = [], 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) -> 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]]]:
356
319
  """
357
- Specifies the number of times the task corresponding
358
- to a step needs to be retried.
359
-
360
- This decorator is useful for handling transient errors, such as networking issues.
361
- If your task contains operations that can't be retried safely, e.g. database updates,
362
- it is advisable to annotate it with `@retry(times=0)`.
363
-
364
- This can be used in conjunction with the `@catch` decorator. The `@catch`
365
- decorator will execute a no-op task after all retries have been exhausted,
366
- ensuring that the flow execution can continue.
320
+ Specifies that this step should execute on Kubernetes.
367
321
  """
368
322
  ...
369
323
 
@@ -420,109 +374,148 @@ def pypi(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typ
420
374
  ...
421
375
 
422
376
  @typing.overload
423
- 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]]]:
377
+ 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]]]:
424
378
  """
425
- Specifies the Conda environment for the step.
426
-
427
- Information in this decorator will augment any
428
- attributes set in the `@conda_base` flow-level decorator. Hence,
429
- you can use `@conda_base` to set packages required by all
430
- steps and use `@conda` to specify step-specific overrides.
379
+ Specifies environment variables to be set prior to the execution of a step.
431
380
  """
432
381
  ...
433
382
 
434
383
  @typing.overload
435
- def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
384
+ def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
436
385
  ...
437
386
 
438
387
  @typing.overload
439
- def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
388
+ def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
440
389
  ...
441
390
 
442
- 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):
391
+ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
443
392
  """
444
- Specifies the Conda environment for the step.
445
-
446
- Information in this decorator will augment any
447
- attributes set in the `@conda_base` flow-level decorator. Hence,
448
- you can use `@conda_base` to set packages required by all
449
- steps and use `@conda` to specify step-specific overrides.
393
+ Specifies environment variables to be set prior to the execution of a step.
450
394
  """
451
395
  ...
452
396
 
453
397
  @typing.overload
454
- 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]]]:
398
+ 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]]]:
455
399
  """
456
- Specifies secrets to be retrieved and injected as environment variables prior to
457
- the execution of a step.
400
+ Specifies the number of times the task corresponding
401
+ to a step needs to be retried.
402
+
403
+ This decorator is useful for handling transient errors, such as networking issues.
404
+ If your task contains operations that can't be retried safely, e.g. database updates,
405
+ it is advisable to annotate it with `@retry(times=0)`.
406
+
407
+ This can be used in conjunction with the `@catch` decorator. The `@catch`
408
+ decorator will execute a no-op task after all retries have been exhausted,
409
+ ensuring that the flow execution can continue.
458
410
  """
459
411
  ...
460
412
 
461
413
  @typing.overload
462
- def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
414
+ def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
463
415
  ...
464
416
 
465
417
  @typing.overload
466
- def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
418
+ def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
467
419
  ...
468
420
 
469
- 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]]] = []):
421
+ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, times: int = 3, minutes_between_retries: int = 2):
470
422
  """
471
- Specifies secrets to be retrieved and injected as environment variables prior to
472
- the execution of a step.
423
+ Specifies the number of times the task corresponding
424
+ to a step needs to be retried.
425
+
426
+ This decorator is useful for handling transient errors, such as networking issues.
427
+ If your task contains operations that can't be retried safely, e.g. database updates,
428
+ it is advisable to annotate it with `@retry(times=0)`.
429
+
430
+ This can be used in conjunction with the `@catch` decorator. The `@catch`
431
+ decorator will execute a no-op task after all retries have been exhausted,
432
+ ensuring that the flow execution can continue.
473
433
  """
474
434
  ...
475
435
 
476
- def huggingface_hub(*, temp_dir_root: typing.Optional[str] = None, load: typing.Union[typing.List[str], typing.List[typing.Tuple[typing.Dict, str]], typing.List[typing.Tuple[str, str]], typing.List[typing.Dict], 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]]]:
436
+ @typing.overload
437
+ 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]]]:
477
438
  """
478
- Decorator that helps cache, version and store models/datasets from huggingface hub.
439
+ Creates a human-readable report, a Metaflow Card, after this step completes.
440
+
441
+ Note that you may add multiple `@card` decorators in a step with different parameters.
479
442
  """
480
443
  ...
481
444
 
482
445
  @typing.overload
483
- def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
446
+ def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
447
+ ...
448
+
449
+ @typing.overload
450
+ def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
451
+ ...
452
+
453
+ 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):
484
454
  """
485
- Decorator prototype for all step decorators. This function gets specialized
486
- and imported for all decorators types by _import_plugin_decorators().
455
+ Creates a human-readable report, a Metaflow Card, after this step completes.
456
+
457
+ Note that you may add multiple `@card` decorators in a step with different parameters.
487
458
  """
488
459
  ...
489
460
 
490
461
  @typing.overload
491
- def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
462
+ def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
463
+ """
464
+ Internal decorator to support Fast bakery
465
+ """
492
466
  ...
493
467
 
494
- def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
468
+ @typing.overload
469
+ def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
470
+ ...
471
+
472
+ def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
495
473
  """
496
- Decorator prototype for all step decorators. This function gets specialized
497
- and imported for all decorators types by _import_plugin_decorators().
474
+ Internal decorator to support Fast bakery
498
475
  """
499
476
  ...
500
477
 
501
478
  @typing.overload
502
- 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]]]:
479
+ def model(*, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, temp_dir_root: 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]]]:
503
480
  """
504
- Specifies environment variables to be set prior to the execution of a step.
481
+ Enables loading / saving of models within a step.
505
482
  """
506
483
  ...
507
484
 
508
485
  @typing.overload
509
- def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
486
+ def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
510
487
  ...
511
488
 
512
489
  @typing.overload
513
- def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
490
+ def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
514
491
  ...
515
492
 
516
- def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
493
+ def model(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, temp_dir_root: str = None):
517
494
  """
518
- Specifies environment variables to be set prior to the execution of a step.
495
+ Enables loading / saving of models within a step.
519
496
  """
520
497
  ...
521
498
 
522
- 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]]:
499
+ @typing.overload
500
+ 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]]]:
523
501
  """
524
- 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.
525
- 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.
502
+ Specifies secrets to be retrieved and injected as environment variables prior to
503
+ the execution of a step.
504
+ """
505
+ ...
506
+
507
+ @typing.overload
508
+ def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
509
+ ...
510
+
511
+ @typing.overload
512
+ def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
513
+ ...
514
+
515
+ 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]]] = []):
516
+ """
517
+ Specifies secrets to be retrieved and injected as environment variables prior to
518
+ the execution of a step.
526
519
  """
527
520
  ...
528
521
 
@@ -549,6 +542,25 @@ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packag
549
542
  """
550
543
  ...
551
544
 
545
+ @typing.overload
546
+ 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]]:
547
+ """
548
+ Specifies the times when the flow should be run when running on a
549
+ production scheduler.
550
+ """
551
+ ...
552
+
553
+ @typing.overload
554
+ def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
555
+ ...
556
+
557
+ 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):
558
+ """
559
+ Specifies the times when the flow should be run when running on a
560
+ production scheduler.
561
+ """
562
+ ...
563
+
552
564
  def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
553
565
  """
554
566
  This decorator is used to run NIM containers in Metaflow tasks as sidecars.
@@ -573,6 +585,87 @@ def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[Fl
573
585
  """
574
586
  ...
575
587
 
588
+ @typing.overload
589
+ 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]]:
590
+ """
591
+ Specifies the flow(s) that this flow depends on.
592
+
593
+ ```
594
+ @trigger_on_finish(flow='FooFlow')
595
+ ```
596
+ or
597
+ ```
598
+ @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
599
+ ```
600
+ This decorator respects the @project decorator and triggers the flow
601
+ when upstream runs within the same namespace complete successfully
602
+
603
+ Additionally, you can specify project aware upstream flow dependencies
604
+ by specifying the fully qualified project_flow_name.
605
+ ```
606
+ @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
607
+ ```
608
+ or
609
+ ```
610
+ @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
611
+ ```
612
+
613
+ You can also specify just the project or project branch (other values will be
614
+ inferred from the current project or project branch):
615
+ ```
616
+ @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
617
+ ```
618
+
619
+ Note that `branch` is typically one of:
620
+ - `prod`
621
+ - `user.bob`
622
+ - `test.my_experiment`
623
+ - `prod.staging`
624
+ """
625
+ ...
626
+
627
+ @typing.overload
628
+ def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
629
+ ...
630
+
631
+ 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] = {}):
632
+ """
633
+ Specifies the flow(s) that this flow depends on.
634
+
635
+ ```
636
+ @trigger_on_finish(flow='FooFlow')
637
+ ```
638
+ or
639
+ ```
640
+ @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
641
+ ```
642
+ This decorator respects the @project decorator and triggers the flow
643
+ when upstream runs within the same namespace complete successfully
644
+
645
+ Additionally, you can specify project aware upstream flow dependencies
646
+ by specifying the fully qualified project_flow_name.
647
+ ```
648
+ @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
649
+ ```
650
+ or
651
+ ```
652
+ @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
653
+ ```
654
+
655
+ You can also specify just the project or project branch (other values will be
656
+ inferred from the current project or project branch):
657
+ ```
658
+ @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
659
+ ```
660
+
661
+ Note that `branch` is typically one of:
662
+ - `prod`
663
+ - `user.bob`
664
+ - `test.my_experiment`
665
+ - `prod.staging`
666
+ """
667
+ ...
668
+
576
669
  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]]:
577
670
  """
578
671
  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)
@@ -656,6 +749,13 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
656
749
  """
657
750
  ...
658
751
 
752
+ 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]]:
753
+ """
754
+ 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.
755
+ 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.
756
+ """
757
+ ...
758
+
659
759
  @typing.overload
660
760
  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]]:
661
761
  """
@@ -679,106 +779,6 @@ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packa
679
779
  """
680
780
  ...
681
781
 
682
- @typing.overload
683
- 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]]:
684
- """
685
- Specifies the flow(s) that this flow depends on.
686
-
687
- ```
688
- @trigger_on_finish(flow='FooFlow')
689
- ```
690
- or
691
- ```
692
- @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
693
- ```
694
- This decorator respects the @project decorator and triggers the flow
695
- when upstream runs within the same namespace complete successfully
696
-
697
- Additionally, you can specify project aware upstream flow dependencies
698
- by specifying the fully qualified project_flow_name.
699
- ```
700
- @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
701
- ```
702
- or
703
- ```
704
- @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
705
- ```
706
-
707
- You can also specify just the project or project branch (other values will be
708
- inferred from the current project or project branch):
709
- ```
710
- @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
711
- ```
712
-
713
- Note that `branch` is typically one of:
714
- - `prod`
715
- - `user.bob`
716
- - `test.my_experiment`
717
- - `prod.staging`
718
- """
719
- ...
720
-
721
- @typing.overload
722
- def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
723
- ...
724
-
725
- 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] = {}):
726
- """
727
- Specifies the flow(s) that this flow depends on.
728
-
729
- ```
730
- @trigger_on_finish(flow='FooFlow')
731
- ```
732
- or
733
- ```
734
- @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
735
- ```
736
- This decorator respects the @project decorator and triggers the flow
737
- when upstream runs within the same namespace complete successfully
738
-
739
- Additionally, you can specify project aware upstream flow dependencies
740
- by specifying the fully qualified project_flow_name.
741
- ```
742
- @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
743
- ```
744
- or
745
- ```
746
- @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
747
- ```
748
-
749
- You can also specify just the project or project branch (other values will be
750
- inferred from the current project or project branch):
751
- ```
752
- @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
753
- ```
754
-
755
- Note that `branch` is typically one of:
756
- - `prod`
757
- - `user.bob`
758
- - `test.my_experiment`
759
- - `prod.staging`
760
- """
761
- ...
762
-
763
- @typing.overload
764
- 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]]:
765
- """
766
- Specifies the times when the flow should be run when running on a
767
- production scheduler.
768
- """
769
- ...
770
-
771
- @typing.overload
772
- def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
773
- ...
774
-
775
- 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):
776
- """
777
- Specifies the times when the flow should be run when running on a
778
- production scheduler.
779
- """
780
- ...
781
-
782
782
  def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
783
783
  """
784
784
  Specifies what flows belong to the same project.