ob-metaflow-stubs 6.0.4.2__py2.py3-none-any.whl → 6.0.4.3__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 (260) hide show
  1. metaflow-stubs/__init__.pyi +717 -717
  2. metaflow-stubs/cards.pyi +2 -2
  3. metaflow-stubs/cli.pyi +2 -2
  4. metaflow-stubs/cli_components/__init__.pyi +2 -2
  5. metaflow-stubs/cli_components/utils.pyi +2 -2
  6. metaflow-stubs/client/__init__.pyi +2 -2
  7. metaflow-stubs/client/core.pyi +5 -5
  8. metaflow-stubs/client/filecache.pyi +3 -3
  9. metaflow-stubs/events.pyi +3 -3
  10. metaflow-stubs/exception.pyi +2 -2
  11. metaflow-stubs/flowspec.pyi +5 -5
  12. metaflow-stubs/generated_for.txt +1 -1
  13. metaflow-stubs/includefile.pyi +3 -3
  14. metaflow-stubs/meta_files.pyi +2 -2
  15. metaflow-stubs/metadata_provider/__init__.pyi +2 -2
  16. metaflow-stubs/metadata_provider/heartbeat.pyi +2 -2
  17. metaflow-stubs/metadata_provider/metadata.pyi +2 -2
  18. metaflow-stubs/metadata_provider/util.pyi +2 -2
  19. metaflow-stubs/metaflow_config.pyi +2 -2
  20. metaflow-stubs/metaflow_current.pyi +51 -51
  21. metaflow-stubs/metaflow_git.pyi +2 -2
  22. metaflow-stubs/mf_extensions/__init__.pyi +2 -2
  23. metaflow-stubs/mf_extensions/obcheckpoint/__init__.pyi +2 -2
  24. metaflow-stubs/mf_extensions/obcheckpoint/plugins/__init__.pyi +2 -2
  25. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/__init__.pyi +2 -2
  26. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/__init__.pyi +2 -2
  27. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/async_cards.pyi +2 -2
  28. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/deco_injection_mixin.pyi +2 -2
  29. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/extra_components.pyi +2 -2
  30. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/__init__.pyi +2 -2
  31. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/__init__.pyi +2 -2
  32. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/checkpoint_lister.pyi +4 -4
  33. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/lineage_card.pyi +2 -2
  34. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +4 -4
  35. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +2 -2
  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 +2 -2
  39. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +2 -2
  40. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/lineage.pyi +2 -2
  41. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +2 -2
  42. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/context.pyi +2 -2
  43. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +3 -3
  44. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/decorator.pyi +2 -2
  45. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +2 -2
  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 +2 -2
  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 +2 -2
  50. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/hf_hub/__init__.pyi +2 -2
  51. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/hf_hub/decorator.pyi +3 -3
  52. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/__init__.pyi +2 -2
  53. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/core.pyi +3 -3
  54. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/exceptions.pyi +2 -2
  55. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/model_storage.pyi +4 -4
  56. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +2 -2
  57. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +2 -2
  58. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +2 -2
  59. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +2 -2
  60. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/__init__.pyi +2 -2
  61. metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/base.pyi +2 -2
  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 +2 -2
  65. metaflow-stubs/mf_extensions/outerbounds/plugins/__init__.pyi +2 -2
  66. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/__init__.pyi +2 -2
  67. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/__init__.pyi +2 -2
  68. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_state_machine.pyi +2 -2
  69. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_vendor/__init__.pyi +2 -2
  70. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_vendor/spinner/__init__.pyi +2 -2
  71. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_vendor/spinner/spinners.pyi +2 -2
  72. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/app_cli.pyi +3 -3
  73. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/app_config.pyi +2 -2
  74. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/capsule.pyi +4 -4
  75. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/click_importer.pyi +2 -2
  76. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/code_package/__init__.pyi +2 -2
  77. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/code_package/code_packager.pyi +3 -3
  78. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/__init__.pyi +2 -2
  79. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/cli_generator.pyi +2 -2
  80. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/config_utils.pyi +4 -4
  81. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/schema_export.pyi +2 -2
  82. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/typed_configs.pyi +3 -3
  83. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/unified_config.pyi +3 -3
  84. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/dependencies.pyi +2 -2
  85. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/deployer.pyi +5 -5
  86. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/experimental/__init__.pyi +2 -2
  87. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/perimeters.pyi +2 -2
  88. metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/utils.pyi +3 -3
  89. metaflow-stubs/mf_extensions/outerbounds/plugins/aws/__init__.pyi +2 -2
  90. metaflow-stubs/mf_extensions/outerbounds/plugins/aws/assume_role_decorator.pyi +2 -2
  91. metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/__init__.pyi +2 -2
  92. metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/async_cards.pyi +2 -2
  93. metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/injector.pyi +2 -2
  94. metaflow-stubs/mf_extensions/outerbounds/plugins/checkpoint_datastores/__init__.pyi +2 -2
  95. metaflow-stubs/mf_extensions/outerbounds/plugins/checkpoint_datastores/coreweave.pyi +2 -2
  96. metaflow-stubs/mf_extensions/outerbounds/plugins/checkpoint_datastores/nebius.pyi +2 -2
  97. metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/__init__.pyi +2 -2
  98. metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/baker.pyi +3 -3
  99. metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/docker_environment.pyi +2 -2
  100. metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/fast_bakery.pyi +2 -2
  101. metaflow-stubs/mf_extensions/outerbounds/plugins/kubernetes/__init__.pyi +2 -2
  102. metaflow-stubs/mf_extensions/outerbounds/plugins/kubernetes/pod_killer.pyi +2 -2
  103. metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/__init__.pyi +2 -2
  104. metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/constants.pyi +2 -2
  105. metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/exceptions.pyi +2 -2
  106. metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/ollama.pyi +2 -2
  107. metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/status_card.pyi +2 -2
  108. metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/__init__.pyi +2 -2
  109. metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/snowflake.pyi +2 -2
  110. metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +2 -2
  111. metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +2 -2
  112. metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +2 -2
  113. metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +2 -2
  114. metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +2 -2
  115. metaflow-stubs/multicore_utils.pyi +2 -2
  116. metaflow-stubs/ob_internal.pyi +2 -2
  117. metaflow-stubs/packaging_sys/__init__.pyi +7 -7
  118. metaflow-stubs/packaging_sys/backend.pyi +2 -2
  119. metaflow-stubs/packaging_sys/distribution_support.pyi +3 -3
  120. metaflow-stubs/packaging_sys/tar_backend.pyi +3 -3
  121. metaflow-stubs/packaging_sys/utils.pyi +2 -2
  122. metaflow-stubs/packaging_sys/v1.pyi +2 -2
  123. metaflow-stubs/parameters.pyi +3 -3
  124. metaflow-stubs/plugins/__init__.pyi +13 -13
  125. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  126. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  127. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  128. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
  129. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
  130. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
  131. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
  132. metaflow-stubs/plugins/argo/__init__.pyi +2 -2
  133. metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
  134. metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
  135. metaflow-stubs/plugins/argo/argo_workflows.pyi +2 -2
  136. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +3 -3
  137. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
  138. metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +3 -3
  139. metaflow-stubs/plugins/argo/exit_hooks.pyi +2 -2
  140. metaflow-stubs/plugins/aws/__init__.pyi +2 -2
  141. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  142. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  143. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  144. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  145. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  146. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -2
  147. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  148. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +3 -3
  149. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
  150. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  151. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
  152. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
  153. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  154. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +3 -3
  155. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +2 -2
  156. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  157. metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
  158. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  159. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +3 -3
  160. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  161. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  162. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  163. metaflow-stubs/plugins/cards/__init__.pyi +6 -6
  164. metaflow-stubs/plugins/cards/card_client.pyi +2 -2
  165. metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
  166. metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
  167. metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
  168. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  169. metaflow-stubs/plugins/cards/card_modules/basic.pyi +2 -2
  170. metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
  171. metaflow-stubs/plugins/cards/card_modules/components.pyi +3 -3
  172. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
  173. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  174. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
  175. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  176. metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
  177. metaflow-stubs/plugins/cards/exception.pyi +2 -2
  178. metaflow-stubs/plugins/catch_decorator.pyi +2 -2
  179. metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
  180. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  181. metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
  182. metaflow-stubs/plugins/datatools/s3/s3.pyi +3 -3
  183. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  184. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  185. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  186. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  187. metaflow-stubs/plugins/environment_decorator.pyi +2 -2
  188. metaflow-stubs/plugins/events_decorator.pyi +2 -2
  189. metaflow-stubs/plugins/exit_hook/__init__.pyi +2 -2
  190. metaflow-stubs/plugins/exit_hook/exit_hook_decorator.pyi +2 -2
  191. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  192. metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
  193. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  194. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +3 -3
  195. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  196. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  197. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  198. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  199. metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
  200. metaflow-stubs/plugins/kubernetes/kube_utils.pyi +2 -2
  201. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
  202. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  203. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
  204. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
  205. metaflow-stubs/plugins/kubernetes/spot_monitor_sidecar.pyi +2 -2
  206. metaflow-stubs/plugins/ollama/__init__.pyi +3 -3
  207. metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
  208. metaflow-stubs/plugins/perimeters.pyi +2 -2
  209. metaflow-stubs/plugins/project_decorator.pyi +2 -2
  210. metaflow-stubs/plugins/pypi/__init__.pyi +3 -3
  211. metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
  212. metaflow-stubs/plugins/pypi/conda_environment.pyi +3 -3
  213. metaflow-stubs/plugins/pypi/parsers.pyi +2 -2
  214. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
  215. metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
  216. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  217. metaflow-stubs/plugins/resources_decorator.pyi +2 -2
  218. metaflow-stubs/plugins/retry_decorator.pyi +2 -2
  219. metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
  220. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +3 -3
  221. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
  222. metaflow-stubs/plugins/secrets/secrets_func.pyi +2 -2
  223. metaflow-stubs/plugins/secrets/secrets_spec.pyi +2 -2
  224. metaflow-stubs/plugins/secrets/utils.pyi +2 -2
  225. metaflow-stubs/plugins/snowflake/__init__.pyi +2 -2
  226. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  227. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +3 -3
  228. metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
  229. metaflow-stubs/plugins/torchtune/__init__.pyi +2 -2
  230. metaflow-stubs/plugins/uv/__init__.pyi +2 -2
  231. metaflow-stubs/plugins/uv/uv_environment.pyi +2 -2
  232. metaflow-stubs/profilers/__init__.pyi +2 -2
  233. metaflow-stubs/pylint_wrapper.pyi +2 -2
  234. metaflow-stubs/runner/__init__.pyi +2 -2
  235. metaflow-stubs/runner/deployer.pyi +28 -28
  236. metaflow-stubs/runner/deployer_impl.pyi +3 -3
  237. metaflow-stubs/runner/metaflow_runner.pyi +3 -3
  238. metaflow-stubs/runner/nbdeploy.pyi +2 -2
  239. metaflow-stubs/runner/nbrun.pyi +2 -2
  240. metaflow-stubs/runner/subprocess_manager.pyi +2 -2
  241. metaflow-stubs/runner/utils.pyi +3 -3
  242. metaflow-stubs/system/__init__.pyi +2 -2
  243. metaflow-stubs/system/system_logger.pyi +3 -3
  244. metaflow-stubs/system/system_monitor.pyi +2 -2
  245. metaflow-stubs/tagging_util.pyi +2 -2
  246. metaflow-stubs/tuple_util.pyi +2 -2
  247. metaflow-stubs/user_configs/__init__.pyi +2 -2
  248. metaflow-stubs/user_configs/config_options.pyi +3 -3
  249. metaflow-stubs/user_configs/config_parameters.pyi +5 -5
  250. metaflow-stubs/user_decorators/__init__.pyi +2 -2
  251. metaflow-stubs/user_decorators/common.pyi +2 -2
  252. metaflow-stubs/user_decorators/mutable_flow.pyi +5 -5
  253. metaflow-stubs/user_decorators/mutable_step.pyi +4 -4
  254. metaflow-stubs/user_decorators/user_flow_decorator.pyi +4 -4
  255. metaflow-stubs/user_decorators/user_step_decorator.pyi +3 -3
  256. {ob_metaflow_stubs-6.0.4.2.dist-info → ob_metaflow_stubs-6.0.4.3.dist-info}/METADATA +1 -1
  257. ob_metaflow_stubs-6.0.4.3.dist-info/RECORD +260 -0
  258. ob_metaflow_stubs-6.0.4.2.dist-info/RECORD +0 -260
  259. {ob_metaflow_stubs-6.0.4.2.dist-info → ob_metaflow_stubs-6.0.4.3.dist-info}/WHEEL +0 -0
  260. {ob_metaflow_stubs-6.0.4.2.dist-info → ob_metaflow_stubs-6.0.4.3.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  ######################################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.16.0.1+obcheckpoint(0.2.4);ob(v1) #
4
- # Generated on 2025-07-15T03:12:46.861592 #
3
+ # MF version: 2.16.1.1+obcheckpoint(0.2.4);ob(v1) #
4
+ # Generated on 2025-07-15T20:32:21.659179 #
5
5
  ######################################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -48,8 +48,8 @@ from . import plugins as plugins
48
48
  from .mf_extensions.outerbounds.toplevel.global_aliases_for_metaflow_package import S3 as S3
49
49
  from . import includefile as includefile
50
50
  from .includefile import IncludeFile as IncludeFile
51
- from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
52
51
  from .plugins.pypi.parsers import requirements_txt_parser as requirements_txt_parser
52
+ from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
53
53
  from .plugins.pypi.parsers import conda_environment_yml_parser as conda_environment_yml_parser
54
54
  from . import client as client
55
55
  from .client.core import namespace as namespace
@@ -163,140 +163,119 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
163
163
  ...
164
164
 
165
165
  @typing.overload
166
- 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]]]:
166
+ 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]]]:
167
167
  """
168
- Specifies a timeout for your step.
169
-
170
- This decorator is useful if this step may hang indefinitely.
171
-
172
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
173
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
174
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
168
+ Creates a human-readable report, a Metaflow Card, after this step completes.
175
169
 
176
- Note that all the values specified in parameters are added together so if you specify
177
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
170
+ Note that you may add multiple `@card` decorators in a step with different parameters.
178
171
 
179
172
 
180
173
  Parameters
181
174
  ----------
182
- seconds : int, default 0
183
- Number of seconds to wait prior to timing out.
184
- minutes : int, default 0
185
- Number of minutes to wait prior to timing out.
186
- hours : int, default 0
187
- Number of hours to wait prior to timing out.
175
+ type : str, default 'default'
176
+ Card type.
177
+ id : str, optional, default None
178
+ If multiple cards are present, use this id to identify this card.
179
+ options : Dict[str, Any], default {}
180
+ Options passed to the card. The contents depend on the card type.
181
+ timeout : int, default 45
182
+ Interrupt reporting if it takes more than this many seconds.
188
183
  """
189
184
  ...
190
185
 
191
186
  @typing.overload
192
- def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
187
+ def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
193
188
  ...
194
189
 
195
190
  @typing.overload
196
- def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
191
+ def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
197
192
  ...
198
193
 
199
- 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):
194
+ 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):
200
195
  """
201
- Specifies a timeout for your step.
202
-
203
- This decorator is useful if this step may hang indefinitely.
204
-
205
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
206
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
207
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
196
+ Creates a human-readable report, a Metaflow Card, after this step completes.
208
197
 
209
- Note that all the values specified in parameters are added together so if you specify
210
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
198
+ Note that you may add multiple `@card` decorators in a step with different parameters.
211
199
 
212
200
 
213
201
  Parameters
214
202
  ----------
215
- seconds : int, default 0
216
- Number of seconds to wait prior to timing out.
217
- minutes : int, default 0
218
- Number of minutes to wait prior to timing out.
219
- hours : int, default 0
220
- Number of hours to wait prior to timing out.
203
+ type : str, default 'default'
204
+ Card type.
205
+ id : str, optional, default None
206
+ If multiple cards are present, use this id to identify this card.
207
+ options : Dict[str, Any], default {}
208
+ Options passed to the card. The contents depend on the card type.
209
+ timeout : int, default 45
210
+ Interrupt reporting if it takes more than this many seconds.
221
211
  """
222
212
  ...
223
213
 
224
214
  @typing.overload
225
- def resources(*, cpu: int = 1, gpu: typing.Optional[int] = None, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
215
+ def app_deploy(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
226
216
  """
227
- Specifies the resources needed when executing this step.
217
+ Decorator prototype for all step decorators. This function gets specialized
218
+ and imported for all decorators types by _import_plugin_decorators().
219
+ """
220
+ ...
221
+
222
+ @typing.overload
223
+ def app_deploy(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
224
+ ...
225
+
226
+ def app_deploy(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
227
+ """
228
+ Decorator prototype for all step decorators. This function gets specialized
229
+ and imported for all decorators types by _import_plugin_decorators().
230
+ """
231
+ ...
232
+
233
+ 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]]]:
234
+ """
235
+ Specifies that this step should execute on DGX cloud.
228
236
 
229
- Use `@resources` to specify the resource requirements
230
- independently of the specific compute layer (`@batch`, `@kubernetes`).
231
237
 
232
- You can choose the compute layer on the command line by executing e.g.
233
- ```
234
- python myflow.py run --with batch
235
- ```
236
- or
237
- ```
238
- python myflow.py run --with kubernetes
239
- ```
240
- which executes the flow on the desired system using the
241
- requirements specified in `@resources`.
238
+ Parameters
239
+ ----------
240
+ gpu : int
241
+ Number of GPUs to use.
242
+ gpu_type : str
243
+ Type of Nvidia GPU to use.
244
+ queue_timeout : int
245
+ Time to keep the job in NVCF's queue.
246
+ """
247
+ ...
248
+
249
+ @typing.overload
250
+ 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]]]:
251
+ """
252
+ Specifies environment variables to be set prior to the execution of a step.
242
253
 
243
254
 
244
255
  Parameters
245
256
  ----------
246
- cpu : int, default 1
247
- Number of CPUs required for this step.
248
- gpu : int, optional, default None
249
- Number of GPUs required for this step.
250
- disk : int, optional, default None
251
- Disk size (in MB) required for this step. Only applies on Kubernetes.
252
- memory : int, default 4096
253
- Memory size (in MB) required for this step.
254
- shared_memory : int, optional, default None
255
- The value for the size (in MiB) of the /dev/shm volume for this step.
256
- This parameter maps to the `--shm-size` option in Docker.
257
+ vars : Dict[str, str], default {}
258
+ Dictionary of environment variables to set.
257
259
  """
258
260
  ...
259
261
 
260
262
  @typing.overload
261
- def resources(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
263
+ def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
262
264
  ...
263
265
 
264
266
  @typing.overload
265
- def resources(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
267
+ def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
266
268
  ...
267
269
 
268
- def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, cpu: int = 1, gpu: typing.Optional[int] = None, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None):
270
+ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
269
271
  """
270
- Specifies the resources needed when executing this step.
271
-
272
- Use `@resources` to specify the resource requirements
273
- independently of the specific compute layer (`@batch`, `@kubernetes`).
274
-
275
- You can choose the compute layer on the command line by executing e.g.
276
- ```
277
- python myflow.py run --with batch
278
- ```
279
- or
280
- ```
281
- python myflow.py run --with kubernetes
282
- ```
283
- which executes the flow on the desired system using the
284
- requirements specified in `@resources`.
272
+ Specifies environment variables to be set prior to the execution of a step.
285
273
 
286
274
 
287
275
  Parameters
288
276
  ----------
289
- cpu : int, default 1
290
- Number of CPUs required for this step.
291
- gpu : int, optional, default None
292
- Number of GPUs required for this step.
293
- disk : int, optional, default None
294
- Disk size (in MB) required for this step. Only applies on Kubernetes.
295
- memory : int, default 4096
296
- Memory size (in MB) required for this step.
297
- shared_memory : int, optional, default None
298
- The value for the size (in MiB) of the /dev/shm volume for this step.
299
- This parameter maps to the `--shm-size` option in Docker.
277
+ vars : Dict[str, str], default {}
278
+ Dictionary of environment variables to set.
300
279
  """
301
280
  ...
302
281
 
@@ -447,173 +426,60 @@ def checkpoint(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None
447
426
  """
448
427
  ...
449
428
 
450
- 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]]]:
451
- """
452
- Specifies that this step should execute on DGX cloud.
453
-
454
-
455
- Parameters
456
- ----------
457
- gpu : int
458
- Number of GPUs to use.
459
- gpu_type : str
460
- Type of Nvidia GPU to use.
461
- queue_timeout : int
462
- Time to keep the job in NVCF's queue.
463
- """
464
- ...
465
-
466
- @typing.overload
467
- def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
468
- """
469
- Internal decorator to support Fast bakery
470
- """
471
- ...
472
-
473
- @typing.overload
474
- def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
475
- ...
476
-
477
- def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
478
- """
479
- Internal decorator to support Fast bakery
480
- """
481
- ...
482
-
483
429
  @typing.overload
484
- 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]]]:
430
+ 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]]]:
485
431
  """
486
- Specifies the Conda environment for the step.
432
+ Specifies that the step will success under all circumstances.
487
433
 
488
- Information in this decorator will augment any
489
- attributes set in the `@conda_base` flow-level decorator. Hence,
490
- you can use `@conda_base` to set packages required by all
491
- steps and use `@conda` to specify step-specific overrides.
434
+ The decorator will create an optional artifact, specified by `var`, which
435
+ contains the exception raised. You can use it to detect the presence
436
+ of errors, indicating that all happy-path artifacts produced by the step
437
+ are missing.
492
438
 
493
439
 
494
440
  Parameters
495
441
  ----------
496
- packages : Dict[str, str], default {}
497
- Packages to use for this step. The key is the name of the package
498
- and the value is the version to use.
499
- libraries : Dict[str, str], default {}
500
- Supported for backward compatibility. When used with packages, packages will take precedence.
501
- python : str, optional, default None
502
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
503
- that the version used will correspond to the version of the Python interpreter used to start the run.
504
- disabled : bool, default False
505
- If set to True, disables @conda.
442
+ var : str, optional, default None
443
+ Name of the artifact in which to store the caught exception.
444
+ If not specified, the exception is not stored.
445
+ print_exception : bool, default True
446
+ Determines whether or not the exception is printed to
447
+ stdout when caught.
506
448
  """
507
449
  ...
508
450
 
509
451
  @typing.overload
510
- def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
452
+ def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
511
453
  ...
512
454
 
513
455
  @typing.overload
514
- def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
456
+ def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
515
457
  ...
516
458
 
517
- 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):
459
+ 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):
518
460
  """
519
- Specifies the Conda environment for the step.
461
+ Specifies that the step will success under all circumstances.
520
462
 
521
- Information in this decorator will augment any
522
- attributes set in the `@conda_base` flow-level decorator. Hence,
523
- you can use `@conda_base` to set packages required by all
524
- steps and use `@conda` to specify step-specific overrides.
463
+ The decorator will create an optional artifact, specified by `var`, which
464
+ contains the exception raised. You can use it to detect the presence
465
+ of errors, indicating that all happy-path artifacts produced by the step
466
+ are missing.
525
467
 
526
468
 
527
469
  Parameters
528
470
  ----------
529
- packages : Dict[str, str], default {}
530
- Packages to use for this step. The key is the name of the package
531
- and the value is the version to use.
532
- libraries : Dict[str, str], default {}
533
- Supported for backward compatibility. When used with packages, packages will take precedence.
534
- python : str, optional, default None
535
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
536
- that the version used will correspond to the version of the Python interpreter used to start the run.
537
- disabled : bool, default False
538
- If set to True, disables @conda.
471
+ var : str, optional, default None
472
+ Name of the artifact in which to store the caught exception.
473
+ If not specified, the exception is not stored.
474
+ print_exception : bool, default True
475
+ Determines whether or not the exception is printed to
476
+ stdout when caught.
539
477
  """
540
478
  ...
541
479
 
542
- @typing.overload
543
- def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], role: typing.Optional[str] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
480
+ 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]]]:
544
481
  """
545
- Specifies secrets to be retrieved and injected as environment variables prior to
546
- the execution of a step.
547
-
548
-
549
- Parameters
550
- ----------
551
- sources : List[Union[str, Dict[str, Any]]], default: []
552
- List of secret specs, defining how the secrets are to be retrieved
553
- role : str, optional, default: None
554
- Role to use for fetching secrets
555
- """
556
- ...
557
-
558
- @typing.overload
559
- def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
560
- ...
561
-
562
- @typing.overload
563
- def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
564
- ...
565
-
566
- def secrets(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], role: typing.Optional[str] = None):
567
- """
568
- Specifies secrets to be retrieved and injected as environment variables prior to
569
- the execution of a step.
570
-
571
-
572
- Parameters
573
- ----------
574
- sources : List[Union[str, Dict[str, Any]]], default: []
575
- List of secret specs, defining how the secrets are to be retrieved
576
- role : str, optional, default: None
577
- Role to use for fetching secrets
578
- """
579
- ...
580
-
581
- @typing.overload
582
- 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]]]:
583
- """
584
- Specifies environment variables to be set prior to the execution of a step.
585
-
586
-
587
- Parameters
588
- ----------
589
- vars : Dict[str, str], default {}
590
- Dictionary of environment variables to set.
591
- """
592
- ...
593
-
594
- @typing.overload
595
- def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
596
- ...
597
-
598
- @typing.overload
599
- def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
600
- ...
601
-
602
- def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
603
- """
604
- Specifies environment variables to be set prior to the execution of a step.
605
-
606
-
607
- Parameters
608
- ----------
609
- vars : Dict[str, str], default {}
610
- Dictionary of environment variables to set.
611
- """
612
- ...
613
-
614
- 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]]]:
615
- """
616
- Specifies that this step should execute on Kubernetes.
482
+ Specifies that this step should execute on Kubernetes.
617
483
 
618
484
 
619
485
  Parameters
@@ -700,105 +566,6 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
700
566
  """
701
567
  ...
702
568
 
703
- @typing.overload
704
- def app_deploy(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
705
- """
706
- Decorator prototype for all step decorators. This function gets specialized
707
- and imported for all decorators types by _import_plugin_decorators().
708
- """
709
- ...
710
-
711
- @typing.overload
712
- def app_deploy(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
713
- ...
714
-
715
- def app_deploy(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
716
- """
717
- Decorator prototype for all step decorators. This function gets specialized
718
- and imported for all decorators types by _import_plugin_decorators().
719
- """
720
- ...
721
-
722
- def huggingface_hub(*, temp_dir_root: typing.Optional[str] = None, load: typing.Union[typing.List[str], typing.List[typing.Tuple[typing.Dict, str]], typing.List[typing.Tuple[str, str]], typing.List[typing.Dict], None]) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
723
- """
724
- Decorator that helps cache, version and store models/datasets from huggingface hub.
725
-
726
- > Examples
727
-
728
- **Usage: creating references of models from huggingface that may be loaded in downstream steps**
729
- ```python
730
- @huggingface_hub
731
- @step
732
- def pull_model_from_huggingface(self):
733
- # `current.huggingface_hub.snapshot_download` downloads the model from the Hugging Face Hub
734
- # and saves it in the backend storage based on the model's `repo_id`. If there exists a model
735
- # with the same `repo_id` in the backend storage, it will not download the model again. The return
736
- # value of the function is a reference to the model in the backend storage.
737
- # This reference can be used to load the model in the subsequent steps via `@model(load=["llama_model"])`
738
-
739
- self.model_id = "mistralai/Mistral-7B-Instruct-v0.1"
740
- self.llama_model = current.huggingface_hub.snapshot_download(
741
- repo_id=self.model_id,
742
- allow_patterns=["*.safetensors", "*.json", "tokenizer.*"],
743
- )
744
- self.next(self.train)
745
- ```
746
-
747
- **Usage: loading models directly from huggingface hub or from cache (from metaflow's datastore)**
748
- ```python
749
- @huggingface_hub(load=["mistralai/Mistral-7B-Instruct-v0.1"])
750
- @step
751
- def pull_model_from_huggingface(self):
752
- path_to_model = current.huggingface_hub.loaded["mistralai/Mistral-7B-Instruct-v0.1"]
753
- ```
754
-
755
- ```python
756
- @huggingface_hub(load=[("mistralai/Mistral-7B-Instruct-v0.1", "/my-directory"), ("myorg/mistral-lora, "/my-lora-directory")])
757
- @step
758
- def finetune_model(self):
759
- path_to_model = current.huggingface_hub.loaded["mistralai/Mistral-7B-Instruct-v0.1"]
760
- # path_to_model will be /my-directory
761
- ```
762
-
763
- ```python
764
- # Takes all the arguments passed to `snapshot_download`
765
- # except for `local_dir`
766
- @huggingface_hub(load=[
767
- {
768
- "repo_id": "mistralai/Mistral-7B-Instruct-v0.1",
769
- },
770
- {
771
- "repo_id": "myorg/mistral-lora",
772
- "repo_type": "model",
773
- },
774
- ])
775
- @step
776
- def finetune_model(self):
777
- path_to_model = current.huggingface_hub.loaded["mistralai/Mistral-7B-Instruct-v0.1"]
778
- # path_to_model will be /my-directory
779
- ```
780
-
781
-
782
- Parameters
783
- ----------
784
- temp_dir_root : str, optional
785
- The root directory that will hold the temporary directory where objects will be downloaded.
786
-
787
- load: Union[List[str], List[Tuple[Dict, str]], List[Tuple[str, str]], List[Dict], None]
788
- The list of repos (models/datasets) to load.
789
-
790
- Loaded repos can be accessed via `current.huggingface_hub.loaded`. If load is set, then the following happens:
791
-
792
- - If repo (model/dataset) is not found in the datastore:
793
- - Downloads the repo from Hugging Face Hub to a temporary directory (or uses specified path) for local access
794
- - Stores it in Metaflow's datastore (s3/gcs/azure etc.) with a unique name based on repo_type/repo_id
795
- - All HF models loaded for a `@step` will be cached separately under flow/step/namespace.
796
-
797
- - If repo is found in the datastore:
798
- - Loads it directly from datastore to local path (can be temporary directory or specified path)
799
- """
800
- ...
801
-
802
569
  @typing.overload
803
570
  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]]]:
804
571
  """
@@ -929,110 +696,351 @@ def model(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
929
696
  ...
930
697
 
931
698
  @typing.overload
932
- 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]]]:
699
+ 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]]]:
933
700
  """
934
- Specifies that the step will success under all circumstances.
701
+ Specifies the PyPI packages for the step.
935
702
 
936
- The decorator will create an optional artifact, specified by `var`, which
937
- contains the exception raised. You can use it to detect the presence
938
- of errors, indicating that all happy-path artifacts produced by the step
939
- are missing.
703
+ Information in this decorator will augment any
704
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
705
+ you can use `@pypi_base` to set packages required by all
706
+ steps and use `@pypi` to specify step-specific overrides.
940
707
 
941
708
 
942
709
  Parameters
943
710
  ----------
944
- var : str, optional, default None
945
- Name of the artifact in which to store the caught exception.
946
- If not specified, the exception is not stored.
947
- print_exception : bool, default True
948
- Determines whether or not the exception is printed to
949
- stdout when caught.
711
+ packages : Dict[str, str], default: {}
712
+ Packages to use for this step. The key is the name of the package
713
+ and the value is the version to use.
714
+ python : str, optional, default: None
715
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
716
+ that the version used will correspond to the version of the Python interpreter used to start the run.
950
717
  """
951
718
  ...
952
719
 
953
720
  @typing.overload
954
- def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
721
+ def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
955
722
  ...
956
723
 
957
724
  @typing.overload
958
- def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
725
+ def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
959
726
  ...
960
727
 
961
- 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):
728
+ 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):
962
729
  """
963
- Specifies that the step will success under all circumstances.
730
+ Specifies the PyPI packages for the step.
964
731
 
965
- The decorator will create an optional artifact, specified by `var`, which
966
- contains the exception raised. You can use it to detect the presence
967
- of errors, indicating that all happy-path artifacts produced by the step
968
- are missing.
732
+ Information in this decorator will augment any
733
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
734
+ you can use `@pypi_base` to set packages required by all
735
+ steps and use `@pypi` to specify step-specific overrides.
969
736
 
970
737
 
971
738
  Parameters
972
739
  ----------
973
- var : str, optional, default None
974
- Name of the artifact in which to store the caught exception.
975
- If not specified, the exception is not stored.
976
- print_exception : bool, default True
977
- Determines whether or not the exception is printed to
978
- stdout when caught.
740
+ packages : Dict[str, str], default: {}
741
+ Packages to use for this step. The key is the name of the package
742
+ and the value is the version to use.
743
+ python : str, optional, default: None
744
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
745
+ that the version used will correspond to the version of the Python interpreter used to start the run.
979
746
  """
980
747
  ...
981
748
 
982
- def nvct(*, gpu: int, gpu_type: str) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
749
+ def huggingface_hub(*, temp_dir_root: typing.Optional[str] = None, load: typing.Union[typing.List[str], typing.List[typing.Tuple[typing.Dict, str]], typing.List[typing.Tuple[str, str]], typing.List[typing.Dict], None]) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
983
750
  """
984
- Specifies that this step should execute on DGX cloud.
985
-
751
+ Decorator that helps cache, version and store models/datasets from huggingface hub.
986
752
 
987
- Parameters
988
- ----------
989
- gpu : int
990
- Number of GPUs to use.
991
- gpu_type : str
992
- Type of Nvidia GPU to use.
993
- """
994
- ...
995
-
996
- 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]]]:
997
- """
998
- This decorator is used to run Ollama APIs as Metaflow task sidecars.
753
+ > Examples
999
754
 
1000
- User code call
1001
- --------------
1002
- @ollama(
1003
- models=[...],
1004
- ...
1005
- )
755
+ **Usage: creating references of models from huggingface that may be loaded in downstream steps**
756
+ ```python
757
+ @huggingface_hub
758
+ @step
759
+ def pull_model_from_huggingface(self):
760
+ # `current.huggingface_hub.snapshot_download` downloads the model from the Hugging Face Hub
761
+ # and saves it in the backend storage based on the model's `repo_id`. If there exists a model
762
+ # with the same `repo_id` in the backend storage, it will not download the model again. The return
763
+ # value of the function is a reference to the model in the backend storage.
764
+ # This reference can be used to load the model in the subsequent steps via `@model(load=["llama_model"])`
1006
765
 
1007
- Valid backend options
766
+ self.model_id = "mistralai/Mistral-7B-Instruct-v0.1"
767
+ self.llama_model = current.huggingface_hub.snapshot_download(
768
+ repo_id=self.model_id,
769
+ allow_patterns=["*.safetensors", "*.json", "tokenizer.*"],
770
+ )
771
+ self.next(self.train)
772
+ ```
773
+
774
+ **Usage: loading models directly from huggingface hub or from cache (from metaflow's datastore)**
775
+ ```python
776
+ @huggingface_hub(load=["mistralai/Mistral-7B-Instruct-v0.1"])
777
+ @step
778
+ def pull_model_from_huggingface(self):
779
+ path_to_model = current.huggingface_hub.loaded["mistralai/Mistral-7B-Instruct-v0.1"]
780
+ ```
781
+
782
+ ```python
783
+ @huggingface_hub(load=[("mistralai/Mistral-7B-Instruct-v0.1", "/my-directory"), ("myorg/mistral-lora, "/my-lora-directory")])
784
+ @step
785
+ def finetune_model(self):
786
+ path_to_model = current.huggingface_hub.loaded["mistralai/Mistral-7B-Instruct-v0.1"]
787
+ # path_to_model will be /my-directory
788
+ ```
789
+
790
+ ```python
791
+ # Takes all the arguments passed to `snapshot_download`
792
+ # except for `local_dir`
793
+ @huggingface_hub(load=[
794
+ {
795
+ "repo_id": "mistralai/Mistral-7B-Instruct-v0.1",
796
+ },
797
+ {
798
+ "repo_id": "myorg/mistral-lora",
799
+ "repo_type": "model",
800
+ },
801
+ ])
802
+ @step
803
+ def finetune_model(self):
804
+ path_to_model = current.huggingface_hub.loaded["mistralai/Mistral-7B-Instruct-v0.1"]
805
+ # path_to_model will be /my-directory
806
+ ```
807
+
808
+
809
+ Parameters
810
+ ----------
811
+ temp_dir_root : str, optional
812
+ The root directory that will hold the temporary directory where objects will be downloaded.
813
+
814
+ load: Union[List[str], List[Tuple[Dict, str]], List[Tuple[str, str]], List[Dict], None]
815
+ The list of repos (models/datasets) to load.
816
+
817
+ Loaded repos can be accessed via `current.huggingface_hub.loaded`. If load is set, then the following happens:
818
+
819
+ - If repo (model/dataset) is not found in the datastore:
820
+ - Downloads the repo from Hugging Face Hub to a temporary directory (or uses specified path) for local access
821
+ - Stores it in Metaflow's datastore (s3/gcs/azure etc.) with a unique name based on repo_type/repo_id
822
+ - All HF models loaded for a `@step` will be cached separately under flow/step/namespace.
823
+
824
+ - If repo is found in the datastore:
825
+ - Loads it directly from datastore to local path (can be temporary directory or specified path)
826
+ """
827
+ ...
828
+
829
+ @typing.overload
830
+ def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
831
+ """
832
+ Internal decorator to support Fast bakery
833
+ """
834
+ ...
835
+
836
+ @typing.overload
837
+ def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
838
+ ...
839
+
840
+ def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
841
+ """
842
+ Internal decorator to support Fast bakery
843
+ """
844
+ ...
845
+
846
+ @typing.overload
847
+ def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
848
+ """
849
+ Decorator prototype for all step decorators. This function gets specialized
850
+ and imported for all decorators types by _import_plugin_decorators().
851
+ """
852
+ ...
853
+
854
+ @typing.overload
855
+ def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
856
+ ...
857
+
858
+ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
859
+ """
860
+ Decorator prototype for all step decorators. This function gets specialized
861
+ and imported for all decorators types by _import_plugin_decorators().
862
+ """
863
+ ...
864
+
865
+ @typing.overload
866
+ 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]]]:
867
+ """
868
+ Specifies the Conda environment for the step.
869
+
870
+ Information in this decorator will augment any
871
+ attributes set in the `@conda_base` flow-level decorator. Hence,
872
+ you can use `@conda_base` to set packages required by all
873
+ steps and use `@conda` to specify step-specific overrides.
874
+
875
+
876
+ Parameters
877
+ ----------
878
+ packages : Dict[str, str], default {}
879
+ Packages to use for this step. The key is the name of the package
880
+ and the value is the version to use.
881
+ libraries : Dict[str, str], default {}
882
+ Supported for backward compatibility. When used with packages, packages will take precedence.
883
+ python : str, optional, default None
884
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
885
+ that the version used will correspond to the version of the Python interpreter used to start the run.
886
+ disabled : bool, default False
887
+ If set to True, disables @conda.
888
+ """
889
+ ...
890
+
891
+ @typing.overload
892
+ def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
893
+ ...
894
+
895
+ @typing.overload
896
+ def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
897
+ ...
898
+
899
+ 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):
900
+ """
901
+ Specifies the Conda environment for the step.
902
+
903
+ Information in this decorator will augment any
904
+ attributes set in the `@conda_base` flow-level decorator. Hence,
905
+ you can use `@conda_base` to set packages required by all
906
+ steps and use `@conda` to specify step-specific overrides.
907
+
908
+
909
+ Parameters
910
+ ----------
911
+ packages : Dict[str, str], default {}
912
+ Packages to use for this step. The key is the name of the package
913
+ and the value is the version to use.
914
+ libraries : Dict[str, str], default {}
915
+ Supported for backward compatibility. When used with packages, packages will take precedence.
916
+ python : str, optional, default None
917
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
918
+ that the version used will correspond to the version of the Python interpreter used to start the run.
919
+ disabled : bool, default False
920
+ If set to True, disables @conda.
921
+ """
922
+ ...
923
+
924
+ @typing.overload
925
+ 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]]]:
926
+ """
927
+ Specifies a timeout for your step.
928
+
929
+ This decorator is useful if this step may hang indefinitely.
930
+
931
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
932
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
933
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
934
+
935
+ Note that all the values specified in parameters are added together so if you specify
936
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
937
+
938
+
939
+ Parameters
940
+ ----------
941
+ seconds : int, default 0
942
+ Number of seconds to wait prior to timing out.
943
+ minutes : int, default 0
944
+ Number of minutes to wait prior to timing out.
945
+ hours : int, default 0
946
+ Number of hours to wait prior to timing out.
947
+ """
948
+ ...
949
+
950
+ @typing.overload
951
+ def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
952
+ ...
953
+
954
+ @typing.overload
955
+ def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
956
+ ...
957
+
958
+ 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):
959
+ """
960
+ Specifies a timeout for your step.
961
+
962
+ This decorator is useful if this step may hang indefinitely.
963
+
964
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
965
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
966
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
967
+
968
+ Note that all the values specified in parameters are added together so if you specify
969
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
970
+
971
+
972
+ Parameters
973
+ ----------
974
+ seconds : int, default 0
975
+ Number of seconds to wait prior to timing out.
976
+ minutes : int, default 0
977
+ Number of minutes to wait prior to timing out.
978
+ hours : int, default 0
979
+ Number of hours to wait prior to timing out.
980
+ """
981
+ ...
982
+
983
+ def nvct(*, gpu: int, gpu_type: str) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
984
+ """
985
+ Specifies that this step should execute on DGX cloud.
986
+
987
+
988
+ Parameters
989
+ ----------
990
+ gpu : int
991
+ Number of GPUs to use.
992
+ gpu_type : str
993
+ Type of Nvidia GPU to use.
994
+ """
995
+ ...
996
+
997
+ def vllm(*, model: str, backend: str, openai_api_server: bool, debug: bool, card_refresh_interval: int, max_retries: int, retry_alert_frequency: int, engine_args: 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]]]:
998
+ """
999
+ This decorator is used to run vllm APIs as Metaflow task sidecars.
1000
+
1001
+ User code call
1002
+ --------------
1003
+ @vllm(
1004
+ model="...",
1005
+ ...
1006
+ )
1007
+
1008
+ Valid backend options
1008
1009
  ---------------------
1009
1010
  - 'local': Run as a separate process on the local task machine.
1010
- - (TODO) 'managed': Outerbounds hosts and selects compute provider.
1011
- - (TODO) 'remote': Spin up separate instance to serve Ollama models.
1012
1011
 
1013
1012
  Valid model options
1014
1013
  -------------------
1015
- Any model here https://ollama.com/search, e.g. 'llama3.2', 'llama3.3'
1014
+ Any HuggingFace model identifier, e.g. 'meta-llama/Llama-3.2-1B'
1015
+
1016
+ NOTE: vLLM's OpenAI-compatible server serves ONE model per server instance.
1017
+ If you need multiple models, you must create multiple @vllm decorators.
1016
1018
 
1017
1019
 
1018
1020
  Parameters
1019
1021
  ----------
1020
- models: list[str]
1021
- List of Ollama containers running models in sidecars.
1022
+ model: str
1023
+ HuggingFace model identifier to be served by vLLM.
1022
1024
  backend: str
1023
- Determines where and how to run the Ollama process.
1024
- force_pull: bool
1025
- Whether to run `ollama pull` no matter what, or first check the remote cache in Metaflow datastore for this model key.
1026
- cache_update_policy: str
1027
- Cache update policy: "auto", "force", or "never".
1028
- force_cache_update: bool
1029
- Simple override for "force" cache update policy.
1025
+ Determines where and how to run the vLLM process.
1026
+ openai_api_server: bool
1027
+ Whether to use OpenAI-compatible API server mode (subprocess) instead of native engine.
1028
+ Default is False (uses native engine).
1029
+ Set to True for backward compatibility with existing code.
1030
1030
  debug: bool
1031
1031
  Whether to turn on verbose debugging logs.
1032
- circuit_breaker_config: dict
1033
- Configuration for circuit breaker protection. Keys: failure_threshold, recovery_timeout, reset_timeout.
1034
- timeout_config: dict
1035
- Configuration for various operation timeouts. Keys: pull, stop, health_check, install, server_startup.
1032
+ card_refresh_interval: int
1033
+ Interval in seconds for refreshing the vLLM status card.
1034
+ Only used when openai_api_server=True.
1035
+ max_retries: int
1036
+ Maximum number of retries checking for vLLM server startup.
1037
+ Only used when openai_api_server=True.
1038
+ retry_alert_frequency: int
1039
+ Frequency of alert logs for vLLM server startup retries.
1040
+ Only used when openai_api_server=True.
1041
+ engine_args : dict
1042
+ Additional keyword arguments to pass to the vLLM engine.
1043
+ For example, `tensor_parallel_size=2`.
1036
1044
  """
1037
1045
  ...
1038
1046
 
@@ -1092,214 +1100,214 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
1092
1100
  ...
1093
1101
 
1094
1102
  @typing.overload
1095
- def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1103
+ def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], role: typing.Optional[str] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
1096
1104
  """
1097
- Decorator prototype for all step decorators. This function gets specialized
1098
- and imported for all decorators types by _import_plugin_decorators().
1105
+ Specifies secrets to be retrieved and injected as environment variables prior to
1106
+ the execution of a step.
1107
+
1108
+
1109
+ Parameters
1110
+ ----------
1111
+ sources : List[Union[str, Dict[str, Any]]], default: []
1112
+ List of secret specs, defining how the secrets are to be retrieved
1113
+ role : str, optional, default: None
1114
+ Role to use for fetching secrets
1099
1115
  """
1100
1116
  ...
1101
1117
 
1102
1118
  @typing.overload
1103
- def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1119
+ def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1104
1120
  ...
1105
1121
 
1106
- def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
1122
+ @typing.overload
1123
+ def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1124
+ ...
1125
+
1126
+ def secrets(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], role: typing.Optional[str] = None):
1107
1127
  """
1108
- Decorator prototype for all step decorators. This function gets specialized
1109
- and imported for all decorators types by _import_plugin_decorators().
1128
+ Specifies secrets to be retrieved and injected as environment variables prior to
1129
+ the execution of a step.
1130
+
1131
+
1132
+ Parameters
1133
+ ----------
1134
+ sources : List[Union[str, Dict[str, Any]]], default: []
1135
+ List of secret specs, defining how the secrets are to be retrieved
1136
+ role : str, optional, default: None
1137
+ Role to use for fetching secrets
1110
1138
  """
1111
1139
  ...
1112
1140
 
1113
1141
  @typing.overload
1114
- 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]]]:
1142
+ def resources(*, cpu: int = 1, gpu: typing.Optional[int] = None, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
1115
1143
  """
1116
- Specifies the PyPI packages for the step.
1144
+ Specifies the resources needed when executing this step.
1117
1145
 
1118
- Information in this decorator will augment any
1119
- attributes set in the `@pyi_base` flow-level decorator. Hence,
1120
- you can use `@pypi_base` to set packages required by all
1121
- steps and use `@pypi` to specify step-specific overrides.
1146
+ Use `@resources` to specify the resource requirements
1147
+ independently of the specific compute layer (`@batch`, `@kubernetes`).
1148
+
1149
+ You can choose the compute layer on the command line by executing e.g.
1150
+ ```
1151
+ python myflow.py run --with batch
1152
+ ```
1153
+ or
1154
+ ```
1155
+ python myflow.py run --with kubernetes
1156
+ ```
1157
+ which executes the flow on the desired system using the
1158
+ requirements specified in `@resources`.
1122
1159
 
1123
1160
 
1124
1161
  Parameters
1125
1162
  ----------
1126
- packages : Dict[str, str], default: {}
1127
- Packages to use for this step. The key is the name of the package
1128
- and the value is the version to use.
1129
- python : str, optional, default: None
1130
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1131
- that the version used will correspond to the version of the Python interpreter used to start the run.
1163
+ cpu : int, default 1
1164
+ Number of CPUs required for this step.
1165
+ gpu : int, optional, default None
1166
+ Number of GPUs required for this step.
1167
+ disk : int, optional, default None
1168
+ Disk size (in MB) required for this step. Only applies on Kubernetes.
1169
+ memory : int, default 4096
1170
+ Memory size (in MB) required for this step.
1171
+ shared_memory : int, optional, default None
1172
+ The value for the size (in MiB) of the /dev/shm volume for this step.
1173
+ This parameter maps to the `--shm-size` option in Docker.
1132
1174
  """
1133
1175
  ...
1134
1176
 
1135
1177
  @typing.overload
1136
- def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1178
+ def resources(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1137
1179
  ...
1138
1180
 
1139
1181
  @typing.overload
1140
- def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1182
+ def resources(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1141
1183
  ...
1142
1184
 
1143
- 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):
1185
+ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, cpu: int = 1, gpu: typing.Optional[int] = None, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None):
1144
1186
  """
1145
- Specifies the PyPI packages for the step.
1187
+ Specifies the resources needed when executing this step.
1146
1188
 
1147
- Information in this decorator will augment any
1148
- attributes set in the `@pyi_base` flow-level decorator. Hence,
1149
- you can use `@pypi_base` to set packages required by all
1150
- steps and use `@pypi` to specify step-specific overrides.
1189
+ Use `@resources` to specify the resource requirements
1190
+ independently of the specific compute layer (`@batch`, `@kubernetes`).
1191
+
1192
+ You can choose the compute layer on the command line by executing e.g.
1193
+ ```
1194
+ python myflow.py run --with batch
1195
+ ```
1196
+ or
1197
+ ```
1198
+ python myflow.py run --with kubernetes
1199
+ ```
1200
+ which executes the flow on the desired system using the
1201
+ requirements specified in `@resources`.
1151
1202
 
1152
1203
 
1153
1204
  Parameters
1154
1205
  ----------
1155
- packages : Dict[str, str], default: {}
1156
- Packages to use for this step. The key is the name of the package
1157
- and the value is the version to use.
1158
- python : str, optional, default: None
1159
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1160
- that the version used will correspond to the version of the Python interpreter used to start the run.
1206
+ cpu : int, default 1
1207
+ Number of CPUs required for this step.
1208
+ gpu : int, optional, default None
1209
+ Number of GPUs required for this step.
1210
+ disk : int, optional, default None
1211
+ Disk size (in MB) required for this step. Only applies on Kubernetes.
1212
+ memory : int, default 4096
1213
+ Memory size (in MB) required for this step.
1214
+ shared_memory : int, optional, default None
1215
+ The value for the size (in MiB) of the /dev/shm volume for this step.
1216
+ This parameter maps to the `--shm-size` option in Docker.
1161
1217
  """
1162
1218
  ...
1163
1219
 
1164
- def vllm(*, model: str, backend: str, openai_api_server: bool, debug: bool, card_refresh_interval: int, max_retries: int, retry_alert_frequency: int, engine_args: 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]]]:
1220
+ 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]]]:
1165
1221
  """
1166
- This decorator is used to run vllm APIs as Metaflow task sidecars.
1222
+ This decorator is used to run Ollama APIs as Metaflow task sidecars.
1167
1223
 
1168
1224
  User code call
1169
1225
  --------------
1170
- @vllm(
1171
- model="...",
1226
+ @ollama(
1227
+ models=[...],
1172
1228
  ...
1173
1229
  )
1174
1230
 
1175
1231
  Valid backend options
1176
1232
  ---------------------
1177
1233
  - 'local': Run as a separate process on the local task machine.
1234
+ - (TODO) 'managed': Outerbounds hosts and selects compute provider.
1235
+ - (TODO) 'remote': Spin up separate instance to serve Ollama models.
1178
1236
 
1179
1237
  Valid model options
1180
1238
  -------------------
1181
- Any HuggingFace model identifier, e.g. 'meta-llama/Llama-3.2-1B'
1182
-
1183
- NOTE: vLLM's OpenAI-compatible server serves ONE model per server instance.
1184
- If you need multiple models, you must create multiple @vllm decorators.
1239
+ Any model here https://ollama.com/search, e.g. 'llama3.2', 'llama3.3'
1185
1240
 
1186
1241
 
1187
1242
  Parameters
1188
1243
  ----------
1189
- model: str
1190
- HuggingFace model identifier to be served by vLLM.
1244
+ models: list[str]
1245
+ List of Ollama containers running models in sidecars.
1191
1246
  backend: str
1192
- Determines where and how to run the vLLM process.
1193
- openai_api_server: bool
1194
- Whether to use OpenAI-compatible API server mode (subprocess) instead of native engine.
1195
- Default is False (uses native engine).
1196
- Set to True for backward compatibility with existing code.
1247
+ Determines where and how to run the Ollama process.
1248
+ force_pull: bool
1249
+ Whether to run `ollama pull` no matter what, or first check the remote cache in Metaflow datastore for this model key.
1250
+ cache_update_policy: str
1251
+ Cache update policy: "auto", "force", or "never".
1252
+ force_cache_update: bool
1253
+ Simple override for "force" cache update policy.
1197
1254
  debug: bool
1198
1255
  Whether to turn on verbose debugging logs.
1199
- card_refresh_interval: int
1200
- Interval in seconds for refreshing the vLLM status card.
1201
- Only used when openai_api_server=True.
1202
- max_retries: int
1203
- Maximum number of retries checking for vLLM server startup.
1204
- Only used when openai_api_server=True.
1205
- retry_alert_frequency: int
1206
- Frequency of alert logs for vLLM server startup retries.
1207
- Only used when openai_api_server=True.
1208
- engine_args : dict
1209
- Additional keyword arguments to pass to the vLLM engine.
1210
- For example, `tensor_parallel_size=2`.
1256
+ circuit_breaker_config: dict
1257
+ Configuration for circuit breaker protection. Keys: failure_threshold, recovery_timeout, reset_timeout.
1258
+ timeout_config: dict
1259
+ Configuration for various operation timeouts. Keys: pull, stop, health_check, install, server_startup.
1211
1260
  """
1212
1261
  ...
1213
1262
 
1214
1263
  @typing.overload
1215
- 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]]]:
1264
+ 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]]:
1216
1265
  """
1217
- Creates a human-readable report, a Metaflow Card, after this step completes.
1266
+ Specifies the Conda environment for all steps of the flow.
1218
1267
 
1219
- Note that you may add multiple `@card` decorators in a step with different parameters.
1268
+ Use `@conda_base` to set common libraries required by all
1269
+ steps and use `@conda` to specify step-specific additions.
1220
1270
 
1221
1271
 
1222
1272
  Parameters
1223
1273
  ----------
1224
- type : str, default 'default'
1225
- Card type.
1226
- id : str, optional, default None
1227
- If multiple cards are present, use this id to identify this card.
1228
- options : Dict[str, Any], default {}
1229
- Options passed to the card. The contents depend on the card type.
1230
- timeout : int, default 45
1231
- Interrupt reporting if it takes more than this many seconds.
1274
+ packages : Dict[str, str], default {}
1275
+ Packages to use for this flow. The key is the name of the package
1276
+ and the value is the version to use.
1277
+ libraries : Dict[str, str], default {}
1278
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1279
+ python : str, optional, default None
1280
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1281
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1282
+ disabled : bool, default False
1283
+ If set to True, disables Conda.
1232
1284
  """
1233
1285
  ...
1234
1286
 
1235
1287
  @typing.overload
1236
- def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1237
- ...
1238
-
1239
- @typing.overload
1240
- def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1288
+ def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1241
1289
  ...
1242
1290
 
1243
- 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):
1291
+ 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):
1244
1292
  """
1245
- Creates a human-readable report, a Metaflow Card, after this step completes.
1246
-
1247
- Note that you may add multiple `@card` decorators in a step with different parameters.
1248
-
1293
+ Specifies the Conda environment for all steps of the flow.
1249
1294
 
1250
- Parameters
1251
- ----------
1252
- type : str, default 'default'
1253
- Card type.
1254
- id : str, optional, default None
1255
- If multiple cards are present, use this id to identify this card.
1256
- options : Dict[str, Any], default {}
1257
- Options passed to the card. The contents depend on the card type.
1258
- timeout : int, default 45
1259
- Interrupt reporting if it takes more than this many seconds.
1260
- """
1261
- ...
1262
-
1263
- def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, bucket_key: typing.Union[str, typing.List[str]], bucket_name: str, wildcard_match: bool, aws_conn_id: str, verify: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1264
- """
1265
- The `@airflow_s3_key_sensor` decorator attaches a Airflow [S3KeySensor](https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/_api/airflow/providers/amazon/aws/sensors/s3/index.html#airflow.providers.amazon.aws.sensors.s3.S3KeySensor)
1266
- before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
1267
- and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
1268
- added as a flow decorators. Adding more than one decorator will ensure that `start` step
1269
- starts only after all sensors finish.
1295
+ Use `@conda_base` to set common libraries required by all
1296
+ steps and use `@conda` to specify step-specific additions.
1270
1297
 
1271
1298
 
1272
1299
  Parameters
1273
1300
  ----------
1274
- timeout : int
1275
- Time, in seconds before the task times out and fails. (Default: 3600)
1276
- poke_interval : int
1277
- Time in seconds that the job should wait in between each try. (Default: 60)
1278
- mode : str
1279
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1280
- exponential_backoff : bool
1281
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1282
- pool : str
1283
- the slot pool this task should run in,
1284
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1285
- soft_fail : bool
1286
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1287
- name : str
1288
- Name of the sensor on Airflow
1289
- description : str
1290
- Description of sensor in the Airflow UI
1291
- bucket_key : Union[str, List[str]]
1292
- The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1293
- When it's specified as a full s3:// url, please leave `bucket_name` as None
1294
- bucket_name : str
1295
- Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1296
- When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1297
- wildcard_match : bool
1298
- whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1299
- aws_conn_id : str
1300
- a reference to the s3 connection on Airflow. (Default: None)
1301
- verify : bool
1302
- Whether or not to verify SSL certificates for S3 connection. (Default: None)
1301
+ packages : Dict[str, str], default {}
1302
+ Packages to use for this flow. The key is the name of the package
1303
+ and the value is the version to use.
1304
+ libraries : Dict[str, str], default {}
1305
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1306
+ python : str, optional, default None
1307
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1308
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1309
+ disabled : bool, default False
1310
+ If set to True, disables Conda.
1303
1311
  """
1304
1312
  ...
1305
1313
 
@@ -1467,148 +1475,45 @@ def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly:
1467
1475
  which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1468
1476
  """
1469
1477
  ...
1470
-
1471
- 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]]:
1472
- """
1473
- 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.
1474
- 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.
1475
-
1476
-
1477
- Parameters
1478
- ----------
1479
- timeout : int
1480
- Time, in seconds before the task times out and fails. (Default: 3600)
1481
- poke_interval : int
1482
- Time in seconds that the job should wait in between each try. (Default: 60)
1483
- mode : str
1484
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1485
- exponential_backoff : bool
1486
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1487
- pool : str
1488
- the slot pool this task should run in,
1489
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1490
- soft_fail : bool
1491
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1492
- name : str
1493
- Name of the sensor on Airflow
1494
- description : str
1495
- Description of sensor in the Airflow UI
1496
- external_dag_id : str
1497
- The dag_id that contains the task you want to wait for.
1498
- external_task_ids : List[str]
1499
- The list of task_ids that you want to wait for.
1500
- If None (default value) the sensor waits for the DAG. (Default: None)
1501
- allowed_states : List[str]
1502
- Iterable of allowed states, (Default: ['success'])
1503
- failed_states : List[str]
1504
- Iterable of failed or dis-allowed states. (Default: None)
1505
- execution_delta : datetime.timedelta
1506
- time difference with the previous execution to look at,
1507
- the default is the same logical date as the current task or DAG. (Default: None)
1508
- check_existence: bool
1509
- Set to True to check if the external task exists or check if
1510
- the DAG to wait for exists. (Default: True)
1511
- """
1512
- ...
1513
-
1514
- @typing.overload
1515
- def trigger_on_finish(*, flow: typing.Union[typing.Dict[str, str], str, None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1516
- """
1517
- Specifies the flow(s) that this flow depends on.
1518
-
1519
- ```
1520
- @trigger_on_finish(flow='FooFlow')
1521
- ```
1522
- or
1523
- ```
1524
- @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1525
- ```
1526
- This decorator respects the @project decorator and triggers the flow
1527
- when upstream runs within the same namespace complete successfully
1528
-
1529
- Additionally, you can specify project aware upstream flow dependencies
1530
- by specifying the fully qualified project_flow_name.
1531
- ```
1532
- @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1533
- ```
1534
- or
1535
- ```
1536
- @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1537
- ```
1538
-
1539
- You can also specify just the project or project branch (other values will be
1540
- inferred from the current project or project branch):
1541
- ```
1542
- @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1543
- ```
1544
-
1545
- Note that `branch` is typically one of:
1546
- - `prod`
1547
- - `user.bob`
1548
- - `test.my_experiment`
1549
- - `prod.staging`
1550
-
1551
-
1552
- Parameters
1553
- ----------
1554
- flow : Union[str, Dict[str, str]], optional, default None
1555
- Upstream flow dependency for this flow.
1556
- flows : List[Union[str, Dict[str, str]]], default []
1557
- Upstream flow dependencies for this flow.
1558
- options : Dict[str, Any], default {}
1559
- Backend-specific configuration for tuning eventing behavior.
1560
- """
1561
- ...
1562
-
1563
- @typing.overload
1564
- def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1565
- ...
1566
-
1567
- def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, flow: typing.Union[typing.Dict[str, str], str, None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}):
1568
- """
1569
- Specifies the flow(s) that this flow depends on.
1570
-
1571
- ```
1572
- @trigger_on_finish(flow='FooFlow')
1573
- ```
1574
- or
1575
- ```
1576
- @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1577
- ```
1578
- This decorator respects the @project decorator and triggers the flow
1579
- when upstream runs within the same namespace complete successfully
1580
-
1581
- Additionally, you can specify project aware upstream flow dependencies
1582
- by specifying the fully qualified project_flow_name.
1583
- ```
1584
- @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1585
- ```
1586
- or
1587
- ```
1588
- @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1589
- ```
1478
+
1479
+ @typing.overload
1480
+ def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1481
+ """
1482
+ Specifies the PyPI packages for all steps of the flow.
1590
1483
 
1591
- You can also specify just the project or project branch (other values will be
1592
- inferred from the current project or project branch):
1593
- ```
1594
- @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1595
- ```
1484
+ Use `@pypi_base` to set common packages required by all
1485
+ steps and use `@pypi` to specify step-specific overrides.
1596
1486
 
1597
- Note that `branch` is typically one of:
1598
- - `prod`
1599
- - `user.bob`
1600
- - `test.my_experiment`
1601
- - `prod.staging`
1487
+ Parameters
1488
+ ----------
1489
+ packages : Dict[str, str], default: {}
1490
+ Packages to use for this flow. The key is the name of the package
1491
+ and the value is the version to use.
1492
+ python : str, optional, default: None
1493
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1494
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1495
+ """
1496
+ ...
1497
+
1498
+ @typing.overload
1499
+ def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1500
+ ...
1501
+
1502
+ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1503
+ """
1504
+ Specifies the PyPI packages for all steps of the flow.
1602
1505
 
1506
+ Use `@pypi_base` to set common packages required by all
1507
+ steps and use `@pypi` to specify step-specific overrides.
1603
1508
 
1604
1509
  Parameters
1605
1510
  ----------
1606
- flow : Union[str, Dict[str, str]], optional, default None
1607
- Upstream flow dependency for this flow.
1608
- flows : List[Union[str, Dict[str, str]]], default []
1609
- Upstream flow dependencies for this flow.
1610
- options : Dict[str, Any], default {}
1611
- Backend-specific configuration for tuning eventing behavior.
1511
+ packages : Dict[str, str], default: {}
1512
+ Packages to use for this flow. The key is the name of the package
1513
+ and the value is the version to use.
1514
+ python : str, optional, default: None
1515
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1516
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1612
1517
  """
1613
1518
  ...
1614
1519
 
@@ -1741,94 +1646,189 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
1741
1646
  ...
1742
1647
 
1743
1648
  @typing.overload
1744
- def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1649
+ def trigger_on_finish(*, flow: typing.Union[typing.Dict[str, str], str, None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1745
1650
  """
1746
- Specifies the PyPI packages for all steps of the flow.
1651
+ Specifies the flow(s) that this flow depends on.
1652
+
1653
+ ```
1654
+ @trigger_on_finish(flow='FooFlow')
1655
+ ```
1656
+ or
1657
+ ```
1658
+ @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1659
+ ```
1660
+ This decorator respects the @project decorator and triggers the flow
1661
+ when upstream runs within the same namespace complete successfully
1662
+
1663
+ Additionally, you can specify project aware upstream flow dependencies
1664
+ by specifying the fully qualified project_flow_name.
1665
+ ```
1666
+ @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1667
+ ```
1668
+ or
1669
+ ```
1670
+ @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1671
+ ```
1672
+
1673
+ You can also specify just the project or project branch (other values will be
1674
+ inferred from the current project or project branch):
1675
+ ```
1676
+ @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1677
+ ```
1678
+
1679
+ Note that `branch` is typically one of:
1680
+ - `prod`
1681
+ - `user.bob`
1682
+ - `test.my_experiment`
1683
+ - `prod.staging`
1747
1684
 
1748
- Use `@pypi_base` to set common packages required by all
1749
- steps and use `@pypi` to specify step-specific overrides.
1750
1685
 
1751
1686
  Parameters
1752
1687
  ----------
1753
- packages : Dict[str, str], default: {}
1754
- Packages to use for this flow. The key is the name of the package
1755
- and the value is the version to use.
1756
- python : str, optional, default: None
1757
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1758
- that the version used will correspond to the version of the Python interpreter used to start the run.
1688
+ flow : Union[str, Dict[str, str]], optional, default None
1689
+ Upstream flow dependency for this flow.
1690
+ flows : List[Union[str, Dict[str, str]]], default []
1691
+ Upstream flow dependencies for this flow.
1692
+ options : Dict[str, Any], default {}
1693
+ Backend-specific configuration for tuning eventing behavior.
1759
1694
  """
1760
1695
  ...
1761
1696
 
1762
1697
  @typing.overload
1763
- def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1698
+ def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1764
1699
  ...
1765
1700
 
1766
- def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1701
+ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, flow: typing.Union[typing.Dict[str, str], str, None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}):
1767
1702
  """
1768
- Specifies the PyPI packages for all steps of the flow.
1703
+ Specifies the flow(s) that this flow depends on.
1704
+
1705
+ ```
1706
+ @trigger_on_finish(flow='FooFlow')
1707
+ ```
1708
+ or
1709
+ ```
1710
+ @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1711
+ ```
1712
+ This decorator respects the @project decorator and triggers the flow
1713
+ when upstream runs within the same namespace complete successfully
1714
+
1715
+ Additionally, you can specify project aware upstream flow dependencies
1716
+ by specifying the fully qualified project_flow_name.
1717
+ ```
1718
+ @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1719
+ ```
1720
+ or
1721
+ ```
1722
+ @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1723
+ ```
1724
+
1725
+ You can also specify just the project or project branch (other values will be
1726
+ inferred from the current project or project branch):
1727
+ ```
1728
+ @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1729
+ ```
1730
+
1731
+ Note that `branch` is typically one of:
1732
+ - `prod`
1733
+ - `user.bob`
1734
+ - `test.my_experiment`
1735
+ - `prod.staging`
1769
1736
 
1770
- Use `@pypi_base` to set common packages required by all
1771
- steps and use `@pypi` to specify step-specific overrides.
1772
1737
 
1773
1738
  Parameters
1774
1739
  ----------
1775
- packages : Dict[str, str], default: {}
1776
- Packages to use for this flow. The key is the name of the package
1777
- and the value is the version to use.
1778
- python : str, optional, default: None
1779
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1780
- that the version used will correspond to the version of the Python interpreter used to start the run.
1740
+ flow : Union[str, Dict[str, str]], optional, default None
1741
+ Upstream flow dependency for this flow.
1742
+ flows : List[Union[str, Dict[str, str]]], default []
1743
+ Upstream flow dependencies for this flow.
1744
+ options : Dict[str, Any], default {}
1745
+ Backend-specific configuration for tuning eventing behavior.
1781
1746
  """
1782
1747
  ...
1783
1748
 
1784
- @typing.overload
1785
- 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]]:
1749
+ 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]]:
1786
1750
  """
1787
- Specifies the Conda environment for all steps of the flow.
1788
-
1789
- Use `@conda_base` to set common libraries required by all
1790
- steps and use `@conda` to specify step-specific additions.
1751
+ 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.
1752
+ 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.
1791
1753
 
1792
1754
 
1793
1755
  Parameters
1794
1756
  ----------
1795
- packages : Dict[str, str], default {}
1796
- Packages to use for this flow. The key is the name of the package
1797
- and the value is the version to use.
1798
- libraries : Dict[str, str], default {}
1799
- Supported for backward compatibility. When used with packages, packages will take precedence.
1800
- python : str, optional, default None
1801
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1802
- that the version used will correspond to the version of the Python interpreter used to start the run.
1803
- disabled : bool, default False
1804
- If set to True, disables Conda.
1757
+ timeout : int
1758
+ Time, in seconds before the task times out and fails. (Default: 3600)
1759
+ poke_interval : int
1760
+ Time in seconds that the job should wait in between each try. (Default: 60)
1761
+ mode : str
1762
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1763
+ exponential_backoff : bool
1764
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1765
+ pool : str
1766
+ the slot pool this task should run in,
1767
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
1768
+ soft_fail : bool
1769
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
1770
+ name : str
1771
+ Name of the sensor on Airflow
1772
+ description : str
1773
+ Description of sensor in the Airflow UI
1774
+ external_dag_id : str
1775
+ The dag_id that contains the task you want to wait for.
1776
+ external_task_ids : List[str]
1777
+ The list of task_ids that you want to wait for.
1778
+ If None (default value) the sensor waits for the DAG. (Default: None)
1779
+ allowed_states : List[str]
1780
+ Iterable of allowed states, (Default: ['success'])
1781
+ failed_states : List[str]
1782
+ Iterable of failed or dis-allowed states. (Default: None)
1783
+ execution_delta : datetime.timedelta
1784
+ time difference with the previous execution to look at,
1785
+ the default is the same logical date as the current task or DAG. (Default: None)
1786
+ check_existence: bool
1787
+ Set to True to check if the external task exists or check if
1788
+ the DAG to wait for exists. (Default: True)
1805
1789
  """
1806
1790
  ...
1807
1791
 
1808
- @typing.overload
1809
- def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1810
- ...
1811
-
1812
- 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):
1792
+ def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, bucket_key: typing.Union[str, typing.List[str]], bucket_name: str, wildcard_match: bool, aws_conn_id: str, verify: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1813
1793
  """
1814
- Specifies the Conda environment for all steps of the flow.
1815
-
1816
- Use `@conda_base` to set common libraries required by all
1817
- steps and use `@conda` to specify step-specific additions.
1794
+ The `@airflow_s3_key_sensor` decorator attaches a Airflow [S3KeySensor](https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/_api/airflow/providers/amazon/aws/sensors/s3/index.html#airflow.providers.amazon.aws.sensors.s3.S3KeySensor)
1795
+ before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
1796
+ and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
1797
+ added as a flow decorators. Adding more than one decorator will ensure that `start` step
1798
+ starts only after all sensors finish.
1818
1799
 
1819
1800
 
1820
1801
  Parameters
1821
1802
  ----------
1822
- packages : Dict[str, str], default {}
1823
- Packages to use for this flow. The key is the name of the package
1824
- and the value is the version to use.
1825
- libraries : Dict[str, str], default {}
1826
- Supported for backward compatibility. When used with packages, packages will take precedence.
1827
- python : str, optional, default None
1828
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1829
- that the version used will correspond to the version of the Python interpreter used to start the run.
1830
- disabled : bool, default False
1831
- If set to True, disables Conda.
1803
+ timeout : int
1804
+ Time, in seconds before the task times out and fails. (Default: 3600)
1805
+ poke_interval : int
1806
+ Time in seconds that the job should wait in between each try. (Default: 60)
1807
+ mode : str
1808
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1809
+ exponential_backoff : bool
1810
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1811
+ pool : str
1812
+ the slot pool this task should run in,
1813
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
1814
+ soft_fail : bool
1815
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
1816
+ name : str
1817
+ Name of the sensor on Airflow
1818
+ description : str
1819
+ Description of sensor in the Airflow UI
1820
+ bucket_key : Union[str, List[str]]
1821
+ The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1822
+ When it's specified as a full s3:// url, please leave `bucket_name` as None
1823
+ bucket_name : str
1824
+ Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1825
+ When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1826
+ wildcard_match : bool
1827
+ whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1828
+ aws_conn_id : str
1829
+ a reference to the s3 connection on Airflow. (Default: None)
1830
+ verify : bool
1831
+ Whether or not to verify SSL certificates for S3 connection. (Default: None)
1832
1832
  """
1833
1833
  ...
1834
1834