ob-metaflow-stubs 6.0.3.179rc2__py2.py3-none-any.whl → 6.0.3.179rc3__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 +685 -685
  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 +5 -5
  8. metaflow-stubs/client/filecache.pyi +1 -1
  9. metaflow-stubs/events.pyi +2 -2
  10. metaflow-stubs/exception.pyi +1 -1
  11. metaflow-stubs/flowspec.pyi +4 -4
  12. metaflow-stubs/generated_for.txt +1 -1
  13. metaflow-stubs/includefile.pyi +3 -3
  14. metaflow-stubs/info_file.pyi +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 +86 -86
  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 +1 -1
  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 +3 -3
  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 +3 -3
  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 +3 -3
  37. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/decorator.pyi +2 -2
  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 +1 -1
  43. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +1 -1
  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 +2 -2
  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 +3 -3
  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 +1 -1
  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 +1 -1
  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 +1 -1
  75. metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/baker.pyi +3 -3
  76. metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/docker_environment.pyi +1 -1
  77. metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/fast_bakery.pyi +1 -1
  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 +1 -1
  92. metaflow-stubs/multicore_utils.pyi +1 -1
  93. metaflow-stubs/ob_internal.pyi +1 -1
  94. metaflow-stubs/parameters.pyi +3 -3
  95. metaflow-stubs/plugins/__init__.pyi +10 -10
  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 +2 -2
  108. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
  109. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +3 -3
  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 +2 -2
  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 +3 -3
  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 +2 -2
  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 +2 -2
  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 +2 -2
  140. metaflow-stubs/plugins/cards/card_modules/card.pyi +1 -1
  141. metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
  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 +2 -2
  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 +1 -1
  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 +2 -2
  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 +1 -1
  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 +2 -2
  215. metaflow-stubs/user_configs/config_parameters.pyi +5 -5
  216. {ob_metaflow_stubs-6.0.3.179rc2.dist-info → ob_metaflow_stubs-6.0.3.179rc3.dist-info}/METADATA +1 -1
  217. ob_metaflow_stubs-6.0.3.179rc3.dist-info/RECORD +220 -0
  218. ob_metaflow_stubs-6.0.3.179rc2.dist-info/RECORD +0 -220
  219. {ob_metaflow_stubs-6.0.3.179rc2.dist-info → ob_metaflow_stubs-6.0.3.179rc3.dist-info}/WHEEL +0 -0
  220. {ob_metaflow_stubs-6.0.3.179rc2.dist-info → ob_metaflow_stubs-6.0.3.179rc3.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-13T20:28:05.258106 #
4
+ # Generated on 2025-06-13T20:43:51.355806 #
5
5
  ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
9
  import typing
10
10
  if typing.TYPE_CHECKING:
11
- import datetime
12
11
  import typing
12
+ import datetime
13
13
  FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
14
14
  StepFlag = typing.NewType("StepFlag", bool)
15
15
 
@@ -35,18 +35,18 @@ from .user_configs.config_parameters import ConfigValue as ConfigValue
35
35
  from .user_configs.config_parameters import config_expr as config_expr
36
36
  from .user_configs.config_decorators import CustomFlowDecorator as CustomFlowDecorator
37
37
  from .user_configs.config_decorators import CustomStepDecorator as CustomStepDecorator
38
- from . import cards as cards
39
38
  from . import tuple_util as tuple_util
40
- from . import metaflow_git as metaflow_git
39
+ from . import cards as cards
41
40
  from . import events as events
41
+ from . import metaflow_git as metaflow_git
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
45
45
  from . import includefile as includefile
46
46
  from .includefile import IncludeFile as IncludeFile
47
+ from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
47
48
  from .plugins.pypi.parsers import conda_environment_yml_parser as conda_environment_yml_parser
48
49
  from .plugins.pypi.parsers import requirements_txt_parser as requirements_txt_parser
49
- from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
50
50
  from . import client as client
51
51
  from .client.core import namespace as namespace
52
52
  from .client.core import get_namespace as get_namespace
@@ -155,55 +155,6 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
155
155
  """
156
156
  ...
157
157
 
158
- @typing.overload
159
- 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]]]:
160
- """
161
- Creates a human-readable report, a Metaflow Card, after this step completes.
162
-
163
- Note that you may add multiple `@card` decorators in a step with different parameters.
164
-
165
-
166
- Parameters
167
- ----------
168
- type : str, default 'default'
169
- Card type.
170
- id : str, optional, default None
171
- If multiple cards are present, use this id to identify this card.
172
- options : Dict[str, Any], default {}
173
- Options passed to the card. The contents depend on the card type.
174
- timeout : int, default 45
175
- Interrupt reporting if it takes more than this many seconds.
176
- """
177
- ...
178
-
179
- @typing.overload
180
- def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
181
- ...
182
-
183
- @typing.overload
184
- def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
185
- ...
186
-
187
- 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):
188
- """
189
- Creates a human-readable report, a Metaflow Card, after this step completes.
190
-
191
- Note that you may add multiple `@card` decorators in a step with different parameters.
192
-
193
-
194
- Parameters
195
- ----------
196
- type : str, default 'default'
197
- Card type.
198
- id : str, optional, default None
199
- If multiple cards are present, use this id to identify this card.
200
- options : Dict[str, Any], default {}
201
- Options passed to the card. The contents depend on the card type.
202
- timeout : int, default 45
203
- Interrupt reporting if it takes more than this many seconds.
204
- """
205
- ...
206
-
207
158
  @typing.overload
208
159
  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]]]:
209
160
  """
@@ -262,61 +213,57 @@ def checkpoint(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None
262
213
  ...
263
214
 
264
215
  @typing.overload
265
- 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]]]:
216
+ 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]]]:
266
217
  """
267
- Specifies a timeout for your step.
268
-
269
- This decorator is useful if this step may hang indefinitely.
218
+ Specifies the number of times the task corresponding
219
+ to a step needs to be retried.
270
220
 
271
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
272
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
273
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
221
+ This decorator is useful for handling transient errors, such as networking issues.
222
+ If your task contains operations that can't be retried safely, e.g. database updates,
223
+ it is advisable to annotate it with `@retry(times=0)`.
274
224
 
275
- Note that all the values specified in parameters are added together so if you specify
276
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
225
+ This can be used in conjunction with the `@catch` decorator. The `@catch`
226
+ decorator will execute a no-op task after all retries have been exhausted,
227
+ ensuring that the flow execution can continue.
277
228
 
278
229
 
279
230
  Parameters
280
231
  ----------
281
- seconds : int, default 0
282
- Number of seconds to wait prior to timing out.
283
- minutes : int, default 0
284
- Number of minutes to wait prior to timing out.
285
- hours : int, default 0
286
- Number of hours to wait prior to timing out.
232
+ times : int, default 3
233
+ Number of times to retry this task.
234
+ minutes_between_retries : int, default 2
235
+ Number of minutes between retries.
287
236
  """
288
237
  ...
289
238
 
290
239
  @typing.overload
291
- def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
240
+ def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
292
241
  ...
293
242
 
294
243
  @typing.overload
295
- def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
244
+ def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
296
245
  ...
297
246
 
298
- def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, seconds: int = 0, minutes: int = 0, hours: int = 0):
247
+ 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):
299
248
  """
300
- Specifies a timeout for your step.
301
-
302
- This decorator is useful if this step may hang indefinitely.
249
+ Specifies the number of times the task corresponding
250
+ to a step needs to be retried.
303
251
 
304
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
305
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
306
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
252
+ This decorator is useful for handling transient errors, such as networking issues.
253
+ If your task contains operations that can't be retried safely, e.g. database updates,
254
+ it is advisable to annotate it with `@retry(times=0)`.
307
255
 
308
- Note that all the values specified in parameters are added together so if you specify
309
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
256
+ This can be used in conjunction with the `@catch` decorator. The `@catch`
257
+ decorator will execute a no-op task after all retries have been exhausted,
258
+ ensuring that the flow execution can continue.
310
259
 
311
260
 
312
261
  Parameters
313
262
  ----------
314
- seconds : int, default 0
315
- Number of seconds to wait prior to timing out.
316
- minutes : int, default 0
317
- Number of minutes to wait prior to timing out.
318
- hours : int, default 0
319
- Number of hours to wait prior to timing out.
263
+ times : int, default 3
264
+ Number of times to retry this task.
265
+ minutes_between_retries : int, default 2
266
+ Number of minutes between retries.
320
267
  """
321
268
  ...
322
269
 
@@ -334,142 +281,6 @@ def nvct(*, gpu: int, gpu_type: str) -> typing.Callable[[typing.Union[typing.Cal
334
281
  """
335
282
  ...
336
283
 
337
- @typing.overload
338
- 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]]]:
339
- """
340
- Specifies environment variables to be set prior to the execution of a step.
341
-
342
-
343
- Parameters
344
- ----------
345
- vars : Dict[str, str], default {}
346
- Dictionary of environment variables to set.
347
- """
348
- ...
349
-
350
- @typing.overload
351
- def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
352
- ...
353
-
354
- @typing.overload
355
- def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
356
- ...
357
-
358
- def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
359
- """
360
- Specifies environment variables to be set prior to the execution of a step.
361
-
362
-
363
- Parameters
364
- ----------
365
- vars : Dict[str, str], default {}
366
- Dictionary of environment variables to set.
367
- """
368
- ...
369
-
370
- @typing.overload
371
- def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
372
- """
373
- Internal decorator to support Fast bakery
374
- """
375
- ...
376
-
377
- @typing.overload
378
- def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
379
- ...
380
-
381
- def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
382
- """
383
- Internal decorator to support Fast bakery
384
- """
385
- ...
386
-
387
- @typing.overload
388
- 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]]]:
389
- """
390
- Specifies secrets to be retrieved and injected as environment variables prior to
391
- the execution of a step.
392
-
393
-
394
- Parameters
395
- ----------
396
- sources : List[Union[str, Dict[str, Any]]], default: []
397
- List of secret specs, defining how the secrets are to be retrieved
398
- """
399
- ...
400
-
401
- @typing.overload
402
- def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
403
- ...
404
-
405
- @typing.overload
406
- def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
407
- ...
408
-
409
- 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]]] = []):
410
- """
411
- Specifies secrets to be retrieved and injected as environment variables prior to
412
- the execution of a step.
413
-
414
-
415
- Parameters
416
- ----------
417
- sources : List[Union[str, Dict[str, Any]]], default: []
418
- List of secret specs, defining how the secrets are to be retrieved
419
- """
420
- ...
421
-
422
- @typing.overload
423
- 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]]]:
424
- """
425
- Specifies the PyPI packages for the step.
426
-
427
- Information in this decorator will augment any
428
- attributes set in the `@pyi_base` flow-level decorator. Hence,
429
- you can use `@pypi_base` to set packages required by all
430
- steps and use `@pypi` to specify step-specific overrides.
431
-
432
-
433
- Parameters
434
- ----------
435
- packages : Dict[str, str], default: {}
436
- Packages to use for this step. The key is the name of the package
437
- and the value is the version to use.
438
- python : str, optional, default: None
439
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
440
- that the version used will correspond to the version of the Python interpreter used to start the run.
441
- """
442
- ...
443
-
444
- @typing.overload
445
- def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
446
- ...
447
-
448
- @typing.overload
449
- def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
450
- ...
451
-
452
- 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):
453
- """
454
- Specifies the PyPI packages for the step.
455
-
456
- Information in this decorator will augment any
457
- attributes set in the `@pyi_base` flow-level decorator. Hence,
458
- you can use `@pypi_base` to set packages required by all
459
- steps and use `@pypi` to specify step-specific overrides.
460
-
461
-
462
- Parameters
463
- ----------
464
- packages : Dict[str, str], default: {}
465
- Packages to use for this step. The key is the name of the package
466
- and the value is the version to use.
467
- python : str, optional, default: None
468
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
469
- that the version used will correspond to the version of the Python interpreter used to start the run.
470
- """
471
- ...
472
-
473
284
  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]]]:
474
285
  """
475
286
  Specifies that this step should execute on Kubernetes.
@@ -559,64 +370,7 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
559
370
  """
560
371
  ...
561
372
 
562
- @typing.overload
563
- 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]]]:
564
- """
565
- Enables loading / saving of models within a step.
566
-
567
-
568
-
569
- Parameters
570
- ----------
571
- load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
572
- Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
573
- These artifact names give to `load` be reference objects or reference `key` string's from objects created by:
574
- - `current.checkpoint`
575
- - `current.model`
576
- - `current.huggingface_hub`
577
-
578
- 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
579
- the local filesystem. If the second element is None, the artifact will be unpacked in the current working directory.
580
- If a string is provided, then the artifact corresponding to that name will be loaded in the current working directory.
581
-
582
- temp_dir_root : str, default: None
583
- The root directory under which `current.model.loaded` will store loaded models
584
- """
585
- ...
586
-
587
- @typing.overload
588
- def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
589
- ...
590
-
591
- @typing.overload
592
- def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
593
- ...
594
-
595
- 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):
596
- """
597
- Enables loading / saving of models within a step.
598
-
599
-
600
-
601
- Parameters
602
- ----------
603
- load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
604
- Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
605
- These artifact names give to `load` be reference objects or reference `key` string's from objects created by:
606
- - `current.checkpoint`
607
- - `current.model`
608
- - `current.huggingface_hub`
609
-
610
- 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
611
- the local filesystem. If the second element is None, the artifact will be unpacked in the current working directory.
612
- If a string is provided, then the artifact corresponding to that name will be loaded in the current working directory.
613
-
614
- temp_dir_root : str, default: None
615
- The root directory under which `current.model.loaded` will store loaded models
616
- """
617
- ...
618
-
619
- 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]]]:
373
+ 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]]]:
620
374
  """
621
375
  This decorator is used to run Ollama APIs as Metaflow task sidecars.
622
376
 
@@ -659,62 +413,36 @@ def ollama(*, models: list, backend: str, force_pull: bool, cache_update_policy:
659
413
  """
660
414
  ...
661
415
 
662
- @typing.overload
663
- 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]]]:
416
+ 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]]]:
664
417
  """
665
- Specifies the Conda environment for the step.
666
-
667
- Information in this decorator will augment any
668
- attributes set in the `@conda_base` flow-level decorator. Hence,
669
- you can use `@conda_base` to set packages required by all
670
- steps and use `@conda` to specify step-specific overrides.
418
+ Specifies that this step should execute on DGX cloud.
671
419
 
672
420
 
673
421
  Parameters
674
422
  ----------
675
- packages : Dict[str, str], default {}
676
- Packages to use for this step. The key is the name of the package
677
- and the value is the version to use.
678
- libraries : Dict[str, str], default {}
679
- Supported for backward compatibility. When used with packages, packages will take precedence.
680
- python : str, optional, default None
681
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
682
- that the version used will correspond to the version of the Python interpreter used to start the run.
683
- disabled : bool, default False
684
- If set to True, disables @conda.
423
+ gpu : int
424
+ Number of GPUs to use.
425
+ gpu_type : str
426
+ Type of Nvidia GPU to use.
427
+ queue_timeout : int
428
+ Time to keep the job in NVCF's queue.
685
429
  """
686
430
  ...
687
431
 
688
432
  @typing.overload
689
- def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
433
+ def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
434
+ """
435
+ Internal decorator to support Fast bakery
436
+ """
690
437
  ...
691
438
 
692
439
  @typing.overload
693
- def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
440
+ def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
694
441
  ...
695
442
 
696
- 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):
443
+ def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
697
444
  """
698
- Specifies the Conda environment for the step.
699
-
700
- Information in this decorator will augment any
701
- attributes set in the `@conda_base` flow-level decorator. Hence,
702
- you can use `@conda_base` to set packages required by all
703
- steps and use `@conda` to specify step-specific overrides.
704
-
705
-
706
- Parameters
707
- ----------
708
- packages : Dict[str, str], default {}
709
- Packages to use for this step. The key is the name of the package
710
- and the value is the version to use.
711
- libraries : Dict[str, str], default {}
712
- Supported for backward compatibility. When used with packages, packages will take precedence.
713
- python : str, optional, default None
714
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
715
- that the version used will correspond to the version of the Python interpreter used to start the run.
716
- disabled : bool, default False
717
- If set to True, disables @conda.
445
+ Internal decorator to support Fast bakery
718
446
  """
719
447
  ...
720
448
 
@@ -823,158 +551,574 @@ def huggingface_hub(*, temp_dir_root: typing.Optional[str] = None, load: typing.
823
551
  ...
824
552
 
825
553
  @typing.overload
826
- 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]]]:
554
+ 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]]]:
827
555
  """
828
- Specifies that the step will success under all circumstances.
556
+ Enables loading / saving of models within a step.
829
557
 
830
- The decorator will create an optional artifact, specified by `var`, which
831
- contains the exception raised. You can use it to detect the presence
832
- of errors, indicating that all happy-path artifacts produced by the step
833
- are missing.
834
558
 
835
559
 
836
560
  Parameters
837
561
  ----------
838
- var : str, optional, default None
839
- Name of the artifact in which to store the caught exception.
840
- If not specified, the exception is not stored.
841
- print_exception : bool, default True
842
- Determines whether or not the exception is printed to
843
- stdout when caught.
562
+ load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
563
+ Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
564
+ These artifact names give to `load` be reference objects or reference `key` string's from objects created by:
565
+ - `current.checkpoint`
566
+ - `current.model`
567
+ - `current.huggingface_hub`
568
+
569
+ 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
570
+ the local filesystem. If the second element is None, the artifact will be unpacked in the current working directory.
571
+ If a string is provided, then the artifact corresponding to that name will be loaded in the current working directory.
572
+
573
+ temp_dir_root : str, default: None
574
+ The root directory under which `current.model.loaded` will store loaded models
844
575
  """
845
576
  ...
846
577
 
847
578
  @typing.overload
848
- def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
579
+ def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
849
580
  ...
850
581
 
851
582
  @typing.overload
852
- def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
583
+ def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
853
584
  ...
854
585
 
855
- 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):
586
+ 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):
856
587
  """
857
- Specifies that the step will success under all circumstances.
588
+ Enables loading / saving of models within a step.
858
589
 
859
- The decorator will create an optional artifact, specified by `var`, which
860
- contains the exception raised. You can use it to detect the presence
861
- of errors, indicating that all happy-path artifacts produced by the step
862
- are missing.
863
590
 
864
591
 
865
592
  Parameters
866
593
  ----------
867
- var : str, optional, default None
868
- Name of the artifact in which to store the caught exception.
869
- If not specified, the exception is not stored.
870
- print_exception : bool, default True
871
- Determines whether or not the exception is printed to
872
- stdout when caught.
594
+ load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
595
+ Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
596
+ These artifact names give to `load` be reference objects or reference `key` string's from objects created by:
597
+ - `current.checkpoint`
598
+ - `current.model`
599
+ - `current.huggingface_hub`
600
+
601
+ 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
602
+ the local filesystem. If the second element is None, the artifact will be unpacked in the current working directory.
603
+ If a string is provided, then the artifact corresponding to that name will be loaded in the current working directory.
604
+
605
+ temp_dir_root : str, default: None
606
+ The root directory under which `current.model.loaded` will store loaded models
873
607
  """
874
608
  ...
875
609
 
876
- 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]]]:
610
+ @typing.overload
611
+ def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
877
612
  """
878
- Specifies that this step is used to deploy an instance of the app.
879
- Requires that self.app_name, self.app_port, self.entrypoint and self.deployDir is set.
880
-
881
-
882
- Parameters
883
- ----------
884
- app_port : int
885
- Number of GPUs to use.
886
- app_name : str
887
- Name of the app to deploy.
613
+ Decorator prototype for all step decorators. This function gets specialized
614
+ and imported for all decorators types by _import_plugin_decorators().
888
615
  """
889
616
  ...
890
617
 
891
618
  @typing.overload
892
- 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]]]:
619
+ def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
620
+ ...
621
+
622
+ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
893
623
  """
894
- Specifies the number of times the task corresponding
895
- to a step needs to be retried.
624
+ Decorator prototype for all step decorators. This function gets specialized
625
+ and imported for all decorators types by _import_plugin_decorators().
626
+ """
627
+ ...
628
+
629
+ @typing.overload
630
+ 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]]]:
631
+ """
632
+ Specifies a timeout for your step.
896
633
 
897
- This decorator is useful for handling transient errors, such as networking issues.
898
- If your task contains operations that can't be retried safely, e.g. database updates,
899
- it is advisable to annotate it with `@retry(times=0)`.
634
+ This decorator is useful if this step may hang indefinitely.
900
635
 
901
- This can be used in conjunction with the `@catch` decorator. The `@catch`
902
- decorator will execute a no-op task after all retries have been exhausted,
903
- ensuring that the flow execution can continue.
636
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
637
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
638
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
639
+
640
+ Note that all the values specified in parameters are added together so if you specify
641
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
904
642
 
905
643
 
906
644
  Parameters
907
645
  ----------
908
- times : int, default 3
909
- Number of times to retry this task.
910
- minutes_between_retries : int, default 2
911
- Number of minutes between retries.
646
+ seconds : int, default 0
647
+ Number of seconds to wait prior to timing out.
648
+ minutes : int, default 0
649
+ Number of minutes to wait prior to timing out.
650
+ hours : int, default 0
651
+ Number of hours to wait prior to timing out.
912
652
  """
913
653
  ...
914
654
 
915
655
  @typing.overload
916
- def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
656
+ def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
917
657
  ...
918
658
 
919
659
  @typing.overload
920
- def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
660
+ def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
921
661
  ...
922
662
 
923
- 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):
663
+ def timeout(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, seconds: int = 0, minutes: int = 0, hours: int = 0):
924
664
  """
925
- Specifies the number of times the task corresponding
926
- to a step needs to be retried.
665
+ Specifies a timeout for your step.
927
666
 
928
- This decorator is useful for handling transient errors, such as networking issues.
929
- If your task contains operations that can't be retried safely, e.g. database updates,
930
- it is advisable to annotate it with `@retry(times=0)`.
667
+ This decorator is useful if this step may hang indefinitely.
931
668
 
932
- This can be used in conjunction with the `@catch` decorator. The `@catch`
933
- decorator will execute a no-op task after all retries have been exhausted,
934
- ensuring that the flow execution can continue.
669
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
670
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
671
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
672
+
673
+ Note that all the values specified in parameters are added together so if you specify
674
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
935
675
 
936
676
 
937
677
  Parameters
938
678
  ----------
939
- times : int, default 3
940
- Number of times to retry this task.
941
- minutes_between_retries : int, default 2
942
- Number of minutes between retries.
679
+ seconds : int, default 0
680
+ Number of seconds to wait prior to timing out.
681
+ minutes : int, default 0
682
+ Number of minutes to wait prior to timing out.
683
+ hours : int, default 0
684
+ Number of hours to wait prior to timing out.
943
685
  """
944
686
  ...
945
687
 
946
- 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]]]:
688
+ @typing.overload
689
+ 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]]]:
690
+ """
691
+ Specifies environment variables to be set prior to the execution of a step.
692
+
693
+
694
+ Parameters
695
+ ----------
696
+ vars : Dict[str, str], default {}
697
+ Dictionary of environment variables to set.
698
+ """
699
+ ...
700
+
701
+ @typing.overload
702
+ def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
703
+ ...
704
+
705
+ @typing.overload
706
+ def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
707
+ ...
708
+
709
+ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
710
+ """
711
+ Specifies environment variables to be set prior to the execution of a step.
712
+
713
+
714
+ Parameters
715
+ ----------
716
+ vars : Dict[str, str], default {}
717
+ Dictionary of environment variables to set.
718
+ """
719
+ ...
720
+
721
+ @typing.overload
722
+ 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]]]:
723
+ """
724
+ Specifies the Conda environment for the step.
725
+
726
+ Information in this decorator will augment any
727
+ attributes set in the `@conda_base` flow-level decorator. Hence,
728
+ you can use `@conda_base` to set packages required by all
729
+ steps and use `@conda` to specify step-specific overrides.
730
+
731
+
732
+ Parameters
733
+ ----------
734
+ packages : Dict[str, str], default {}
735
+ Packages to use for this step. The key is the name of the package
736
+ and the value is the version to use.
737
+ libraries : Dict[str, str], default {}
738
+ Supported for backward compatibility. When used with packages, packages will take precedence.
739
+ python : str, optional, default None
740
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
741
+ that the version used will correspond to the version of the Python interpreter used to start the run.
742
+ disabled : bool, default False
743
+ If set to True, disables @conda.
744
+ """
745
+ ...
746
+
747
+ @typing.overload
748
+ def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
749
+ ...
750
+
751
+ @typing.overload
752
+ def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
753
+ ...
754
+
755
+ 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):
756
+ """
757
+ Specifies the Conda environment for the step.
758
+
759
+ Information in this decorator will augment any
760
+ attributes set in the `@conda_base` flow-level decorator. Hence,
761
+ you can use `@conda_base` to set packages required by all
762
+ steps and use `@conda` to specify step-specific overrides.
763
+
764
+
765
+ Parameters
766
+ ----------
767
+ packages : Dict[str, str], default {}
768
+ Packages to use for this step. The key is the name of the package
769
+ and the value is the version to use.
770
+ libraries : Dict[str, str], default {}
771
+ Supported for backward compatibility. When used with packages, packages will take precedence.
772
+ python : str, optional, default None
773
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
774
+ that the version used will correspond to the version of the Python interpreter used to start the run.
775
+ disabled : bool, default False
776
+ If set to True, disables @conda.
777
+ """
778
+ ...
779
+
780
+ @typing.overload
781
+ 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]]]:
782
+ """
783
+ Specifies that the step will success under all circumstances.
784
+
785
+ The decorator will create an optional artifact, specified by `var`, which
786
+ contains the exception raised. You can use it to detect the presence
787
+ of errors, indicating that all happy-path artifacts produced by the step
788
+ are missing.
789
+
790
+
791
+ Parameters
792
+ ----------
793
+ var : str, optional, default None
794
+ Name of the artifact in which to store the caught exception.
795
+ If not specified, the exception is not stored.
796
+ print_exception : bool, default True
797
+ Determines whether or not the exception is printed to
798
+ stdout when caught.
799
+ """
800
+ ...
801
+
802
+ @typing.overload
803
+ def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
804
+ ...
805
+
806
+ @typing.overload
807
+ def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
808
+ ...
809
+
810
+ 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):
811
+ """
812
+ Specifies that the step will success under all circumstances.
813
+
814
+ The decorator will create an optional artifact, specified by `var`, which
815
+ contains the exception raised. You can use it to detect the presence
816
+ of errors, indicating that all happy-path artifacts produced by the step
817
+ are missing.
818
+
819
+
820
+ Parameters
821
+ ----------
822
+ var : str, optional, default None
823
+ Name of the artifact in which to store the caught exception.
824
+ If not specified, the exception is not stored.
825
+ print_exception : bool, default True
826
+ Determines whether or not the exception is printed to
827
+ stdout when caught.
828
+ """
829
+ ...
830
+
831
+ @typing.overload
832
+ 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]]]:
833
+ """
834
+ Specifies secrets to be retrieved and injected as environment variables prior to
835
+ the execution of a step.
836
+
837
+
838
+ Parameters
839
+ ----------
840
+ sources : List[Union[str, Dict[str, Any]]], default: []
841
+ List of secret specs, defining how the secrets are to be retrieved
842
+ """
843
+ ...
844
+
845
+ @typing.overload
846
+ def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
847
+ ...
848
+
849
+ @typing.overload
850
+ def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
851
+ ...
852
+
853
+ 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]]] = []):
854
+ """
855
+ Specifies secrets to be retrieved and injected as environment variables prior to
856
+ the execution of a step.
857
+
858
+
859
+ Parameters
860
+ ----------
861
+ sources : List[Union[str, Dict[str, Any]]], default: []
862
+ List of secret specs, defining how the secrets are to be retrieved
863
+ """
864
+ ...
865
+
866
+ @typing.overload
867
+ 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]]]:
868
+ """
869
+ Specifies the PyPI packages for the step.
870
+
871
+ Information in this decorator will augment any
872
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
873
+ you can use `@pypi_base` to set packages required by all
874
+ steps and use `@pypi` to specify step-specific overrides.
875
+
876
+
877
+ Parameters
878
+ ----------
879
+ packages : Dict[str, str], default: {}
880
+ Packages to use for this step. The key is the name of the package
881
+ and the value is the version to use.
882
+ python : str, optional, default: None
883
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
884
+ that the version used will correspond to the version of the Python interpreter used to start the run.
885
+ """
886
+ ...
887
+
888
+ @typing.overload
889
+ def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
890
+ ...
891
+
892
+ @typing.overload
893
+ def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
894
+ ...
895
+
896
+ 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):
897
+ """
898
+ Specifies the PyPI packages for the step.
899
+
900
+ Information in this decorator will augment any
901
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
902
+ you can use `@pypi_base` to set packages required by all
903
+ steps and use `@pypi` to specify step-specific overrides.
904
+
905
+
906
+ Parameters
907
+ ----------
908
+ packages : Dict[str, str], default: {}
909
+ Packages to use for this step. The key is the name of the package
910
+ and the value is the version to use.
911
+ python : str, optional, default: None
912
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
913
+ that the version used will correspond to the version of the Python interpreter used to start the run.
914
+ """
915
+ ...
916
+
917
+ 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]]]:
918
+ """
919
+ Specifies that this step is used to deploy an instance of the app.
920
+ Requires that self.app_name, self.app_port, self.entrypoint and self.deployDir is set.
921
+
922
+
923
+ Parameters
924
+ ----------
925
+ app_port : int
926
+ Number of GPUs to use.
927
+ app_name : str
928
+ Name of the app to deploy.
929
+ """
930
+ ...
931
+
932
+ @typing.overload
933
+ 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]]]:
934
+ """
935
+ Creates a human-readable report, a Metaflow Card, after this step completes.
936
+
937
+ Note that you may add multiple `@card` decorators in a step with different parameters.
938
+
939
+
940
+ Parameters
941
+ ----------
942
+ type : str, default 'default'
943
+ Card type.
944
+ id : str, optional, default None
945
+ If multiple cards are present, use this id to identify this card.
946
+ options : Dict[str, Any], default {}
947
+ Options passed to the card. The contents depend on the card type.
948
+ timeout : int, default 45
949
+ Interrupt reporting if it takes more than this many seconds.
950
+ """
951
+ ...
952
+
953
+ @typing.overload
954
+ def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
955
+ ...
956
+
957
+ @typing.overload
958
+ def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
959
+ ...
960
+
961
+ 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):
962
+ """
963
+ Creates a human-readable report, a Metaflow Card, after this step completes.
964
+
965
+ Note that you may add multiple `@card` decorators in a step with different parameters.
966
+
967
+
968
+ Parameters
969
+ ----------
970
+ type : str, default 'default'
971
+ Card type.
972
+ id : str, optional, default None
973
+ If multiple cards are present, use this id to identify this card.
974
+ options : Dict[str, Any], default {}
975
+ Options passed to the card. The contents depend on the card type.
976
+ timeout : int, default 45
977
+ Interrupt reporting if it takes more than this many seconds.
978
+ """
979
+ ...
980
+
981
+ @typing.overload
982
+ def trigger(*, event: typing.Union[str, typing.Dict[str, typing.Any], None] = None, events: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], options: typing.Dict[str, typing.Any] = {}) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
983
+ """
984
+ Specifies the event(s) that this flow depends on.
985
+
986
+ ```
987
+ @trigger(event='foo')
988
+ ```
989
+ or
990
+ ```
991
+ @trigger(events=['foo', 'bar'])
992
+ ```
993
+
994
+ Additionally, you can specify the parameter mappings
995
+ to map event payload to Metaflow parameters for the flow.
996
+ ```
997
+ @trigger(event={'name':'foo', 'parameters':{'flow_param': 'event_field'}})
998
+ ```
999
+ or
1000
+ ```
1001
+ @trigger(events=[{'name':'foo', 'parameters':{'flow_param_1': 'event_field_1'},
1002
+ {'name':'bar', 'parameters':{'flow_param_2': 'event_field_2'}])
1003
+ ```
1004
+
1005
+ 'parameters' can also be a list of strings and tuples like so:
1006
+ ```
1007
+ @trigger(event={'name':'foo', 'parameters':['common_name', ('flow_param', 'event_field')]})
1008
+ ```
1009
+ This is equivalent to:
1010
+ ```
1011
+ @trigger(event={'name':'foo', 'parameters':{'common_name': 'common_name', 'flow_param': 'event_field'}})
1012
+ ```
1013
+
1014
+
1015
+ Parameters
1016
+ ----------
1017
+ event : Union[str, Dict[str, Any]], optional, default None
1018
+ Event dependency for this flow.
1019
+ events : List[Union[str, Dict[str, Any]]], default []
1020
+ Events dependency for this flow.
1021
+ options : Dict[str, Any], default {}
1022
+ Backend-specific configuration for tuning eventing behavior.
1023
+ """
1024
+ ...
1025
+
1026
+ @typing.overload
1027
+ def trigger(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1028
+ ...
1029
+
1030
+ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: typing.Union[str, typing.Dict[str, typing.Any], None] = None, events: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], options: typing.Dict[str, typing.Any] = {}):
947
1031
  """
948
- Specifies that this step should execute on DGX cloud.
1032
+ Specifies the event(s) that this flow depends on.
1033
+
1034
+ ```
1035
+ @trigger(event='foo')
1036
+ ```
1037
+ or
1038
+ ```
1039
+ @trigger(events=['foo', 'bar'])
1040
+ ```
1041
+
1042
+ Additionally, you can specify the parameter mappings
1043
+ to map event payload to Metaflow parameters for the flow.
1044
+ ```
1045
+ @trigger(event={'name':'foo', 'parameters':{'flow_param': 'event_field'}})
1046
+ ```
1047
+ or
1048
+ ```
1049
+ @trigger(events=[{'name':'foo', 'parameters':{'flow_param_1': 'event_field_1'},
1050
+ {'name':'bar', 'parameters':{'flow_param_2': 'event_field_2'}])
1051
+ ```
1052
+
1053
+ 'parameters' can also be a list of strings and tuples like so:
1054
+ ```
1055
+ @trigger(event={'name':'foo', 'parameters':['common_name', ('flow_param', 'event_field')]})
1056
+ ```
1057
+ This is equivalent to:
1058
+ ```
1059
+ @trigger(event={'name':'foo', 'parameters':{'common_name': 'common_name', 'flow_param': 'event_field'}})
1060
+ ```
949
1061
 
950
1062
 
951
1063
  Parameters
952
1064
  ----------
953
- gpu : int
954
- Number of GPUs to use.
955
- gpu_type : str
956
- Type of Nvidia GPU to use.
957
- queue_timeout : int
958
- Time to keep the job in NVCF's queue.
1065
+ event : Union[str, Dict[str, Any]], optional, default None
1066
+ Event dependency for this flow.
1067
+ events : List[Union[str, Dict[str, Any]]], default []
1068
+ Events dependency for this flow.
1069
+ options : Dict[str, Any], default {}
1070
+ Backend-specific configuration for tuning eventing behavior.
959
1071
  """
960
1072
  ...
961
1073
 
962
1074
  @typing.overload
963
- def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1075
+ def conda_base(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
964
1076
  """
965
- Decorator prototype for all step decorators. This function gets specialized
966
- and imported for all decorators types by _import_plugin_decorators().
1077
+ Specifies the Conda environment for all steps of the flow.
1078
+
1079
+ Use `@conda_base` to set common libraries required by all
1080
+ steps and use `@conda` to specify step-specific additions.
1081
+
1082
+
1083
+ Parameters
1084
+ ----------
1085
+ packages : Dict[str, str], default {}
1086
+ Packages to use for this flow. The key is the name of the package
1087
+ and the value is the version to use.
1088
+ libraries : Dict[str, str], default {}
1089
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1090
+ python : str, optional, default None
1091
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1092
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1093
+ disabled : bool, default False
1094
+ If set to True, disables Conda.
967
1095
  """
968
1096
  ...
969
1097
 
970
1098
  @typing.overload
971
- def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1099
+ def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
972
1100
  ...
973
1101
 
974
- def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
1102
+ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
975
1103
  """
976
- Decorator prototype for all step decorators. This function gets specialized
977
- and imported for all decorators types by _import_plugin_decorators().
1104
+ Specifies the Conda environment for all steps of the flow.
1105
+
1106
+ Use `@conda_base` to set common libraries required by all
1107
+ steps and use `@conda` to specify step-specific additions.
1108
+
1109
+
1110
+ Parameters
1111
+ ----------
1112
+ packages : Dict[str, str], default {}
1113
+ Packages to use for this flow. The key is the name of the package
1114
+ and the value is the version to use.
1115
+ libraries : Dict[str, str], default {}
1116
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1117
+ python : str, optional, default None
1118
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1119
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1120
+ disabled : bool, default False
1121
+ If set to True, disables Conda.
978
1122
  """
979
1123
  ...
980
1124
 
@@ -1079,46 +1223,54 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
1079
1223
  """
1080
1224
  ...
1081
1225
 
1082
- 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]]:
1226
+ @typing.overload
1227
+ 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]]:
1083
1228
  """
1084
- 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.
1085
- 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.
1229
+ Specifies the times when the flow should be run when running on a
1230
+ production scheduler.
1086
1231
 
1087
1232
 
1088
1233
  Parameters
1089
1234
  ----------
1090
- timeout : int
1091
- Time, in seconds before the task times out and fails. (Default: 3600)
1092
- poke_interval : int
1093
- Time in seconds that the job should wait in between each try. (Default: 60)
1094
- mode : str
1095
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1096
- exponential_backoff : bool
1097
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1098
- pool : str
1099
- the slot pool this task should run in,
1100
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1101
- soft_fail : bool
1102
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1103
- name : str
1104
- Name of the sensor on Airflow
1105
- description : str
1106
- Description of sensor in the Airflow UI
1107
- external_dag_id : str
1108
- The dag_id that contains the task you want to wait for.
1109
- external_task_ids : List[str]
1110
- The list of task_ids that you want to wait for.
1111
- If None (default value) the sensor waits for the DAG. (Default: None)
1112
- allowed_states : List[str]
1113
- Iterable of allowed states, (Default: ['success'])
1114
- failed_states : List[str]
1115
- Iterable of failed or dis-allowed states. (Default: None)
1116
- execution_delta : datetime.timedelta
1117
- time difference with the previous execution to look at,
1118
- the default is the same logical date as the current task or DAG. (Default: None)
1119
- check_existence: bool
1120
- Set to True to check if the external task exists or check if
1121
- the DAG to wait for exists. (Default: True)
1235
+ hourly : bool, default False
1236
+ Run the workflow hourly.
1237
+ daily : bool, default True
1238
+ Run the workflow daily.
1239
+ weekly : bool, default False
1240
+ Run the workflow weekly.
1241
+ cron : str, optional, default None
1242
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1243
+ specified by this expression.
1244
+ timezone : str, optional, default None
1245
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1246
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1247
+ """
1248
+ ...
1249
+
1250
+ @typing.overload
1251
+ def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1252
+ ...
1253
+
1254
+ 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):
1255
+ """
1256
+ Specifies the times when the flow should be run when running on a
1257
+ production scheduler.
1258
+
1259
+
1260
+ Parameters
1261
+ ----------
1262
+ hourly : bool, default False
1263
+ Run the workflow hourly.
1264
+ daily : bool, default True
1265
+ Run the workflow daily.
1266
+ weekly : bool, default False
1267
+ Run the workflow weekly.
1268
+ cron : str, optional, default None
1269
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1270
+ specified by this expression.
1271
+ timezone : str, optional, default None
1272
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1273
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1122
1274
  """
1123
1275
  ...
1124
1276
 
@@ -1223,195 +1375,135 @@ def with_artifact_store(f: typing.Optional[typing.Type[FlowSpecDerived]] = None)
1223
1375
 
1224
1376
  type: str
1225
1377
  The type of the datastore. Can be one of 's3', 'gcs', 'azure' or any other supported metaflow Datastore.
1226
-
1227
- config: dict or Callable
1228
- Dictionary of configuration options for the datastore. The following keys are required:
1229
- - root: The root path in the datastore where the data will be saved. (needs to be in the format expected by the datastore)
1230
- - example: 's3://bucket-name/path/to/root'
1231
- - example: 'gs://bucket-name/path/to/root'
1232
- - example: 'https://myblockacc.blob.core.windows.net/metaflow/'
1233
- - role_arn (optional): AWS IAM role to access s3 bucket (only when `type` is 's3')
1234
- - session_vars (optional): AWS session variables to access s3 bucket (only when `type` is 's3')
1235
- - client_params (optional): AWS client parameters to access s3 bucket (only when `type` is 's3')
1236
- """
1237
- ...
1238
-
1239
- def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1240
- """
1241
- Specifies what flows belong to the same project.
1242
-
1243
- A project-specific namespace is created for all flows that
1244
- use the same `@project(name)`.
1245
-
1246
-
1247
- Parameters
1248
- ----------
1249
- name : str
1250
- Project name. Make sure that the name is unique amongst all
1251
- projects that use the same production scheduler. The name may
1252
- contain only lowercase alphanumeric characters and underscores.
1253
-
1254
- branch : Optional[str], default None
1255
- The branch to use. If not specified, the branch is set to
1256
- `user.<username>` unless `production` is set to `True`. This can
1257
- also be set on the command line using `--branch` as a top-level option.
1258
- It is an error to specify `branch` in the decorator and on the command line.
1259
-
1260
- production : bool, default False
1261
- Whether or not the branch is the production branch. This can also be set on the
1262
- command line using `--production` as a top-level option. It is an error to specify
1263
- `production` in the decorator and on the command line.
1264
- The project branch name will be:
1265
- - if `branch` is specified:
1266
- - if `production` is True: `prod.<branch>`
1267
- - if `production` is False: `test.<branch>`
1268
- - if `branch` is not specified:
1269
- - if `production` is True: `prod`
1270
- - if `production` is False: `user.<username>`
1271
- """
1272
- ...
1273
-
1274
- @typing.overload
1275
- def trigger(*, event: typing.Union[str, typing.Dict[str, typing.Any], None] = None, events: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], options: typing.Dict[str, typing.Any] = {}) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1276
- """
1277
- Specifies the event(s) that this flow depends on.
1278
-
1279
- ```
1280
- @trigger(event='foo')
1281
- ```
1282
- or
1283
- ```
1284
- @trigger(events=['foo', 'bar'])
1285
- ```
1286
-
1287
- Additionally, you can specify the parameter mappings
1288
- to map event payload to Metaflow parameters for the flow.
1289
- ```
1290
- @trigger(event={'name':'foo', 'parameters':{'flow_param': 'event_field'}})
1291
- ```
1292
- or
1293
- ```
1294
- @trigger(events=[{'name':'foo', 'parameters':{'flow_param_1': 'event_field_1'},
1295
- {'name':'bar', 'parameters':{'flow_param_2': 'event_field_2'}])
1296
- ```
1297
-
1298
- 'parameters' can also be a list of strings and tuples like so:
1299
- ```
1300
- @trigger(event={'name':'foo', 'parameters':['common_name', ('flow_param', 'event_field')]})
1301
- ```
1302
- This is equivalent to:
1303
- ```
1304
- @trigger(event={'name':'foo', 'parameters':{'common_name': 'common_name', 'flow_param': 'event_field'}})
1305
- ```
1306
-
1307
-
1308
- Parameters
1309
- ----------
1310
- event : Union[str, Dict[str, Any]], optional, default None
1311
- Event dependency for this flow.
1312
- events : List[Union[str, Dict[str, Any]]], default []
1313
- Events dependency for this flow.
1314
- options : Dict[str, Any], default {}
1315
- Backend-specific configuration for tuning eventing behavior.
1378
+
1379
+ config: dict or Callable
1380
+ Dictionary of configuration options for the datastore. The following keys are required:
1381
+ - root: The root path in the datastore where the data will be saved. (needs to be in the format expected by the datastore)
1382
+ - example: 's3://bucket-name/path/to/root'
1383
+ - example: 'gs://bucket-name/path/to/root'
1384
+ - example: 'https://myblockacc.blob.core.windows.net/metaflow/'
1385
+ - role_arn (optional): AWS IAM role to access s3 bucket (only when `type` is 's3')
1386
+ - session_vars (optional): AWS session variables to access s3 bucket (only when `type` is 's3')
1387
+ - client_params (optional): AWS client parameters to access s3 bucket (only when `type` is 's3')
1316
1388
  """
1317
1389
  ...
1318
1390
 
1319
1391
  @typing.overload
1320
- def trigger(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1321
- ...
1322
-
1323
- def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: typing.Union[str, typing.Dict[str, typing.Any], None] = None, events: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], options: typing.Dict[str, typing.Any] = {}):
1392
+ def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1324
1393
  """
1325
- Specifies the event(s) that this flow depends on.
1326
-
1327
- ```
1328
- @trigger(event='foo')
1329
- ```
1330
- or
1331
- ```
1332
- @trigger(events=['foo', 'bar'])
1333
- ```
1334
-
1335
- Additionally, you can specify the parameter mappings
1336
- to map event payload to Metaflow parameters for the flow.
1337
- ```
1338
- @trigger(event={'name':'foo', 'parameters':{'flow_param': 'event_field'}})
1339
- ```
1340
- or
1341
- ```
1342
- @trigger(events=[{'name':'foo', 'parameters':{'flow_param_1': 'event_field_1'},
1343
- {'name':'bar', 'parameters':{'flow_param_2': 'event_field_2'}])
1344
- ```
1345
-
1346
- 'parameters' can also be a list of strings and tuples like so:
1347
- ```
1348
- @trigger(event={'name':'foo', 'parameters':['common_name', ('flow_param', 'event_field')]})
1349
- ```
1350
- This is equivalent to:
1351
- ```
1352
- @trigger(event={'name':'foo', 'parameters':{'common_name': 'common_name', 'flow_param': 'event_field'}})
1353
- ```
1394
+ Specifies the PyPI packages for all steps of the flow.
1354
1395
 
1396
+ Use `@pypi_base` to set common packages required by all
1397
+ steps and use `@pypi` to specify step-specific overrides.
1355
1398
 
1356
1399
  Parameters
1357
1400
  ----------
1358
- event : Union[str, Dict[str, Any]], optional, default None
1359
- Event dependency for this flow.
1360
- events : List[Union[str, Dict[str, Any]]], default []
1361
- Events dependency for this flow.
1362
- options : Dict[str, Any], default {}
1363
- Backend-specific configuration for tuning eventing behavior.
1401
+ packages : Dict[str, str], default: {}
1402
+ Packages to use for this flow. The key is the name of the package
1403
+ and the value is the version to use.
1404
+ python : str, optional, default: None
1405
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1406
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1364
1407
  """
1365
1408
  ...
1366
1409
 
1367
1410
  @typing.overload
1368
- def conda_base(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1411
+ def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1412
+ ...
1413
+
1414
+ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1369
1415
  """
1370
- Specifies the Conda environment for all steps of the flow.
1371
-
1372
- Use `@conda_base` to set common libraries required by all
1373
- steps and use `@conda` to specify step-specific additions.
1416
+ Specifies the PyPI packages for all steps of the flow.
1374
1417
 
1418
+ Use `@pypi_base` to set common packages required by all
1419
+ steps and use `@pypi` to specify step-specific overrides.
1375
1420
 
1376
1421
  Parameters
1377
1422
  ----------
1378
- packages : Dict[str, str], default {}
1423
+ packages : Dict[str, str], default: {}
1379
1424
  Packages to use for this flow. The key is the name of the package
1380
1425
  and the value is the version to use.
1381
- libraries : Dict[str, str], default {}
1382
- Supported for backward compatibility. When used with packages, packages will take precedence.
1383
- python : str, optional, default None
1426
+ python : str, optional, default: None
1384
1427
  Version of Python to use, e.g. '3.7.4'. A default value of None implies
1385
1428
  that the version used will correspond to the version of the Python interpreter used to start the run.
1386
- disabled : bool, default False
1387
- If set to True, disables Conda.
1388
1429
  """
1389
1430
  ...
1390
1431
 
1391
- @typing.overload
1392
- def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1432
+ def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1433
+ """
1434
+ Specifies what flows belong to the same project.
1435
+
1436
+ A project-specific namespace is created for all flows that
1437
+ use the same `@project(name)`.
1438
+
1439
+
1440
+ Parameters
1441
+ ----------
1442
+ name : str
1443
+ Project name. Make sure that the name is unique amongst all
1444
+ projects that use the same production scheduler. The name may
1445
+ contain only lowercase alphanumeric characters and underscores.
1446
+
1447
+ branch : Optional[str], default None
1448
+ The branch to use. If not specified, the branch is set to
1449
+ `user.<username>` unless `production` is set to `True`. This can
1450
+ also be set on the command line using `--branch` as a top-level option.
1451
+ It is an error to specify `branch` in the decorator and on the command line.
1452
+
1453
+ production : bool, default False
1454
+ Whether or not the branch is the production branch. This can also be set on the
1455
+ command line using `--production` as a top-level option. It is an error to specify
1456
+ `production` in the decorator and on the command line.
1457
+ The project branch name will be:
1458
+ - if `branch` is specified:
1459
+ - if `production` is True: `prod.<branch>`
1460
+ - if `production` is False: `test.<branch>`
1461
+ - if `branch` is not specified:
1462
+ - if `production` is True: `prod`
1463
+ - if `production` is False: `user.<username>`
1464
+ """
1393
1465
  ...
1394
1466
 
1395
- def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
1467
+ 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]]:
1396
1468
  """
1397
- Specifies the Conda environment for all steps of the flow.
1398
-
1399
- Use `@conda_base` to set common libraries required by all
1400
- steps and use `@conda` to specify step-specific additions.
1469
+ 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.
1470
+ 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.
1401
1471
 
1402
1472
 
1403
1473
  Parameters
1404
1474
  ----------
1405
- packages : Dict[str, str], default {}
1406
- Packages to use for this flow. The key is the name of the package
1407
- and the value is the version to use.
1408
- libraries : Dict[str, str], default {}
1409
- Supported for backward compatibility. When used with packages, packages will take precedence.
1410
- python : str, optional, default None
1411
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1412
- that the version used will correspond to the version of the Python interpreter used to start the run.
1413
- disabled : bool, default False
1414
- If set to True, disables Conda.
1475
+ timeout : int
1476
+ Time, in seconds before the task times out and fails. (Default: 3600)
1477
+ poke_interval : int
1478
+ Time in seconds that the job should wait in between each try. (Default: 60)
1479
+ mode : str
1480
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1481
+ exponential_backoff : bool
1482
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1483
+ pool : str
1484
+ the slot pool this task should run in,
1485
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
1486
+ soft_fail : bool
1487
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
1488
+ name : str
1489
+ Name of the sensor on Airflow
1490
+ description : str
1491
+ Description of sensor in the Airflow UI
1492
+ external_dag_id : str
1493
+ The dag_id that contains the task you want to wait for.
1494
+ external_task_ids : List[str]
1495
+ The list of task_ids that you want to wait for.
1496
+ If None (default value) the sensor waits for the DAG. (Default: None)
1497
+ allowed_states : List[str]
1498
+ Iterable of allowed states, (Default: ['success'])
1499
+ failed_states : List[str]
1500
+ Iterable of failed or dis-allowed states. (Default: None)
1501
+ execution_delta : datetime.timedelta
1502
+ time difference with the previous execution to look at,
1503
+ the default is the same logical date as the current task or DAG. (Default: None)
1504
+ check_existence: bool
1505
+ Set to True to check if the external task exists or check if
1506
+ the DAG to wait for exists. (Default: True)
1415
1507
  """
1416
1508
  ...
1417
1509
 
@@ -1458,97 +1550,5 @@ def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, expone
1458
1550
  """
1459
1551
  ...
1460
1552
 
1461
- @typing.overload
1462
- def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1463
- """
1464
- Specifies the PyPI packages for all steps of the flow.
1465
-
1466
- Use `@pypi_base` to set common packages required by all
1467
- steps and use `@pypi` to specify step-specific overrides.
1468
-
1469
- Parameters
1470
- ----------
1471
- packages : Dict[str, str], default: {}
1472
- Packages to use for this flow. The key is the name of the package
1473
- and the value is the version to use.
1474
- python : str, optional, default: None
1475
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1476
- that the version used will correspond to the version of the Python interpreter used to start the run.
1477
- """
1478
- ...
1479
-
1480
- @typing.overload
1481
- def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1482
- ...
1483
-
1484
- def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1485
- """
1486
- Specifies the PyPI packages for all steps of the flow.
1487
-
1488
- Use `@pypi_base` to set common packages required by all
1489
- steps and use `@pypi` to specify step-specific overrides.
1490
-
1491
- Parameters
1492
- ----------
1493
- packages : Dict[str, str], default: {}
1494
- Packages to use for this flow. The key is the name of the package
1495
- and the value is the version to use.
1496
- python : str, optional, default: None
1497
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1498
- that the version used will correspond to the version of the Python interpreter used to start the run.
1499
- """
1500
- ...
1501
-
1502
- @typing.overload
1503
- 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]]:
1504
- """
1505
- Specifies the times when the flow should be run when running on a
1506
- production scheduler.
1507
-
1508
-
1509
- Parameters
1510
- ----------
1511
- hourly : bool, default False
1512
- Run the workflow hourly.
1513
- daily : bool, default True
1514
- Run the workflow daily.
1515
- weekly : bool, default False
1516
- Run the workflow weekly.
1517
- cron : str, optional, default None
1518
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1519
- specified by this expression.
1520
- timezone : str, optional, default None
1521
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1522
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1523
- """
1524
- ...
1525
-
1526
- @typing.overload
1527
- def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1528
- ...
1529
-
1530
- 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):
1531
- """
1532
- Specifies the times when the flow should be run when running on a
1533
- production scheduler.
1534
-
1535
-
1536
- Parameters
1537
- ----------
1538
- hourly : bool, default False
1539
- Run the workflow hourly.
1540
- daily : bool, default True
1541
- Run the workflow daily.
1542
- weekly : bool, default False
1543
- Run the workflow weekly.
1544
- cron : str, optional, default None
1545
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1546
- specified by this expression.
1547
- timezone : str, optional, default None
1548
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1549
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1550
- """
1551
- ...
1552
-
1553
1553
  pkg_name: str
1554
1554