ob-metaflow-stubs 6.0.3.122__py2.py3-none-any.whl → 6.0.3.125__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. metaflow-stubs/__init__.pyi +239 -238
  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 +5 -5
  6. metaflow-stubs/client/filecache.pyi +3 -3
  7. metaflow-stubs/clone_util.pyi +2 -2
  8. metaflow-stubs/events.pyi +3 -3
  9. metaflow-stubs/exception.pyi +2 -2
  10. metaflow-stubs/flowspec.pyi +6 -6
  11. metaflow-stubs/generated_for.txt +1 -1
  12. metaflow-stubs/includefile.pyi +5 -5
  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 +114 -114
  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 +4 -4
  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 +3 -3
  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 +3 -3
  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 +3 -3
  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 +3 -3
  42. metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +2 -2
  43. metaflow-stubs/mf_extensions/outerbounds/plugins/__init__.pyi +6 -0
  44. metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/__init__.pyi +6 -0
  45. metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/snowflake.pyi +92 -0
  46. metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +2 -2
  47. metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +2 -2
  48. metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +2 -2
  49. metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +2 -2
  50. metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +3 -2
  51. metaflow-stubs/mflog/__init__.pyi +2 -2
  52. metaflow-stubs/mflog/mflog.pyi +2 -2
  53. metaflow-stubs/multicore_utils.pyi +2 -2
  54. metaflow-stubs/parameters.pyi +5 -5
  55. metaflow-stubs/plugins/__init__.pyi +14 -13
  56. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  57. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  58. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  59. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
  60. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
  61. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
  62. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
  63. metaflow-stubs/plugins/argo/__init__.pyi +2 -2
  64. metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
  65. metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
  66. metaflow-stubs/plugins/argo/argo_workflows.pyi +3 -3
  67. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +2 -2
  68. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +4 -4
  69. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +5 -5
  70. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +3 -3
  71. metaflow-stubs/plugins/aws/__init__.pyi +2 -2
  72. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  73. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  74. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  75. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  76. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  77. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -2
  78. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  79. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +3 -3
  80. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
  81. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  82. metaflow-stubs/plugins/aws/step_functions/production_token.pyi +2 -2
  83. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
  84. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
  85. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  86. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +4 -4
  87. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +3 -3
  88. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  89. metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
  90. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  91. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +3 -3
  92. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  93. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  94. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  95. metaflow-stubs/plugins/cards/__init__.pyi +2 -2
  96. metaflow-stubs/plugins/cards/card_cli.pyi +2 -2
  97. metaflow-stubs/plugins/cards/card_client.pyi +3 -3
  98. metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
  99. metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
  100. metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
  101. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  102. metaflow-stubs/plugins/cards/card_modules/basic.pyi +2 -2
  103. metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
  104. metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
  105. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
  106. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  107. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
  108. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  109. metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
  110. metaflow-stubs/plugins/cards/exception.pyi +2 -2
  111. metaflow-stubs/plugins/catch_decorator.pyi +3 -3
  112. metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
  113. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  114. metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
  115. metaflow-stubs/plugins/datatools/s3/s3.pyi +4 -4
  116. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  117. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  118. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  119. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  120. metaflow-stubs/plugins/environment_decorator.pyi +2 -2
  121. metaflow-stubs/plugins/events_decorator.pyi +2 -2
  122. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  123. metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
  124. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  125. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +3 -3
  126. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  127. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  128. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  129. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  130. metaflow-stubs/plugins/kubernetes/__init__.pyi +3 -3
  131. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
  132. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +3 -3
  133. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +2 -2
  134. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  135. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
  136. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
  137. metaflow-stubs/plugins/logs_cli.pyi +2 -2
  138. metaflow-stubs/plugins/package_cli.pyi +2 -2
  139. metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
  140. metaflow-stubs/plugins/perimeters.pyi +2 -2
  141. metaflow-stubs/plugins/project_decorator.pyi +2 -2
  142. metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
  143. metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
  144. metaflow-stubs/plugins/pypi/conda_environment.pyi +5 -5
  145. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
  146. metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
  147. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  148. metaflow-stubs/plugins/resources_decorator.pyi +2 -2
  149. metaflow-stubs/plugins/retry_decorator.pyi +2 -2
  150. metaflow-stubs/plugins/secrets/__init__.pyi +3 -3
  151. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
  152. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
  153. metaflow-stubs/plugins/snowflake/__init__.pyi +14 -0
  154. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  155. metaflow-stubs/plugins/tag_cli.pyi +2 -2
  156. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +2 -2
  157. metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
  158. metaflow-stubs/procpoll.pyi +2 -2
  159. metaflow-stubs/profilers/__init__.pyi +2 -2
  160. metaflow-stubs/pylint_wrapper.pyi +2 -2
  161. metaflow-stubs/runner/__init__.pyi +2 -2
  162. metaflow-stubs/runner/deployer.pyi +7 -7
  163. metaflow-stubs/runner/deployer_impl.pyi +3 -3
  164. metaflow-stubs/runner/metaflow_runner.pyi +3 -3
  165. metaflow-stubs/runner/nbdeploy.pyi +2 -2
  166. metaflow-stubs/runner/nbrun.pyi +2 -2
  167. metaflow-stubs/runner/subprocess_manager.pyi +2 -2
  168. metaflow-stubs/runner/utils.pyi +3 -3
  169. metaflow-stubs/system/__init__.pyi +2 -2
  170. metaflow-stubs/system/system_logger.pyi +2 -2
  171. metaflow-stubs/system/system_monitor.pyi +2 -2
  172. metaflow-stubs/tagging_util.pyi +2 -2
  173. metaflow-stubs/tuple_util.pyi +2 -2
  174. {ob_metaflow_stubs-6.0.3.122.dist-info → ob_metaflow_stubs-6.0.3.125.dist-info}/METADATA +1 -1
  175. ob_metaflow_stubs-6.0.3.125.dist-info/RECORD +178 -0
  176. ob_metaflow_stubs-6.0.3.122.dist-info/RECORD +0 -174
  177. {ob_metaflow_stubs-6.0.3.122.dist-info → ob_metaflow_stubs-6.0.3.125.dist-info}/WHEEL +0 -0
  178. {ob_metaflow_stubs-6.0.3.122.dist-info → ob_metaflow_stubs-6.0.3.125.dist-info}/top_level.txt +0 -0
@@ -1,15 +1,15 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.35.1+obcheckpoint(0.1.4);ob(v1) #
4
- # Generated on 2024-12-06T18:19:55.683902 #
3
+ # MF version: 2.12.36.3+obcheckpoint(0.1.4);ob(v1) #
4
+ # Generated on 2024-12-10T22:06:22.196386 #
5
5
  ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
9
  import typing
10
10
  if typing.TYPE_CHECKING:
11
- import typing
12
11
  import datetime
12
+ import typing
13
13
  FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
14
14
  StepFlag = typing.NewType("StepFlag", bool)
15
15
 
@@ -58,6 +58,7 @@ from .runner.nbdeploy import NBDeployer as NBDeployer
58
58
  from .mf_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.final_api import Checkpoint as Checkpoint
59
59
  from .mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures import load_model as load_model
60
60
  from .mf_extensions.outerbounds.toplevel.global_aliases_for_metaflow_package import get_aws_client as get_aws_client
61
+ from .mf_extensions.outerbounds.plugins.snowflake.snowflake import Snowflake as Snowflake
61
62
  from . import system as system
62
63
  from . import pylint_wrapper as pylint_wrapper
63
64
  from . import procpoll as procpoll
@@ -140,48 +141,20 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
140
141
  """
141
142
  ...
142
143
 
143
- 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]]]:
144
- """
145
- Decorator that helps cache, version and store models/datasets from huggingface hub.
146
- """
147
- ...
148
-
149
144
  @typing.overload
150
- 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]]]:
145
+ def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
151
146
  """
152
- Specifies the number of times the task corresponding
153
- to a step needs to be retried.
154
-
155
- This decorator is useful for handling transient errors, such as networking issues.
156
- If your task contains operations that can't be retried safely, e.g. database updates,
157
- it is advisable to annotate it with `@retry(times=0)`.
158
-
159
- This can be used in conjunction with the `@catch` decorator. The `@catch`
160
- decorator will execute a no-op task after all retries have been exhausted,
161
- ensuring that the flow execution can continue.
147
+ Internal decorator to support Fast bakery
162
148
  """
163
149
  ...
164
150
 
165
151
  @typing.overload
166
- def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
167
- ...
168
-
169
- @typing.overload
170
- def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
152
+ def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
171
153
  ...
172
154
 
173
- 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):
155
+ def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
174
156
  """
175
- Specifies the number of times the task corresponding
176
- to a step needs to be retried.
177
-
178
- This decorator is useful for handling transient errors, such as networking issues.
179
- If your task contains operations that can't be retried safely, e.g. database updates,
180
- it is advisable to annotate it with `@retry(times=0)`.
181
-
182
- This can be used in conjunction with the `@catch` decorator. The `@catch`
183
- decorator will execute a no-op task after all retries have been exhausted,
184
- ensuring that the flow execution can continue.
157
+ Internal decorator to support Fast bakery
185
158
  """
186
159
  ...
187
160
 
@@ -206,56 +179,6 @@ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], Non
206
179
  """
207
180
  ...
208
181
 
209
- @typing.overload
210
- def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
211
- """
212
- Decorator prototype for all step decorators. This function gets specialized
213
- and imported for all decorators types by _import_plugin_decorators().
214
- """
215
- ...
216
-
217
- @typing.overload
218
- def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
219
- ...
220
-
221
- def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
222
- """
223
- Decorator prototype for all step decorators. This function gets specialized
224
- and imported for all decorators types by _import_plugin_decorators().
225
- """
226
- ...
227
-
228
- @typing.overload
229
- 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]]]:
230
- """
231
- Specifies the PyPI packages for the step.
232
-
233
- Information in this decorator will augment any
234
- attributes set in the `@pyi_base` flow-level decorator. Hence,
235
- you can use `@pypi_base` to set packages required by all
236
- steps and use `@pypi` to specify step-specific overrides.
237
- """
238
- ...
239
-
240
- @typing.overload
241
- def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
242
- ...
243
-
244
- @typing.overload
245
- def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
246
- ...
247
-
248
- 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):
249
- """
250
- Specifies the PyPI packages for the step.
251
-
252
- Information in this decorator will augment any
253
- attributes set in the `@pyi_base` flow-level decorator. Hence,
254
- you can use `@pypi_base` to set packages required by all
255
- steps and use `@pypi` to specify step-specific overrides.
256
- """
257
- ...
258
-
259
182
  @typing.overload
260
183
  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]]]:
261
184
  """
@@ -305,27 +228,6 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
305
228
  """
306
229
  ...
307
230
 
308
- @typing.overload
309
- def checkpoint(*, load_policy: str = 'fresh', 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]]]:
310
- """
311
- Enables checkpointing for a step.
312
- """
313
- ...
314
-
315
- @typing.overload
316
- def checkpoint(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
317
- ...
318
-
319
- @typing.overload
320
- def checkpoint(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
321
- ...
322
-
323
- def checkpoint(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, load_policy: str = 'fresh', temp_dir_root: str = None):
324
- """
325
- Enables checkpointing for a step.
326
- """
327
- ...
328
-
329
231
  @typing.overload
330
232
  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]]]:
331
233
  """
@@ -358,50 +260,54 @@ def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
358
260
  ...
359
261
 
360
262
  @typing.overload
361
- 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]]]:
263
+ 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]]]:
362
264
  """
363
- Creates a human-readable report, a Metaflow Card, after this step completes.
364
-
365
- Note that you may add multiple `@card` decorators in a step with different parameters.
265
+ Enables loading / saving of models within a step.
366
266
  """
367
267
  ...
368
268
 
369
269
  @typing.overload
370
- def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
270
+ def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
371
271
  ...
372
272
 
373
273
  @typing.overload
374
- def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
274
+ def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
375
275
  ...
376
276
 
377
- 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):
277
+ 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):
378
278
  """
379
- Creates a human-readable report, a Metaflow Card, after this step completes.
380
-
381
- Note that you may add multiple `@card` decorators in a step with different parameters.
279
+ Enables loading / saving of models within a step.
382
280
  """
383
281
  ...
384
282
 
385
283
  @typing.overload
386
- 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]]]:
284
+ 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]]]:
387
285
  """
388
- Specifies secrets to be retrieved and injected as environment variables prior to
389
- the execution of a step.
286
+ Specifies the PyPI packages for the step.
287
+
288
+ Information in this decorator will augment any
289
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
290
+ you can use `@pypi_base` to set packages required by all
291
+ steps and use `@pypi` to specify step-specific overrides.
390
292
  """
391
293
  ...
392
294
 
393
295
  @typing.overload
394
- def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
296
+ def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
395
297
  ...
396
298
 
397
299
  @typing.overload
398
- def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
300
+ def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
399
301
  ...
400
302
 
401
- def secrets(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = []):
303
+ def 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):
402
304
  """
403
- Specifies secrets to be retrieved and injected as environment variables prior to
404
- the execution of a step.
305
+ Specifies the PyPI packages for the step.
306
+
307
+ Information in this decorator will augment any
308
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
309
+ you can use `@pypi_base` to set packages required by all
310
+ steps and use `@pypi` to specify step-specific overrides.
405
311
  """
406
312
  ...
407
313
 
@@ -436,6 +342,50 @@ def conda(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
436
342
  """
437
343
  ...
438
344
 
345
+ @typing.overload
346
+ 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]]]:
347
+ """
348
+ Creates a human-readable report, a Metaflow Card, after this step completes.
349
+
350
+ Note that you may add multiple `@card` decorators in a step with different parameters.
351
+ """
352
+ ...
353
+
354
+ @typing.overload
355
+ def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
356
+ ...
357
+
358
+ @typing.overload
359
+ def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
360
+ ...
361
+
362
+ 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):
363
+ """
364
+ Creates a human-readable report, a Metaflow Card, after this step completes.
365
+
366
+ Note that you may add multiple `@card` decorators in a step with different parameters.
367
+ """
368
+ ...
369
+
370
+ @typing.overload
371
+ def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
372
+ """
373
+ Decorator prototype for all step decorators. This function gets specialized
374
+ and imported for all decorators types by _import_plugin_decorators().
375
+ """
376
+ ...
377
+
378
+ @typing.overload
379
+ def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
380
+ ...
381
+
382
+ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
383
+ """
384
+ Decorator prototype for all step decorators. This function gets specialized
385
+ and imported for all decorators types by _import_plugin_decorators().
386
+ """
387
+ ...
388
+
439
389
  @typing.overload
440
390
  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]]]:
441
391
  """
@@ -475,6 +425,12 @@ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
475
425
  """
476
426
  ...
477
427
 
428
+ 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]]]:
429
+ """
430
+ Decorator that helps cache, version and store models/datasets from huggingface hub.
431
+ """
432
+ ...
433
+
478
434
  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, qos: str = 'Burstable') -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
479
435
  """
480
436
  Specifies that this step should execute on Kubernetes.
@@ -482,144 +438,85 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
482
438
  ...
483
439
 
484
440
  @typing.overload
485
- 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]]]:
441
+ 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]]]:
486
442
  """
487
- Enables loading / saving of models within a step.
443
+ Specifies secrets to be retrieved and injected as environment variables prior to
444
+ the execution of a step.
488
445
  """
489
446
  ...
490
447
 
491
448
  @typing.overload
492
- def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
449
+ def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
493
450
  ...
494
451
 
495
452
  @typing.overload
496
- def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
453
+ def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
497
454
  ...
498
455
 
499
- 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):
456
+ 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]]] = []):
500
457
  """
501
- Enables loading / saving of models within a step.
458
+ Specifies secrets to be retrieved and injected as environment variables prior to
459
+ the execution of a step.
502
460
  """
503
461
  ...
504
462
 
505
463
  @typing.overload
506
- def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
464
+ def checkpoint(*, load_policy: str = 'fresh', 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]]]:
507
465
  """
508
- Internal decorator to support Fast bakery
466
+ Enables checkpointing for a step.
509
467
  """
510
468
  ...
511
469
 
512
470
  @typing.overload
513
- def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
471
+ def checkpoint(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
514
472
  ...
515
473
 
516
- def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
517
- """
518
- Internal decorator to support Fast bakery
519
- """
474
+ @typing.overload
475
+ def checkpoint(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
520
476
  ...
521
477
 
522
- @typing.overload
523
- 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]]:
478
+ def checkpoint(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, load_policy: str = 'fresh', temp_dir_root: str = None):
524
479
  """
525
- Specifies the flow(s) that this flow depends on.
526
-
527
- ```
528
- @trigger_on_finish(flow='FooFlow')
529
- ```
530
- or
531
- ```
532
- @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
533
- ```
534
- This decorator respects the @project decorator and triggers the flow
535
- when upstream runs within the same namespace complete successfully
536
-
537
- Additionally, you can specify project aware upstream flow dependencies
538
- by specifying the fully qualified project_flow_name.
539
- ```
540
- @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
541
- ```
542
- or
543
- ```
544
- @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
545
- ```
546
-
547
- You can also specify just the project or project branch (other values will be
548
- inferred from the current project or project branch):
549
- ```
550
- @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
551
- ```
552
-
553
- Note that `branch` is typically one of:
554
- - `prod`
555
- - `user.bob`
556
- - `test.my_experiment`
557
- - `prod.staging`
480
+ Enables checkpointing for a step.
558
481
  """
559
482
  ...
560
483
 
561
484
  @typing.overload
562
- def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
563
- ...
564
-
565
- 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] = {}):
485
+ 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]]]:
566
486
  """
567
- Specifies the flow(s) that this flow depends on.
568
-
569
- ```
570
- @trigger_on_finish(flow='FooFlow')
571
- ```
572
- or
573
- ```
574
- @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
575
- ```
576
- This decorator respects the @project decorator and triggers the flow
577
- when upstream runs within the same namespace complete successfully
578
-
579
- Additionally, you can specify project aware upstream flow dependencies
580
- by specifying the fully qualified project_flow_name.
581
- ```
582
- @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
583
- ```
584
- or
585
- ```
586
- @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
587
- ```
487
+ Specifies the number of times the task corresponding
488
+ to a step needs to be retried.
588
489
 
589
- You can also specify just the project or project branch (other values will be
590
- inferred from the current project or project branch):
591
- ```
592
- @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
593
- ```
490
+ This decorator is useful for handling transient errors, such as networking issues.
491
+ If your task contains operations that can't be retried safely, e.g. database updates,
492
+ it is advisable to annotate it with `@retry(times=0)`.
594
493
 
595
- Note that `branch` is typically one of:
596
- - `prod`
597
- - `user.bob`
598
- - `test.my_experiment`
599
- - `prod.staging`
494
+ This can be used in conjunction with the `@catch` decorator. The `@catch`
495
+ decorator will execute a no-op task after all retries have been exhausted,
496
+ ensuring that the flow execution can continue.
600
497
  """
601
498
  ...
602
499
 
603
500
  @typing.overload
604
- def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
605
- """
606
- Specifies the PyPI packages for all steps of the flow.
607
-
608
- Use `@pypi_base` to set common packages required by all
609
- steps and use `@pypi` to specify step-specific overrides.
610
- """
501
+ def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
611
502
  ...
612
503
 
613
504
  @typing.overload
614
- def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
505
+ def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
615
506
  ...
616
507
 
617
- def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
508
+ 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):
618
509
  """
619
- Specifies the PyPI packages for all steps of the flow.
510
+ Specifies the number of times the task corresponding
511
+ to a step needs to be retried.
620
512
 
621
- Use `@pypi_base` to set common packages required by all
622
- steps and use `@pypi` to specify step-specific overrides.
513
+ This decorator is useful for handling transient errors, such as networking issues.
514
+ If your task contains operations that can't be retried safely, e.g. database updates,
515
+ it is advisable to annotate it with `@retry(times=0)`.
516
+
517
+ This can be used in conjunction with the `@catch` decorator. The `@catch`
518
+ decorator will execute a no-op task after all retries have been exhausted,
519
+ ensuring that the flow execution can continue.
623
520
  """
624
521
  ...
625
522
 
@@ -647,12 +544,20 @@ def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[Fl
647
544
  """
648
545
  ...
649
546
 
650
- def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
547
+ 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]]:
651
548
  """
652
- Specifies what flows belong to the same project.
653
-
654
- A project-specific namespace is created for all flows that
655
- use the same `@project(name)`.
549
+ 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.
550
+ 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.
551
+ """
552
+ ...
553
+
554
+ 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]]:
555
+ """
556
+ 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)
557
+ before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
558
+ and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
559
+ added as a flow decorators. Adding more than one decorator will ensure that `start` step
560
+ starts only after all sensors finish.
656
561
  """
657
562
  ...
658
563
 
@@ -729,16 +634,6 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
729
634
  """
730
635
  ...
731
636
 
732
- 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]]:
733
- """
734
- 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)
735
- before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
736
- and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
737
- added as a flow decorators. Adding more than one decorator will ensure that `start` step
738
- starts only after all sensors finish.
739
- """
740
- ...
741
-
742
637
  @typing.overload
743
638
  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]]:
744
639
  """
@@ -758,10 +653,12 @@ def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly:
758
653
  """
759
654
  ...
760
655
 
761
- 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]]:
656
+ def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
762
657
  """
763
- 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.
764
- 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.
658
+ Specifies what flows belong to the same project.
659
+
660
+ A project-specific namespace is created for all flows that
661
+ use the same `@project(name)`.
765
662
  """
766
663
  ...
767
664
 
@@ -788,5 +685,109 @@ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packa
788
685
  """
789
686
  ...
790
687
 
688
+ @typing.overload
689
+ def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
690
+ """
691
+ Specifies the PyPI packages for all steps of the flow.
692
+
693
+ Use `@pypi_base` to set common packages required by all
694
+ steps and use `@pypi` to specify step-specific overrides.
695
+ """
696
+ ...
697
+
698
+ @typing.overload
699
+ def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
700
+ ...
701
+
702
+ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
703
+ """
704
+ Specifies the PyPI packages for all steps of the flow.
705
+
706
+ Use `@pypi_base` to set common packages required by all
707
+ steps and use `@pypi` to specify step-specific overrides.
708
+ """
709
+ ...
710
+
711
+ @typing.overload
712
+ 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]]:
713
+ """
714
+ Specifies the flow(s) that this flow depends on.
715
+
716
+ ```
717
+ @trigger_on_finish(flow='FooFlow')
718
+ ```
719
+ or
720
+ ```
721
+ @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
722
+ ```
723
+ This decorator respects the @project decorator and triggers the flow
724
+ when upstream runs within the same namespace complete successfully
725
+
726
+ Additionally, you can specify project aware upstream flow dependencies
727
+ by specifying the fully qualified project_flow_name.
728
+ ```
729
+ @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
730
+ ```
731
+ or
732
+ ```
733
+ @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
734
+ ```
735
+
736
+ You can also specify just the project or project branch (other values will be
737
+ inferred from the current project or project branch):
738
+ ```
739
+ @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
740
+ ```
741
+
742
+ Note that `branch` is typically one of:
743
+ - `prod`
744
+ - `user.bob`
745
+ - `test.my_experiment`
746
+ - `prod.staging`
747
+ """
748
+ ...
749
+
750
+ @typing.overload
751
+ def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
752
+ ...
753
+
754
+ 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] = {}):
755
+ """
756
+ Specifies the flow(s) that this flow depends on.
757
+
758
+ ```
759
+ @trigger_on_finish(flow='FooFlow')
760
+ ```
761
+ or
762
+ ```
763
+ @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
764
+ ```
765
+ This decorator respects the @project decorator and triggers the flow
766
+ when upstream runs within the same namespace complete successfully
767
+
768
+ Additionally, you can specify project aware upstream flow dependencies
769
+ by specifying the fully qualified project_flow_name.
770
+ ```
771
+ @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
772
+ ```
773
+ or
774
+ ```
775
+ @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
776
+ ```
777
+
778
+ You can also specify just the project or project branch (other values will be
779
+ inferred from the current project or project branch):
780
+ ```
781
+ @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
782
+ ```
783
+
784
+ Note that `branch` is typically one of:
785
+ - `prod`
786
+ - `user.bob`
787
+ - `test.my_experiment`
788
+ - `prod.staging`
789
+ """
790
+ ...
791
+
791
792
  pkg_name: str
792
793