ob-metaflow-stubs 6.0.3.181__py2.py3-none-any.whl → 6.0.3.182rc0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. metaflow-stubs/__init__.pyi +562 -561
  2. metaflow-stubs/cards.pyi +1 -1
  3. metaflow-stubs/cli.pyi +1 -1
  4. metaflow-stubs/cli_components/__init__.pyi +1 -1
  5. metaflow-stubs/cli_components/utils.pyi +1 -1
  6. metaflow-stubs/client/__init__.pyi +1 -1
  7. metaflow-stubs/client/core.pyi +6 -6
  8. metaflow-stubs/client/filecache.pyi +2 -2
  9. metaflow-stubs/events.pyi +1 -1
  10. metaflow-stubs/exception.pyi +1 -1
  11. metaflow-stubs/flowspec.pyi +5 -5
  12. metaflow-stubs/generated_for.txt +1 -1
  13. metaflow-stubs/includefile.pyi +3 -3
  14. metaflow-stubs/info_file.pyi +1 -1
  15. metaflow-stubs/metadata_provider/__init__.pyi +1 -1
  16. metaflow-stubs/metadata_provider/heartbeat.pyi +1 -1
  17. metaflow-stubs/metadata_provider/metadata.pyi +2 -2
  18. metaflow-stubs/metadata_provider/util.pyi +1 -1
  19. metaflow-stubs/metaflow_config.pyi +1 -1
  20. metaflow-stubs/metaflow_current.pyi +117 -117
  21. metaflow-stubs/metaflow_git.pyi +1 -1
  22. metaflow-stubs/mf_extensions/__init__.pyi +1 -1
  23. metaflow-stubs/mf_extensions/obcheckpoint/__init__.pyi +1 -1
  24. metaflow-stubs/mf_extensions/obcheckpoint/plugins/__init__.pyi +1 -1
  25. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/__init__.pyi +1 -1
  26. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/__init__.pyi +1 -1
  27. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/async_cards.pyi +2 -2
  28. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/deco_injection_mixin.pyi +1 -1
  29. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/extra_components.pyi +2 -2
  30. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/__init__.pyi +1 -1
  31. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/__init__.pyi +1 -1
  32. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/checkpoint_lister.pyi +4 -4
  33. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/lineage_card.pyi +1 -1
  34. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +3 -3
  35. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +1 -1
  36. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi +2 -2
  37. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/decorator.pyi +3 -3
  38. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/exceptions.pyi +1 -1
  39. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +1 -1
  40. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/lineage.pyi +1 -1
  41. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +1 -1
  42. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/context.pyi +2 -2
  43. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +2 -2
  44. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/decorator.pyi +1 -1
  45. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +1 -1
  46. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/task_utils.pyi +3 -3
  47. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi +1 -1
  48. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi +2 -2
  49. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/exceptions.pyi +1 -1
  50. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/hf_hub/__init__.pyi +1 -1
  51. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/hf_hub/decorator.pyi +2 -2
  52. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/__init__.pyi +1 -1
  53. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/core.pyi +2 -2
  54. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/exceptions.pyi +1 -1
  55. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/model_storage.pyi +2 -2
  56. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +1 -1
  57. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +1 -1
  58. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +1 -1
  59. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +2 -2
  60. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/__init__.pyi +1 -1
  61. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/base.pyi +1 -1
  62. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/tar.pyi +2 -2
  63. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +2 -2
  64. metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +1 -1
  65. metaflow-stubs/mf_extensions/outerbounds/plugins/__init__.pyi +1 -1
  66. metaflow-stubs/mf_extensions/outerbounds/plugins/aws/__init__.pyi +1 -1
  67. metaflow-stubs/mf_extensions/outerbounds/plugins/aws/assume_role_decorator.pyi +1 -1
  68. metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/__init__.pyi +1 -1
  69. metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/async_cards.pyi +2 -2
  70. metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/injector.pyi +1 -1
  71. metaflow-stubs/mf_extensions/outerbounds/plugins/checkpoint_datastores/__init__.pyi +1 -1
  72. metaflow-stubs/mf_extensions/outerbounds/plugins/checkpoint_datastores/coreweave.pyi +1 -1
  73. metaflow-stubs/mf_extensions/outerbounds/plugins/checkpoint_datastores/nebius.pyi +1 -1
  74. metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/__init__.pyi +6 -0
  75. metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/baker.pyi +51 -0
  76. metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/docker_environment.pyi +65 -0
  77. metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/fast_bakery.pyi +74 -0
  78. metaflow-stubs/mf_extensions/outerbounds/plugins/kubernetes/__init__.pyi +1 -1
  79. metaflow-stubs/mf_extensions/outerbounds/plugins/kubernetes/pod_killer.pyi +1 -1
  80. metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/__init__.pyi +1 -1
  81. metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/constants.pyi +1 -1
  82. metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/exceptions.pyi +1 -1
  83. metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/ollama.pyi +1 -1
  84. metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/status_card.pyi +1 -1
  85. metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/__init__.pyi +1 -1
  86. metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/snowflake.pyi +1 -1
  87. metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +1 -1
  88. metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +1 -1
  89. metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +1 -1
  90. metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +1 -1
  91. metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +2 -1
  92. metaflow-stubs/multicore_utils.pyi +1 -1
  93. metaflow-stubs/ob_internal.pyi +12 -0
  94. metaflow-stubs/parameters.pyi +3 -3
  95. metaflow-stubs/plugins/__init__.pyi +11 -11
  96. metaflow-stubs/plugins/airflow/__init__.pyi +1 -1
  97. metaflow-stubs/plugins/airflow/airflow_utils.pyi +1 -1
  98. metaflow-stubs/plugins/airflow/exception.pyi +1 -1
  99. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +1 -1
  100. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +1 -1
  101. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +1 -1
  102. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +1 -1
  103. metaflow-stubs/plugins/argo/__init__.pyi +1 -1
  104. metaflow-stubs/plugins/argo/argo_client.pyi +1 -1
  105. metaflow-stubs/plugins/argo/argo_events.pyi +1 -1
  106. metaflow-stubs/plugins/argo/argo_workflows.pyi +2 -2
  107. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +3 -3
  108. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +4 -4
  109. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +2 -2
  110. metaflow-stubs/plugins/aws/__init__.pyi +1 -1
  111. metaflow-stubs/plugins/aws/aws_client.pyi +1 -1
  112. metaflow-stubs/plugins/aws/aws_utils.pyi +1 -1
  113. metaflow-stubs/plugins/aws/batch/__init__.pyi +1 -1
  114. metaflow-stubs/plugins/aws/batch/batch.pyi +1 -1
  115. metaflow-stubs/plugins/aws/batch/batch_client.pyi +1 -1
  116. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +1 -1
  117. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +1 -1
  118. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +4 -4
  119. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +1 -1
  120. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +1 -1
  121. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +1 -1
  122. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +1 -1
  123. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +1 -1
  124. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +3 -3
  125. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +2 -2
  126. metaflow-stubs/plugins/azure/__init__.pyi +1 -1
  127. metaflow-stubs/plugins/azure/azure_credential.pyi +1 -1
  128. metaflow-stubs/plugins/azure/azure_exceptions.pyi +1 -1
  129. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +4 -4
  130. metaflow-stubs/plugins/azure/azure_utils.pyi +1 -1
  131. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +1 -1
  132. metaflow-stubs/plugins/azure/includefile_support.pyi +1 -1
  133. metaflow-stubs/plugins/cards/__init__.pyi +1 -1
  134. metaflow-stubs/plugins/cards/card_client.pyi +1 -1
  135. metaflow-stubs/plugins/cards/card_creator.pyi +1 -1
  136. metaflow-stubs/plugins/cards/card_datastore.pyi +1 -1
  137. metaflow-stubs/plugins/cards/card_decorator.pyi +1 -1
  138. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +1 -1
  139. metaflow-stubs/plugins/cards/card_modules/basic.pyi +1 -1
  140. metaflow-stubs/plugins/cards/card_modules/card.pyi +1 -1
  141. metaflow-stubs/plugins/cards/card_modules/components.pyi +3 -3
  142. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +1 -1
  143. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +1 -1
  144. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +1 -1
  145. metaflow-stubs/plugins/cards/card_resolver.pyi +1 -1
  146. metaflow-stubs/plugins/cards/component_serializer.pyi +1 -1
  147. metaflow-stubs/plugins/cards/exception.pyi +1 -1
  148. metaflow-stubs/plugins/catch_decorator.pyi +2 -2
  149. metaflow-stubs/plugins/datatools/__init__.pyi +1 -1
  150. metaflow-stubs/plugins/datatools/local.pyi +1 -1
  151. metaflow-stubs/plugins/datatools/s3/__init__.pyi +1 -1
  152. metaflow-stubs/plugins/datatools/s3/s3.pyi +3 -3
  153. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +1 -1
  154. metaflow-stubs/plugins/datatools/s3/s3util.pyi +1 -1
  155. metaflow-stubs/plugins/debug_logger.pyi +1 -1
  156. metaflow-stubs/plugins/debug_monitor.pyi +1 -1
  157. metaflow-stubs/plugins/environment_decorator.pyi +1 -1
  158. metaflow-stubs/plugins/events_decorator.pyi +1 -1
  159. metaflow-stubs/plugins/frameworks/__init__.pyi +1 -1
  160. metaflow-stubs/plugins/frameworks/pytorch.pyi +1 -1
  161. metaflow-stubs/plugins/gcp/__init__.pyi +1 -1
  162. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +4 -4
  163. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +1 -1
  164. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +1 -1
  165. metaflow-stubs/plugins/gcp/gs_utils.pyi +1 -1
  166. metaflow-stubs/plugins/gcp/includefile_support.pyi +1 -1
  167. metaflow-stubs/plugins/kubernetes/__init__.pyi +1 -1
  168. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
  169. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +1 -1
  170. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +1 -1
  171. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +1 -1
  172. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +1 -1
  173. metaflow-stubs/plugins/kubernetes/spot_monitor_sidecar.pyi +1 -1
  174. metaflow-stubs/plugins/ollama/__init__.pyi +2 -2
  175. metaflow-stubs/plugins/parallel_decorator.pyi +1 -1
  176. metaflow-stubs/plugins/perimeters.pyi +1 -1
  177. metaflow-stubs/plugins/project_decorator.pyi +1 -1
  178. metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
  179. metaflow-stubs/plugins/pypi/conda_decorator.pyi +1 -1
  180. metaflow-stubs/plugins/pypi/conda_environment.pyi +4 -4
  181. metaflow-stubs/plugins/pypi/parsers.pyi +1 -1
  182. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +1 -1
  183. metaflow-stubs/plugins/pypi/pypi_environment.pyi +1 -1
  184. metaflow-stubs/plugins/pypi/utils.pyi +1 -1
  185. metaflow-stubs/plugins/resources_decorator.pyi +1 -1
  186. metaflow-stubs/plugins/retry_decorator.pyi +1 -1
  187. metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
  188. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +3 -3
  189. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +1 -1
  190. metaflow-stubs/plugins/snowflake/__init__.pyi +1 -1
  191. metaflow-stubs/plugins/storage_executor.pyi +1 -1
  192. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +1 -1
  193. metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
  194. metaflow-stubs/plugins/torchtune/__init__.pyi +1 -1
  195. metaflow-stubs/plugins/uv/__init__.pyi +1 -1
  196. metaflow-stubs/plugins/uv/uv_environment.pyi +2 -2
  197. metaflow-stubs/profilers/__init__.pyi +1 -1
  198. metaflow-stubs/pylint_wrapper.pyi +1 -1
  199. metaflow-stubs/runner/__init__.pyi +1 -1
  200. metaflow-stubs/runner/deployer.pyi +5 -5
  201. metaflow-stubs/runner/deployer_impl.pyi +2 -2
  202. metaflow-stubs/runner/metaflow_runner.pyi +3 -3
  203. metaflow-stubs/runner/nbdeploy.pyi +1 -1
  204. metaflow-stubs/runner/nbrun.pyi +1 -1
  205. metaflow-stubs/runner/subprocess_manager.pyi +1 -1
  206. metaflow-stubs/runner/utils.pyi +2 -2
  207. metaflow-stubs/system/__init__.pyi +1 -1
  208. metaflow-stubs/system/system_logger.pyi +2 -2
  209. metaflow-stubs/system/system_monitor.pyi +1 -1
  210. metaflow-stubs/tagging_util.pyi +1 -1
  211. metaflow-stubs/tuple_util.pyi +1 -1
  212. metaflow-stubs/user_configs/__init__.pyi +1 -1
  213. metaflow-stubs/user_configs/config_decorators.pyi +4 -4
  214. metaflow-stubs/user_configs/config_options.pyi +3 -3
  215. metaflow-stubs/user_configs/config_parameters.pyi +5 -5
  216. {ob_metaflow_stubs-6.0.3.181.dist-info → ob_metaflow_stubs-6.0.3.182rc0.dist-info}/METADATA +1 -1
  217. ob_metaflow_stubs-6.0.3.182rc0.dist-info/RECORD +220 -0
  218. ob_metaflow_stubs-6.0.3.181.dist-info/RECORD +0 -215
  219. {ob_metaflow_stubs-6.0.3.181.dist-info → ob_metaflow_stubs-6.0.3.182rc0.dist-info}/WHEEL +0 -0
  220. {ob_metaflow_stubs-6.0.3.181.dist-info → ob_metaflow_stubs-6.0.3.182rc0.dist-info}/top_level.txt +0 -0
@@ -1,15 +1,15 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
3
  # MF version: 2.15.17.1+obcheckpoint(0.2.1);ob(v1) #
4
- # Generated on 2025-06-18T08:04:08.962280 #
4
+ # Generated on 2025-06-18T09:39:16.439890 #
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
 
@@ -36,9 +36,9 @@ from .user_configs.config_parameters import config_expr as config_expr
36
36
  from .user_configs.config_decorators import CustomFlowDecorator as CustomFlowDecorator
37
37
  from .user_configs.config_decorators import CustomStepDecorator as CustomStepDecorator
38
38
  from . import cards as cards
39
- from . import events as events
40
39
  from . import tuple_util as tuple_util
41
40
  from . import metaflow_git as metaflow_git
41
+ from . import events as events
42
42
  from . import runner as runner
43
43
  from . import plugins as plugins
44
44
  from .mf_extensions.outerbounds.toplevel.global_aliases_for_metaflow_package import S3 as S3
@@ -78,6 +78,7 @@ from . import system as system
78
78
  from . import pylint_wrapper as pylint_wrapper
79
79
  from . import cli as cli
80
80
  from . import profilers as profilers
81
+ from . import ob_internal as ob_internal
81
82
 
82
83
  EXT_PKG: str
83
84
 
@@ -154,54 +155,120 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
154
155
  """
155
156
  ...
156
157
 
158
+ def ollama(*, models: list, backend: str, force_pull: bool, cache_update_policy: str, force_cache_update: bool, debug: bool, circuit_breaker_config: dict, timeout_config: dict) -> 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]]]:
159
+ """
160
+ This decorator is used to run Ollama APIs as Metaflow task sidecars.
161
+
162
+ User code call
163
+ --------------
164
+ @ollama(
165
+ models=[...],
166
+ ...
167
+ )
168
+
169
+ Valid backend options
170
+ ---------------------
171
+ - 'local': Run as a separate process on the local task machine.
172
+ - (TODO) 'managed': Outerbounds hosts and selects compute provider.
173
+ - (TODO) 'remote': Spin up separate instance to serve Ollama models.
174
+
175
+ Valid model options
176
+ -------------------
177
+ Any model here https://ollama.com/search, e.g. 'llama3.2', 'llama3.3'
178
+
179
+
180
+ Parameters
181
+ ----------
182
+ models: list[str]
183
+ List of Ollama containers running models in sidecars.
184
+ backend: str
185
+ Determines where and how to run the Ollama process.
186
+ force_pull: bool
187
+ Whether to run `ollama pull` no matter what, or first check the remote cache in Metaflow datastore for this model key.
188
+ cache_update_policy: str
189
+ Cache update policy: "auto", "force", or "never".
190
+ force_cache_update: bool
191
+ Simple override for "force" cache update policy.
192
+ debug: bool
193
+ Whether to turn on verbose debugging logs.
194
+ circuit_breaker_config: dict
195
+ Configuration for circuit breaker protection. Keys: failure_threshold, recovery_timeout, reset_timeout.
196
+ timeout_config: dict
197
+ Configuration for various operation timeouts. Keys: pull, stop, health_check, install, server_startup.
198
+ """
199
+ ...
200
+
157
201
  @typing.overload
158
- 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]]]:
202
+ def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
159
203
  """
160
- Specifies that the step will success under all circumstances.
204
+ Internal decorator to support Fast bakery
205
+ """
206
+ ...
207
+
208
+ @typing.overload
209
+ def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
210
+ ...
211
+
212
+ def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
213
+ """
214
+ Internal decorator to support Fast bakery
215
+ """
216
+ ...
217
+
218
+ @typing.overload
219
+ 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]]]:
220
+ """
221
+ Enables checkpointing for a step.
161
222
 
162
- The decorator will create an optional artifact, specified by `var`, which
163
- contains the exception raised. You can use it to detect the presence
164
- of errors, indicating that all happy-path artifacts produced by the step
165
- are missing.
166
223
 
167
224
 
168
225
  Parameters
169
226
  ----------
170
- var : str, optional, default None
171
- Name of the artifact in which to store the caught exception.
172
- If not specified, the exception is not stored.
173
- print_exception : bool, default True
174
- Determines whether or not the exception is printed to
175
- stdout when caught.
227
+ load_policy : str, default: "fresh"
228
+ The policy for loading the checkpoint. The following policies are supported:
229
+ - "eager": Loads the the latest available checkpoint within the namespace.
230
+ With this mode, the latest checkpoint written by any previous task (can be even a different run) of the step
231
+ will be loaded at the start of the task.
232
+ - "none": Do not load any checkpoint
233
+ - "fresh": Loads the lastest checkpoint created within the running Task.
234
+ This mode helps loading checkpoints across various retry attempts of the same task.
235
+ With this mode, no checkpoint will be loaded at the start of a task but any checkpoints
236
+ created within the task will be loaded when the task is retries execution on failure.
237
+
238
+ temp_dir_root : str, default: None
239
+ The root directory under which `current.checkpoint.directory` will be created.
176
240
  """
177
241
  ...
178
242
 
179
243
  @typing.overload
180
- def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
244
+ def checkpoint(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
181
245
  ...
182
246
 
183
247
  @typing.overload
184
- def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
248
+ def checkpoint(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
185
249
  ...
186
250
 
187
- def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, var: typing.Optional[str] = None, print_exception: bool = True):
251
+ 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):
188
252
  """
189
- Specifies that the step will success under all circumstances.
253
+ Enables checkpointing for a step.
190
254
 
191
- The decorator will create an optional artifact, specified by `var`, which
192
- contains the exception raised. You can use it to detect the presence
193
- of errors, indicating that all happy-path artifacts produced by the step
194
- are missing.
195
255
 
196
256
 
197
257
  Parameters
198
258
  ----------
199
- var : str, optional, default None
200
- Name of the artifact in which to store the caught exception.
201
- If not specified, the exception is not stored.
202
- print_exception : bool, default True
203
- Determines whether or not the exception is printed to
204
- stdout when caught.
259
+ load_policy : str, default: "fresh"
260
+ The policy for loading the checkpoint. The following policies are supported:
261
+ - "eager": Loads the the latest available checkpoint within the namespace.
262
+ With this mode, the latest checkpoint written by any previous task (can be even a different run) of the step
263
+ will be loaded at the start of the task.
264
+ - "none": Do not load any checkpoint
265
+ - "fresh": Loads the lastest checkpoint created within the running Task.
266
+ This mode helps loading checkpoints across various retry attempts of the same task.
267
+ With this mode, no checkpoint will be loaded at the start of a task but any checkpoints
268
+ created within the task will be loaded when the task is retries execution on failure.
269
+
270
+ temp_dir_root : str, default: None
271
+ The root directory under which `current.checkpoint.directory` will be created.
205
272
  """
206
273
  ...
207
274
 
@@ -261,35 +328,102 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
261
328
  ...
262
329
 
263
330
  @typing.overload
264
- 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]]]:
331
+ 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]]]:
265
332
  """
266
- Specifies environment variables to be set prior to the execution of a step.
333
+ Specifies secrets to be retrieved and injected as environment variables prior to
334
+ the execution of a step.
267
335
 
268
336
 
269
337
  Parameters
270
338
  ----------
271
- vars : Dict[str, str], default {}
272
- Dictionary of environment variables to set.
339
+ sources : List[Union[str, Dict[str, Any]]], default: []
340
+ List of secret specs, defining how the secrets are to be retrieved
273
341
  """
274
342
  ...
275
343
 
276
344
  @typing.overload
277
- def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
345
+ def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
278
346
  ...
279
347
 
280
348
  @typing.overload
281
- def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
349
+ def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
282
350
  ...
283
351
 
284
- def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
352
+ 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]]] = []):
285
353
  """
286
- Specifies environment variables to be set prior to the execution of a step.
354
+ Specifies secrets to be retrieved and injected as environment variables prior to
355
+ the execution of a step.
287
356
 
288
357
 
289
358
  Parameters
290
359
  ----------
291
- vars : Dict[str, str], default {}
292
- Dictionary of environment variables to set.
360
+ sources : List[Union[str, Dict[str, Any]]], default: []
361
+ List of secret specs, defining how the secrets are to be retrieved
362
+ """
363
+ ...
364
+
365
+ def nvct(*, gpu: int, gpu_type: 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]]]:
366
+ """
367
+ Specifies that this step should execute on DGX cloud.
368
+
369
+
370
+ Parameters
371
+ ----------
372
+ gpu : int
373
+ Number of GPUs to use.
374
+ gpu_type : str
375
+ Type of Nvidia GPU to use.
376
+ """
377
+ ...
378
+
379
+ @typing.overload
380
+ 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]]]:
381
+ """
382
+ Specifies that the step will success under all circumstances.
383
+
384
+ The decorator will create an optional artifact, specified by `var`, which
385
+ contains the exception raised. You can use it to detect the presence
386
+ of errors, indicating that all happy-path artifacts produced by the step
387
+ are missing.
388
+
389
+
390
+ Parameters
391
+ ----------
392
+ var : str, optional, default None
393
+ Name of the artifact in which to store the caught exception.
394
+ If not specified, the exception is not stored.
395
+ print_exception : bool, default True
396
+ Determines whether or not the exception is printed to
397
+ stdout when caught.
398
+ """
399
+ ...
400
+
401
+ @typing.overload
402
+ def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
403
+ ...
404
+
405
+ @typing.overload
406
+ def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
407
+ ...
408
+
409
+ def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, var: typing.Optional[str] = None, print_exception: bool = True):
410
+ """
411
+ Specifies that the step will success under all circumstances.
412
+
413
+ The decorator will create an optional artifact, specified by `var`, which
414
+ contains the exception raised. You can use it to detect the presence
415
+ of errors, indicating that all happy-path artifacts produced by the step
416
+ are missing.
417
+
418
+
419
+ Parameters
420
+ ----------
421
+ var : str, optional, default None
422
+ Name of the artifact in which to store the caught exception.
423
+ If not specified, the exception is not stored.
424
+ print_exception : bool, default True
425
+ Determines whether or not the exception is printed to
426
+ stdout when caught.
293
427
  """
294
428
  ...
295
429
 
@@ -331,180 +465,36 @@ def vllm(*, model: str, backend: str, debug: bool, kwargs: typing.Any) -> typing
331
465
  """
332
466
  ...
333
467
 
334
- 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]]]:
468
+ def app_deploy(*, app_port: int, app_name: 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]]]:
335
469
  """
336
- Decorator that helps cache, version and store models/datasets from huggingface hub.
470
+ Specifies that this step is used to deploy an instance of the app.
471
+ Requires that self.app_name, self.app_port, self.entrypoint and self.deployDir is set.
337
472
 
338
473
 
339
474
  Parameters
340
475
  ----------
341
- temp_dir_root : str, optional
342
- The root directory that will hold the temporary directory where objects will be downloaded.
343
-
344
- load: Union[List[str], List[Tuple[Dict, str]], List[Tuple[str, str]], List[Dict], None]
345
- The list of repos (models/datasets) to load.
346
-
347
- Loaded repos can be accessed via `current.huggingface_hub.loaded`. If load is set, then the following happens:
348
-
349
- - If repo (model/dataset) is not found in the datastore:
350
- - Downloads the repo from Hugging Face Hub to a temporary directory (or uses specified path) for local access
351
- - Stores it in Metaflow's datastore (s3/gcs/azure etc.) with a unique name based on repo_type/repo_id
352
- - All HF models loaded for a `@step` will be cached separately under flow/step/namespace.
353
-
354
- - If repo is found in the datastore:
355
- - Loads it directly from datastore to local path (can be temporary directory or specified path)
476
+ app_port : int
477
+ Number of GPUs to use.
478
+ app_name : str
479
+ Name of the app to deploy.
356
480
  """
357
481
  ...
358
482
 
359
483
  @typing.overload
360
- 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]]]:
484
+ 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]]]:
361
485
  """
362
- Enables checkpointing for a step.
486
+ Enables loading / saving of models within a step.
363
487
 
364
488
 
365
489
 
366
490
  Parameters
367
491
  ----------
368
- load_policy : str, default: "fresh"
369
- The policy for loading the checkpoint. The following policies are supported:
370
- - "eager": Loads the the latest available checkpoint within the namespace.
371
- With this mode, the latest checkpoint written by any previous task (can be even a different run) of the step
372
- will be loaded at the start of the task.
373
- - "none": Do not load any checkpoint
374
- - "fresh": Loads the lastest checkpoint created within the running Task.
375
- This mode helps loading checkpoints across various retry attempts of the same task.
376
- With this mode, no checkpoint will be loaded at the start of a task but any checkpoints
377
- created within the task will be loaded when the task is retries execution on failure.
378
-
379
- temp_dir_root : str, default: None
380
- The root directory under which `current.checkpoint.directory` will be created.
381
- """
382
- ...
383
-
384
- @typing.overload
385
- def checkpoint(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
386
- ...
387
-
388
- @typing.overload
389
- def checkpoint(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
390
- ...
391
-
392
- 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):
393
- """
394
- Enables checkpointing for a step.
395
-
396
-
397
-
398
- Parameters
399
- ----------
400
- load_policy : str, default: "fresh"
401
- The policy for loading the checkpoint. The following policies are supported:
402
- - "eager": Loads the the latest available checkpoint within the namespace.
403
- With this mode, the latest checkpoint written by any previous task (can be even a different run) of the step
404
- will be loaded at the start of the task.
405
- - "none": Do not load any checkpoint
406
- - "fresh": Loads the lastest checkpoint created within the running Task.
407
- This mode helps loading checkpoints across various retry attempts of the same task.
408
- With this mode, no checkpoint will be loaded at the start of a task but any checkpoints
409
- created within the task will be loaded when the task is retries execution on failure.
410
-
411
- temp_dir_root : str, default: None
412
- The root directory under which `current.checkpoint.directory` will be created.
413
- """
414
- ...
415
-
416
- def ollama(*, models: list, backend: str, force_pull: bool, cache_update_policy: str, force_cache_update: bool, debug: bool, circuit_breaker_config: dict, timeout_config: dict) -> 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]]]:
417
- """
418
- This decorator is used to run Ollama APIs as Metaflow task sidecars.
419
-
420
- User code call
421
- --------------
422
- @ollama(
423
- models=[...],
424
- ...
425
- )
426
-
427
- Valid backend options
428
- ---------------------
429
- - 'local': Run as a separate process on the local task machine.
430
- - (TODO) 'managed': Outerbounds hosts and selects compute provider.
431
- - (TODO) 'remote': Spin up separate instance to serve Ollama models.
432
-
433
- Valid model options
434
- -------------------
435
- Any model here https://ollama.com/search, e.g. 'llama3.2', 'llama3.3'
436
-
437
-
438
- Parameters
439
- ----------
440
- models: list[str]
441
- List of Ollama containers running models in sidecars.
442
- backend: str
443
- Determines where and how to run the Ollama process.
444
- force_pull: bool
445
- Whether to run `ollama pull` no matter what, or first check the remote cache in Metaflow datastore for this model key.
446
- cache_update_policy: str
447
- Cache update policy: "auto", "force", or "never".
448
- force_cache_update: bool
449
- Simple override for "force" cache update policy.
450
- debug: bool
451
- Whether to turn on verbose debugging logs.
452
- circuit_breaker_config: dict
453
- Configuration for circuit breaker protection. Keys: failure_threshold, recovery_timeout, reset_timeout.
454
- timeout_config: dict
455
- Configuration for various operation timeouts. Keys: pull, stop, health_check, install, server_startup.
456
- """
457
- ...
458
-
459
- def app_deploy(*, app_port: int, app_name: 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]]]:
460
- """
461
- Specifies that this step is used to deploy an instance of the app.
462
- Requires that self.app_name, self.app_port, self.entrypoint and self.deployDir is set.
463
-
464
-
465
- Parameters
466
- ----------
467
- app_port : int
468
- Number of GPUs to use.
469
- app_name : str
470
- Name of the app to deploy.
471
- """
472
- ...
473
-
474
- @typing.overload
475
- def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
476
- """
477
- Decorator prototype for all step decorators. This function gets specialized
478
- and imported for all decorators types by _import_plugin_decorators().
479
- """
480
- ...
481
-
482
- @typing.overload
483
- def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
484
- ...
485
-
486
- def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
487
- """
488
- Decorator prototype for all step decorators. This function gets specialized
489
- and imported for all decorators types by _import_plugin_decorators().
490
- """
491
- ...
492
-
493
- @typing.overload
494
- 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]]]:
495
- """
496
- Enables loading / saving of models within a step.
497
-
498
-
499
-
500
- Parameters
501
- ----------
502
- load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
503
- Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
504
- These artifact names give to `load` be reference objects or reference `key` string's from objects created by:
505
- - `current.checkpoint`
506
- - `current.model`
507
- - `current.huggingface_hub`
492
+ load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
493
+ Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
494
+ These artifact names give to `load` be reference objects or reference `key` string's from objects created by:
495
+ - `current.checkpoint`
496
+ - `current.model`
497
+ - `current.huggingface_hub`
508
498
 
509
499
  If a list of tuples is provided, the first element is the artifact name and the second element is the path the artifact needs be unpacked on
510
500
  the local filesystem. If the second element is None, the artifact will be unpacked in the current working directory.
@@ -547,92 +537,6 @@ def model(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
547
537
  """
548
538
  ...
549
539
 
550
- @typing.overload
551
- 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]]]:
552
- """
553
- Specifies secrets to be retrieved and injected as environment variables prior to
554
- the execution of a step.
555
-
556
-
557
- Parameters
558
- ----------
559
- sources : List[Union[str, Dict[str, Any]]], default: []
560
- List of secret specs, defining how the secrets are to be retrieved
561
- """
562
- ...
563
-
564
- @typing.overload
565
- def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
566
- ...
567
-
568
- @typing.overload
569
- def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
570
- ...
571
-
572
- 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]]] = []):
573
- """
574
- Specifies secrets to be retrieved and injected as environment variables prior to
575
- the execution of a step.
576
-
577
-
578
- Parameters
579
- ----------
580
- sources : List[Union[str, Dict[str, Any]]], default: []
581
- List of secret specs, defining how the secrets are to be retrieved
582
- """
583
- ...
584
-
585
- @typing.overload
586
- 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]]]:
587
- """
588
- Specifies the PyPI packages for the step.
589
-
590
- Information in this decorator will augment any
591
- attributes set in the `@pyi_base` flow-level decorator. Hence,
592
- you can use `@pypi_base` to set packages required by all
593
- steps and use `@pypi` to specify step-specific overrides.
594
-
595
-
596
- Parameters
597
- ----------
598
- packages : Dict[str, str], default: {}
599
- Packages to use for this step. The key is the name of the package
600
- and the value is the version to use.
601
- python : str, optional, default: None
602
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
603
- that the version used will correspond to the version of the Python interpreter used to start the run.
604
- """
605
- ...
606
-
607
- @typing.overload
608
- def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
609
- ...
610
-
611
- @typing.overload
612
- def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
613
- ...
614
-
615
- 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):
616
- """
617
- Specifies the PyPI packages for the step.
618
-
619
- Information in this decorator will augment any
620
- attributes set in the `@pyi_base` flow-level decorator. Hence,
621
- you can use `@pypi_base` to set packages required by all
622
- steps and use `@pypi` to specify step-specific overrides.
623
-
624
-
625
- Parameters
626
- ----------
627
- packages : Dict[str, str], default: {}
628
- Packages to use for this step. The key is the name of the package
629
- and the value is the version to use.
630
- python : str, optional, default: None
631
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
632
- that the version used will correspond to the version of the Python interpreter used to start the run.
633
- """
634
- ...
635
-
636
540
  def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: typing.Optional[str] = None, image_pull_policy: str = 'KUBERNETES_IMAGE_PULL_POLICY', image_pull_secrets: typing.List[str] = [], service_account: str = 'METAFLOW_KUBERNETES_SERVICE_ACCOUNT', secrets: typing.Optional[typing.List[str]] = None, node_selector: typing.Union[typing.Dict[str, str], str, None] = None, namespace: str = 'METAFLOW_KUBERNETES_NAMESPACE', gpu: typing.Optional[int] = None, gpu_vendor: str = 'KUBERNETES_GPU_VENDOR', tolerations: typing.List[str] = [], labels: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_LABELS', annotations: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_ANNOTATIONS', use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = '/metaflow_temp', persistent_volume_claims: typing.Optional[typing.Dict[str, str]] = None, shared_memory: typing.Optional[int] = None, port: typing.Optional[int] = None, compute_pool: typing.Optional[str] = None, hostname_resolution_timeout: int = 600, qos: str = 'Burstable', security_context: typing.Optional[typing.Dict[str, typing.Any]] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
637
541
  """
638
542
  Specifies that this step should execute on Kubernetes.
@@ -722,76 +626,206 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
722
626
  """
723
627
  ...
724
628
 
725
- def nvct(*, gpu: int, gpu_type: 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]]]:
629
+ @typing.overload
630
+ def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
631
+ """
632
+ Decorator prototype for all step decorators. This function gets specialized
633
+ and imported for all decorators types by _import_plugin_decorators().
634
+ """
635
+ ...
636
+
637
+ @typing.overload
638
+ def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
639
+ ...
640
+
641
+ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
642
+ """
643
+ Decorator prototype for all step decorators. This function gets specialized
644
+ and imported for all decorators types by _import_plugin_decorators().
645
+ """
646
+ ...
647
+
648
+ @typing.overload
649
+ 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]]]:
650
+ """
651
+ Specifies the Conda environment for the step.
652
+
653
+ Information in this decorator will augment any
654
+ attributes set in the `@conda_base` flow-level decorator. Hence,
655
+ you can use `@conda_base` to set packages required by all
656
+ steps and use `@conda` to specify step-specific overrides.
657
+
658
+
659
+ Parameters
660
+ ----------
661
+ packages : Dict[str, str], default {}
662
+ Packages to use for this step. The key is the name of the package
663
+ and the value is the version to use.
664
+ libraries : Dict[str, str], default {}
665
+ Supported for backward compatibility. When used with packages, packages will take precedence.
666
+ python : str, optional, default None
667
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
668
+ that the version used will correspond to the version of the Python interpreter used to start the run.
669
+ disabled : bool, default False
670
+ If set to True, disables @conda.
671
+ """
672
+ ...
673
+
674
+ @typing.overload
675
+ def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
676
+ ...
677
+
678
+ @typing.overload
679
+ def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
680
+ ...
681
+
682
+ 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):
683
+ """
684
+ Specifies the Conda environment for the step.
685
+
686
+ Information in this decorator will augment any
687
+ attributes set in the `@conda_base` flow-level decorator. Hence,
688
+ you can use `@conda_base` to set packages required by all
689
+ steps and use `@conda` to specify step-specific overrides.
690
+
691
+
692
+ Parameters
693
+ ----------
694
+ packages : Dict[str, str], default {}
695
+ Packages to use for this step. The key is the name of the package
696
+ and the value is the version to use.
697
+ libraries : Dict[str, str], default {}
698
+ Supported for backward compatibility. When used with packages, packages will take precedence.
699
+ python : str, optional, default None
700
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
701
+ that the version used will correspond to the version of the Python interpreter used to start the run.
702
+ disabled : bool, default False
703
+ If set to True, disables @conda.
704
+ """
705
+ ...
706
+
707
+ 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]]]:
708
+ """
709
+ Decorator that helps cache, version and store models/datasets from huggingface hub.
710
+
711
+
712
+ Parameters
713
+ ----------
714
+ temp_dir_root : str, optional
715
+ The root directory that will hold the temporary directory where objects will be downloaded.
716
+
717
+ load: Union[List[str], List[Tuple[Dict, str]], List[Tuple[str, str]], List[Dict], None]
718
+ The list of repos (models/datasets) to load.
719
+
720
+ Loaded repos can be accessed via `current.huggingface_hub.loaded`. If load is set, then the following happens:
721
+
722
+ - If repo (model/dataset) is not found in the datastore:
723
+ - Downloads the repo from Hugging Face Hub to a temporary directory (or uses specified path) for local access
724
+ - Stores it in Metaflow's datastore (s3/gcs/azure etc.) with a unique name based on repo_type/repo_id
725
+ - All HF models loaded for a `@step` will be cached separately under flow/step/namespace.
726
+
727
+ - If repo is found in the datastore:
728
+ - Loads it directly from datastore to local path (can be temporary directory or specified path)
729
+ """
730
+ ...
731
+
732
+ def nvidia(*, gpu: int, gpu_type: str, queue_timeout: int) -> 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]]]:
733
+ """
734
+ Specifies that this step should execute on DGX cloud.
735
+
736
+
737
+ Parameters
738
+ ----------
739
+ gpu : int
740
+ Number of GPUs to use.
741
+ gpu_type : str
742
+ Type of Nvidia GPU to use.
743
+ queue_timeout : int
744
+ Time to keep the job in NVCF's queue.
745
+ """
746
+ ...
747
+
748
+ @typing.overload
749
+ 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]]]:
750
+ """
751
+ Specifies environment variables to be set prior to the execution of a step.
752
+
753
+
754
+ Parameters
755
+ ----------
756
+ vars : Dict[str, str], default {}
757
+ Dictionary of environment variables to set.
758
+ """
759
+ ...
760
+
761
+ @typing.overload
762
+ def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
763
+ ...
764
+
765
+ @typing.overload
766
+ def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
767
+ ...
768
+
769
+ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
726
770
  """
727
- Specifies that this step should execute on DGX cloud.
771
+ Specifies environment variables to be set prior to the execution of a step.
728
772
 
729
773
 
730
774
  Parameters
731
775
  ----------
732
- gpu : int
733
- Number of GPUs to use.
734
- gpu_type : str
735
- Type of Nvidia GPU to use.
776
+ vars : Dict[str, str], default {}
777
+ Dictionary of environment variables to set.
736
778
  """
737
779
  ...
738
780
 
739
781
  @typing.overload
740
- 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]]]:
782
+ 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]]]:
741
783
  """
742
- Specifies the Conda environment for the step.
784
+ Specifies the PyPI packages for the step.
743
785
 
744
786
  Information in this decorator will augment any
745
- attributes set in the `@conda_base` flow-level decorator. Hence,
746
- you can use `@conda_base` to set packages required by all
747
- steps and use `@conda` to specify step-specific overrides.
787
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
788
+ you can use `@pypi_base` to set packages required by all
789
+ steps and use `@pypi` to specify step-specific overrides.
748
790
 
749
791
 
750
792
  Parameters
751
793
  ----------
752
- packages : Dict[str, str], default {}
794
+ packages : Dict[str, str], default: {}
753
795
  Packages to use for this step. The key is the name of the package
754
796
  and the value is the version to use.
755
- libraries : Dict[str, str], default {}
756
- Supported for backward compatibility. When used with packages, packages will take precedence.
757
- python : str, optional, default None
797
+ python : str, optional, default: None
758
798
  Version of Python to use, e.g. '3.7.4'. A default value of None implies
759
799
  that the version used will correspond to the version of the Python interpreter used to start the run.
760
- disabled : bool, default False
761
- If set to True, disables @conda.
762
800
  """
763
801
  ...
764
802
 
765
803
  @typing.overload
766
- def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
804
+ def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
767
805
  ...
768
806
 
769
807
  @typing.overload
770
- def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
808
+ def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
771
809
  ...
772
810
 
773
- 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):
811
+ 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):
774
812
  """
775
- Specifies the Conda environment for the step.
813
+ Specifies the PyPI packages for the step.
776
814
 
777
815
  Information in this decorator will augment any
778
- attributes set in the `@conda_base` flow-level decorator. Hence,
779
- you can use `@conda_base` to set packages required by all
780
- steps and use `@conda` to specify step-specific overrides.
816
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
817
+ you can use `@pypi_base` to set packages required by all
818
+ steps and use `@pypi` to specify step-specific overrides.
781
819
 
782
820
 
783
821
  Parameters
784
822
  ----------
785
- packages : Dict[str, str], default {}
823
+ packages : Dict[str, str], default: {}
786
824
  Packages to use for this step. The key is the name of the package
787
825
  and the value is the version to use.
788
- libraries : Dict[str, str], default {}
789
- Supported for backward compatibility. When used with packages, packages will take precedence.
790
- python : str, optional, default None
826
+ python : str, optional, default: None
791
827
  Version of Python to use, e.g. '3.7.4'. A default value of None implies
792
828
  that the version used will correspond to the version of the Python interpreter used to start the run.
793
- disabled : bool, default False
794
- If set to True, disables @conda.
795
829
  """
796
830
  ...
797
831
 
@@ -874,6 +908,55 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
874
908
  """
875
909
  ...
876
910
 
911
+ @typing.overload
912
+ 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]]]:
913
+ """
914
+ Creates a human-readable report, a Metaflow Card, after this step completes.
915
+
916
+ Note that you may add multiple `@card` decorators in a step with different parameters.
917
+
918
+
919
+ Parameters
920
+ ----------
921
+ type : str, default 'default'
922
+ Card type.
923
+ id : str, optional, default None
924
+ If multiple cards are present, use this id to identify this card.
925
+ options : Dict[str, Any], default {}
926
+ Options passed to the card. The contents depend on the card type.
927
+ timeout : int, default 45
928
+ Interrupt reporting if it takes more than this many seconds.
929
+ """
930
+ ...
931
+
932
+ @typing.overload
933
+ def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
934
+ ...
935
+
936
+ @typing.overload
937
+ def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
938
+ ...
939
+
940
+ 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):
941
+ """
942
+ Creates a human-readable report, a Metaflow Card, after this step completes.
943
+
944
+ Note that you may add multiple `@card` decorators in a step with different parameters.
945
+
946
+
947
+ Parameters
948
+ ----------
949
+ type : str, default 'default'
950
+ Card type.
951
+ id : str, optional, default None
952
+ If multiple cards are present, use this id to identify this card.
953
+ options : Dict[str, Any], default {}
954
+ Options passed to the card. The contents depend on the card type.
955
+ timeout : int, default 45
956
+ Interrupt reporting if it takes more than this many seconds.
957
+ """
958
+ ...
959
+
877
960
  @typing.overload
878
961
  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]]]:
879
962
  """
@@ -934,162 +1017,43 @@ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
934
1017
  ...
935
1018
 
936
1019
  @typing.overload
937
- def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
938
- """
939
- Internal decorator to support Fast bakery
940
- """
941
- ...
942
-
943
- @typing.overload
944
- def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
945
- ...
946
-
947
- def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
948
- """
949
- Internal decorator to support Fast bakery
950
- """
951
- ...
952
-
953
- def nvidia(*, gpu: int, gpu_type: str, queue_timeout: int) -> 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]]]:
954
- """
955
- Specifies that this step should execute on DGX cloud.
956
-
957
-
958
- Parameters
959
- ----------
960
- gpu : int
961
- Number of GPUs to use.
962
- gpu_type : str
963
- Type of Nvidia GPU to use.
964
- queue_timeout : int
965
- Time to keep the job in NVCF's queue.
966
- """
967
- ...
968
-
969
- @typing.overload
970
- 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]]]:
1020
+ def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
971
1021
  """
972
- Creates a human-readable report, a Metaflow Card, after this step completes.
973
-
974
- Note that you may add multiple `@card` decorators in a step with different parameters.
1022
+ Specifies the PyPI packages for all steps of the flow.
975
1023
 
1024
+ Use `@pypi_base` to set common packages required by all
1025
+ steps and use `@pypi` to specify step-specific overrides.
976
1026
 
977
1027
  Parameters
978
1028
  ----------
979
- type : str, default 'default'
980
- Card type.
981
- id : str, optional, default None
982
- If multiple cards are present, use this id to identify this card.
983
- options : Dict[str, Any], default {}
984
- Options passed to the card. The contents depend on the card type.
985
- timeout : int, default 45
986
- Interrupt reporting if it takes more than this many seconds.
1029
+ packages : Dict[str, str], default: {}
1030
+ Packages to use for this flow. The key is the name of the package
1031
+ and the value is the version to use.
1032
+ python : str, optional, default: None
1033
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1034
+ that the version used will correspond to the version of the Python interpreter used to start the run.
987
1035
  """
988
1036
  ...
989
1037
 
990
1038
  @typing.overload
991
- def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
992
- ...
993
-
994
- @typing.overload
995
- def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
996
- ...
997
-
998
- 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):
999
- """
1000
- Creates a human-readable report, a Metaflow Card, after this step completes.
1001
-
1002
- Note that you may add multiple `@card` decorators in a step with different parameters.
1003
-
1004
-
1005
- Parameters
1006
- ----------
1007
- type : str, default 'default'
1008
- Card type.
1009
- id : str, optional, default None
1010
- If multiple cards are present, use this id to identify this card.
1011
- options : Dict[str, Any], default {}
1012
- Options passed to the card. The contents depend on the card type.
1013
- timeout : int, default 45
1014
- Interrupt reporting if it takes more than this many seconds.
1015
- """
1016
- ...
1017
-
1018
- def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1019
- """
1020
- Specifies what flows belong to the same project.
1021
-
1022
- A project-specific namespace is created for all flows that
1023
- use the same `@project(name)`.
1024
-
1025
-
1026
- Parameters
1027
- ----------
1028
- name : str
1029
- Project name. Make sure that the name is unique amongst all
1030
- projects that use the same production scheduler. The name may
1031
- contain only lowercase alphanumeric characters and underscores.
1032
-
1033
- branch : Optional[str], default None
1034
- The branch to use. If not specified, the branch is set to
1035
- `user.<username>` unless `production` is set to `True`. This can
1036
- also be set on the command line using `--branch` as a top-level option.
1037
- It is an error to specify `branch` in the decorator and on the command line.
1038
-
1039
- production : bool, default False
1040
- Whether or not the branch is the production branch. This can also be set on the
1041
- command line using `--production` as a top-level option. It is an error to specify
1042
- `production` in the decorator and on the command line.
1043
- The project branch name will be:
1044
- - if `branch` is specified:
1045
- - if `production` is True: `prod.<branch>`
1046
- - if `production` is False: `test.<branch>`
1047
- - if `branch` is not specified:
1048
- - if `production` is True: `prod`
1049
- - if `production` is False: `user.<username>`
1050
- """
1039
+ def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1051
1040
  ...
1052
1041
 
1053
- 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]]:
1042
+ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1054
1043
  """
1055
- 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.
1056
- 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.
1044
+ Specifies the PyPI packages for all steps of the flow.
1057
1045
 
1046
+ Use `@pypi_base` to set common packages required by all
1047
+ steps and use `@pypi` to specify step-specific overrides.
1058
1048
 
1059
1049
  Parameters
1060
- ----------
1061
- timeout : int
1062
- Time, in seconds before the task times out and fails. (Default: 3600)
1063
- poke_interval : int
1064
- Time in seconds that the job should wait in between each try. (Default: 60)
1065
- mode : str
1066
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1067
- exponential_backoff : bool
1068
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1069
- pool : str
1070
- the slot pool this task should run in,
1071
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1072
- soft_fail : bool
1073
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1074
- name : str
1075
- Name of the sensor on Airflow
1076
- description : str
1077
- Description of sensor in the Airflow UI
1078
- external_dag_id : str
1079
- The dag_id that contains the task you want to wait for.
1080
- external_task_ids : List[str]
1081
- The list of task_ids that you want to wait for.
1082
- If None (default value) the sensor waits for the DAG. (Default: None)
1083
- allowed_states : List[str]
1084
- Iterable of allowed states, (Default: ['success'])
1085
- failed_states : List[str]
1086
- Iterable of failed or dis-allowed states. (Default: None)
1087
- execution_delta : datetime.timedelta
1088
- time difference with the previous execution to look at,
1089
- the default is the same logical date as the current task or DAG. (Default: None)
1090
- check_existence: bool
1091
- Set to True to check if the external task exists or check if
1092
- the DAG to wait for exists. (Default: True)
1050
+ ----------
1051
+ packages : Dict[str, str], default: {}
1052
+ Packages to use for this flow. The key is the name of the package
1053
+ and the value is the version to use.
1054
+ python : str, optional, default: None
1055
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1056
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1093
1057
  """
1094
1058
  ...
1095
1059
 
@@ -1237,57 +1201,6 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
1237
1201
  """
1238
1202
  ...
1239
1203
 
1240
- @typing.overload
1241
- 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]]:
1242
- """
1243
- Specifies the times when the flow should be run when running on a
1244
- production scheduler.
1245
-
1246
-
1247
- Parameters
1248
- ----------
1249
- hourly : bool, default False
1250
- Run the workflow hourly.
1251
- daily : bool, default True
1252
- Run the workflow daily.
1253
- weekly : bool, default False
1254
- Run the workflow weekly.
1255
- cron : str, optional, default None
1256
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1257
- specified by this expression.
1258
- timezone : str, optional, default None
1259
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1260
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1261
- """
1262
- ...
1263
-
1264
- @typing.overload
1265
- def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1266
- ...
1267
-
1268
- 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):
1269
- """
1270
- Specifies the times when the flow should be run when running on a
1271
- production scheduler.
1272
-
1273
-
1274
- Parameters
1275
- ----------
1276
- hourly : bool, default False
1277
- Run the workflow hourly.
1278
- daily : bool, default True
1279
- Run the workflow daily.
1280
- weekly : bool, default False
1281
- Run the workflow weekly.
1282
- cron : str, optional, default None
1283
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1284
- specified by this expression.
1285
- timezone : str, optional, default None
1286
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1287
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1288
- """
1289
- ...
1290
-
1291
1204
  def with_artifact_store(f: typing.Optional[typing.Type[FlowSpecDerived]] = None):
1292
1205
  """
1293
1206
  Allows setting external datastores to save data for the
@@ -1402,87 +1315,89 @@ def with_artifact_store(f: typing.Optional[typing.Type[FlowSpecDerived]] = None)
1402
1315
  """
1403
1316
  ...
1404
1317
 
1405
- 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]]:
1318
+ def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1406
1319
  """
1407
- 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)
1408
- before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
1409
- and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
1410
- added as a flow decorators. Adding more than one decorator will ensure that `start` step
1411
- starts only after all sensors finish.
1320
+ Specifies what flows belong to the same project.
1321
+
1322
+ A project-specific namespace is created for all flows that
1323
+ use the same `@project(name)`.
1412
1324
 
1413
1325
 
1414
1326
  Parameters
1415
1327
  ----------
1416
- timeout : int
1417
- Time, in seconds before the task times out and fails. (Default: 3600)
1418
- poke_interval : int
1419
- Time in seconds that the job should wait in between each try. (Default: 60)
1420
- mode : str
1421
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1422
- exponential_backoff : bool
1423
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1424
- pool : str
1425
- the slot pool this task should run in,
1426
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1427
- soft_fail : bool
1428
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1429
1328
  name : str
1430
- Name of the sensor on Airflow
1431
- description : str
1432
- Description of sensor in the Airflow UI
1433
- bucket_key : Union[str, List[str]]
1434
- The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1435
- When it's specified as a full s3:// url, please leave `bucket_name` as None
1436
- bucket_name : str
1437
- Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1438
- When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1439
- wildcard_match : bool
1440
- whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1441
- aws_conn_id : str
1442
- a reference to the s3 connection on Airflow. (Default: None)
1443
- verify : bool
1444
- Whether or not to verify SSL certificates for S3 connection. (Default: None)
1329
+ Project name. Make sure that the name is unique amongst all
1330
+ projects that use the same production scheduler. The name may
1331
+ contain only lowercase alphanumeric characters and underscores.
1332
+
1333
+ branch : Optional[str], default None
1334
+ The branch to use. If not specified, the branch is set to
1335
+ `user.<username>` unless `production` is set to `True`. This can
1336
+ also be set on the command line using `--branch` as a top-level option.
1337
+ It is an error to specify `branch` in the decorator and on the command line.
1338
+
1339
+ production : bool, default False
1340
+ Whether or not the branch is the production branch. This can also be set on the
1341
+ command line using `--production` as a top-level option. It is an error to specify
1342
+ `production` in the decorator and on the command line.
1343
+ The project branch name will be:
1344
+ - if `branch` is specified:
1345
+ - if `production` is True: `prod.<branch>`
1346
+ - if `production` is False: `test.<branch>`
1347
+ - if `branch` is not specified:
1348
+ - if `production` is True: `prod`
1349
+ - if `production` is False: `user.<username>`
1445
1350
  """
1446
1351
  ...
1447
1352
 
1448
1353
  @typing.overload
1449
- def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1354
+ 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]]:
1450
1355
  """
1451
- Specifies the PyPI packages for all steps of the flow.
1356
+ Specifies the times when the flow should be run when running on a
1357
+ production scheduler.
1452
1358
 
1453
- Use `@pypi_base` to set common packages required by all
1454
- steps and use `@pypi` to specify step-specific overrides.
1455
1359
 
1456
1360
  Parameters
1457
1361
  ----------
1458
- packages : Dict[str, str], default: {}
1459
- Packages to use for this flow. The key is the name of the package
1460
- and the value is the version to use.
1461
- python : str, optional, default: None
1462
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1463
- that the version used will correspond to the version of the Python interpreter used to start the run.
1362
+ hourly : bool, default False
1363
+ Run the workflow hourly.
1364
+ daily : bool, default True
1365
+ Run the workflow daily.
1366
+ weekly : bool, default False
1367
+ Run the workflow weekly.
1368
+ cron : str, optional, default None
1369
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1370
+ specified by this expression.
1371
+ timezone : str, optional, default None
1372
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1373
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1464
1374
  """
1465
1375
  ...
1466
1376
 
1467
1377
  @typing.overload
1468
- def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1378
+ def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1469
1379
  ...
1470
1380
 
1471
- def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1381
+ 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):
1472
1382
  """
1473
- Specifies the PyPI packages for all steps of the flow.
1383
+ Specifies the times when the flow should be run when running on a
1384
+ production scheduler.
1474
1385
 
1475
- Use `@pypi_base` to set common packages required by all
1476
- steps and use `@pypi` to specify step-specific overrides.
1477
1386
 
1478
1387
  Parameters
1479
1388
  ----------
1480
- packages : Dict[str, str], default: {}
1481
- Packages to use for this flow. The key is the name of the package
1482
- and the value is the version to use.
1483
- python : str, optional, default: None
1484
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1485
- that the version used will correspond to the version of the Python interpreter used to start the run.
1389
+ hourly : bool, default False
1390
+ Run the workflow hourly.
1391
+ daily : bool, default True
1392
+ Run the workflow daily.
1393
+ weekly : bool, default False
1394
+ Run the workflow weekly.
1395
+ cron : str, optional, default None
1396
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1397
+ specified by this expression.
1398
+ timezone : str, optional, default None
1399
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1400
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1486
1401
  """
1487
1402
  ...
1488
1403
 
@@ -1587,5 +1502,91 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
1587
1502
  """
1588
1503
  ...
1589
1504
 
1505
+ 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]]:
1506
+ """
1507
+ 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)
1508
+ before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
1509
+ and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
1510
+ added as a flow decorators. Adding more than one decorator will ensure that `start` step
1511
+ starts only after all sensors finish.
1512
+
1513
+
1514
+ Parameters
1515
+ ----------
1516
+ timeout : int
1517
+ Time, in seconds before the task times out and fails. (Default: 3600)
1518
+ poke_interval : int
1519
+ Time in seconds that the job should wait in between each try. (Default: 60)
1520
+ mode : str
1521
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1522
+ exponential_backoff : bool
1523
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1524
+ pool : str
1525
+ the slot pool this task should run in,
1526
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
1527
+ soft_fail : bool
1528
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
1529
+ name : str
1530
+ Name of the sensor on Airflow
1531
+ description : str
1532
+ Description of sensor in the Airflow UI
1533
+ bucket_key : Union[str, List[str]]
1534
+ The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1535
+ When it's specified as a full s3:// url, please leave `bucket_name` as None
1536
+ bucket_name : str
1537
+ Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1538
+ When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1539
+ wildcard_match : bool
1540
+ whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1541
+ aws_conn_id : str
1542
+ a reference to the s3 connection on Airflow. (Default: None)
1543
+ verify : bool
1544
+ Whether or not to verify SSL certificates for S3 connection. (Default: None)
1545
+ """
1546
+ ...
1547
+
1548
+ 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]]:
1549
+ """
1550
+ 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.
1551
+ 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.
1552
+
1553
+
1554
+ Parameters
1555
+ ----------
1556
+ timeout : int
1557
+ Time, in seconds before the task times out and fails. (Default: 3600)
1558
+ poke_interval : int
1559
+ Time in seconds that the job should wait in between each try. (Default: 60)
1560
+ mode : str
1561
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1562
+ exponential_backoff : bool
1563
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1564
+ pool : str
1565
+ the slot pool this task should run in,
1566
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
1567
+ soft_fail : bool
1568
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
1569
+ name : str
1570
+ Name of the sensor on Airflow
1571
+ description : str
1572
+ Description of sensor in the Airflow UI
1573
+ external_dag_id : str
1574
+ The dag_id that contains the task you want to wait for.
1575
+ external_task_ids : List[str]
1576
+ The list of task_ids that you want to wait for.
1577
+ If None (default value) the sensor waits for the DAG. (Default: None)
1578
+ allowed_states : List[str]
1579
+ Iterable of allowed states, (Default: ['success'])
1580
+ failed_states : List[str]
1581
+ Iterable of failed or dis-allowed states. (Default: None)
1582
+ execution_delta : datetime.timedelta
1583
+ time difference with the previous execution to look at,
1584
+ the default is the same logical date as the current task or DAG. (Default: None)
1585
+ check_existence: bool
1586
+ Set to True to check if the external task exists or check if
1587
+ the DAG to wait for exists. (Default: True)
1588
+ """
1589
+ ...
1590
+
1590
1591
  pkg_name: str
1591
1592