metaflow-stubs 2.12.17__py2.py3-none-any.whl → 2.12.19__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 (150) hide show
  1. metaflow-stubs/__init__.pyi +560 -560
  2. metaflow-stubs/cards.pyi +5 -5
  3. metaflow-stubs/cli.pyi +2 -2
  4. metaflow-stubs/client/__init__.pyi +3 -3
  5. metaflow-stubs/client/core.pyi +6 -6
  6. metaflow-stubs/client/filecache.pyi +3 -3
  7. metaflow-stubs/clone_util.pyi +2 -2
  8. metaflow-stubs/events.pyi +2 -2
  9. metaflow-stubs/exception.pyi +2 -2
  10. metaflow-stubs/flowspec.pyi +5 -5
  11. metaflow-stubs/generated_for.txt +1 -1
  12. metaflow-stubs/includefile.pyi +4 -4
  13. metaflow-stubs/metadata/metadata.pyi +2 -2
  14. metaflow-stubs/metadata/util.pyi +2 -2
  15. metaflow-stubs/metaflow_config.pyi +2 -2
  16. metaflow-stubs/metaflow_current.pyi +5 -5
  17. metaflow-stubs/mflog/mflog.pyi +2 -2
  18. metaflow-stubs/multicore_utils.pyi +2 -2
  19. metaflow-stubs/parameters.pyi +3 -3
  20. metaflow-stubs/plugins/__init__.pyi +3 -3
  21. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  22. metaflow-stubs/plugins/airflow/airflow.pyi +3 -3
  23. metaflow-stubs/plugins/airflow/airflow_cli.pyi +3 -3
  24. metaflow-stubs/plugins/airflow/airflow_decorator.pyi +2 -2
  25. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  26. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  27. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
  28. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +3 -3
  29. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +4 -4
  30. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +4 -4
  31. metaflow-stubs/plugins/argo/__init__.pyi +2 -2
  32. metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
  33. metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
  34. metaflow-stubs/plugins/argo/argo_workflows.pyi +5 -5
  35. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +7 -7
  36. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +6 -6
  37. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
  38. metaflow-stubs/plugins/aws/__init__.pyi +2 -2
  39. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  40. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  41. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  42. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  43. metaflow-stubs/plugins/aws/batch/batch_cli.pyi +2 -2
  44. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  45. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +3 -3
  46. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  47. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +3 -3
  48. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
  49. metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +2 -2
  50. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  51. metaflow-stubs/plugins/aws/step_functions/production_token.pyi +2 -2
  52. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
  53. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
  54. metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +3 -3
  55. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  56. metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +2 -2
  57. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +3 -3
  58. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  59. metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
  60. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  61. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +3 -3
  62. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  63. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  64. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  65. metaflow-stubs/plugins/cards/__init__.pyi +2 -2
  66. metaflow-stubs/plugins/cards/card_cli.pyi +4 -4
  67. metaflow-stubs/plugins/cards/card_client.pyi +4 -4
  68. metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
  69. metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
  70. metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
  71. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  72. metaflow-stubs/plugins/cards/card_modules/basic.pyi +3 -3
  73. metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
  74. metaflow-stubs/plugins/cards/card_modules/chevron/__init__.pyi +2 -2
  75. metaflow-stubs/plugins/cards/card_modules/chevron/main.pyi +2 -2
  76. metaflow-stubs/plugins/cards/card_modules/chevron/metadata.pyi +2 -2
  77. metaflow-stubs/plugins/cards/card_modules/chevron/renderer.pyi +2 -2
  78. metaflow-stubs/plugins/cards/card_modules/chevron/tokenizer.pyi +2 -2
  79. metaflow-stubs/plugins/cards/card_modules/components.pyi +3 -3
  80. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
  81. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  82. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +3 -3
  83. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  84. metaflow-stubs/plugins/cards/component_serializer.pyi +4 -4
  85. metaflow-stubs/plugins/cards/exception.pyi +2 -2
  86. metaflow-stubs/plugins/catch_decorator.pyi +3 -3
  87. metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
  88. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  89. metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
  90. metaflow-stubs/plugins/datatools/s3/s3.pyi +5 -5
  91. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  92. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  93. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  94. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  95. metaflow-stubs/plugins/environment_decorator.pyi +2 -2
  96. metaflow-stubs/plugins/events_decorator.pyi +2 -2
  97. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  98. metaflow-stubs/plugins/frameworks/pytorch.pyi +3 -3
  99. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  100. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +3 -3
  101. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  102. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  103. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  104. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  105. metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
  106. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
  107. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +4 -4
  108. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  109. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +3 -3
  110. metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +2 -2
  111. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
  112. metaflow-stubs/plugins/logs_cli.pyi +3 -3
  113. metaflow-stubs/plugins/package_cli.pyi +2 -2
  114. metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
  115. metaflow-stubs/plugins/project_decorator.pyi +2 -2
  116. metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
  117. metaflow-stubs/plugins/pypi/conda_decorator.pyi +6 -2
  118. metaflow-stubs/plugins/pypi/conda_environment.pyi +4 -4
  119. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +4 -2
  120. metaflow-stubs/plugins/pypi/pypi_environment.pyi +3 -3
  121. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  122. metaflow-stubs/plugins/resources_decorator.pyi +2 -2
  123. metaflow-stubs/plugins/retry_decorator.pyi +2 -2
  124. metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
  125. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
  126. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
  127. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  128. metaflow-stubs/plugins/tag_cli.pyi +4 -4
  129. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +3 -3
  130. metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
  131. metaflow-stubs/procpoll.pyi +2 -2
  132. metaflow-stubs/pylint_wrapper.pyi +2 -2
  133. metaflow-stubs/runner/__init__.pyi +2 -2
  134. metaflow-stubs/runner/deployer.pyi +3 -3
  135. metaflow-stubs/runner/metaflow_runner.pyi +5 -5
  136. metaflow-stubs/runner/nbdeploy.pyi +2 -2
  137. metaflow-stubs/runner/nbrun.pyi +2 -2
  138. metaflow-stubs/runner/subprocess_manager.pyi +2 -2
  139. metaflow-stubs/runner/utils.pyi +2 -2
  140. metaflow-stubs/system/__init__.pyi +2 -2
  141. metaflow-stubs/system/system_logger.pyi +2 -2
  142. metaflow-stubs/system/system_monitor.pyi +2 -2
  143. metaflow-stubs/tagging_util.pyi +2 -2
  144. metaflow-stubs/tuple_util.pyi +2 -2
  145. metaflow-stubs/version.pyi +2 -2
  146. {metaflow_stubs-2.12.17.dist-info → metaflow_stubs-2.12.19.dist-info}/METADATA +2 -2
  147. metaflow_stubs-2.12.19.dist-info/RECORD +150 -0
  148. {metaflow_stubs-2.12.17.dist-info → metaflow_stubs-2.12.19.dist-info}/WHEEL +1 -1
  149. metaflow_stubs-2.12.17.dist-info/RECORD +0 -150
  150. {metaflow_stubs-2.12.17.dist-info → metaflow_stubs-2.12.19.dist-info}/top_level.txt +0 -0
@@ -1,25 +1,25 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.12.17 #
4
- # Generated on 2024-08-27T00:52:58.058650 #
3
+ # MF version: 2.12.19 #
4
+ # Generated on 2024-09-04T23:07:02.410930 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
9
  import typing
10
10
  if typing.TYPE_CHECKING:
11
- import metaflow.datastore.inputs
12
- import metaflow._vendor.click.types
13
- import metaflow.plugins.datatools.s3.s3
14
- import metaflow.runner.metaflow_runner
15
11
  import typing
16
- import metaflow.parameters
12
+ import metaflow.client.core
13
+ import metaflow.flowspec
17
14
  import metaflow.metaflow_current
18
- import metaflow.events
15
+ import metaflow.parameters
19
16
  import io
20
- import metaflow.flowspec
21
17
  import datetime
22
- import metaflow.client.core
18
+ import metaflow.runner.metaflow_runner
19
+ import metaflow.events
20
+ import metaflow.plugins.datatools.s3.s3
21
+ import metaflow.datastore.inputs
22
+ import metaflow._vendor.click.types
23
23
  FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
24
24
  StepFlag = typing.NewType("StepFlag", bool)
25
25
 
@@ -727,6 +727,117 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
727
727
  """
728
728
  ...
729
729
 
730
+ @typing.overload
731
+ 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]]]:
732
+ """
733
+ Specifies that the step will success under all circumstances.
734
+
735
+ The decorator will create an optional artifact, specified by `var`, which
736
+ contains the exception raised. You can use it to detect the presence
737
+ of errors, indicating that all happy-path artifacts produced by the step
738
+ are missing.
739
+
740
+ Parameters
741
+ ----------
742
+ var : str, optional, default None
743
+ Name of the artifact in which to store the caught exception.
744
+ If not specified, the exception is not stored.
745
+ print_exception : bool, default True
746
+ Determines whether or not the exception is printed to
747
+ stdout when caught.
748
+ """
749
+ ...
750
+
751
+ @typing.overload
752
+ def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
753
+ ...
754
+
755
+ @typing.overload
756
+ def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
757
+ ...
758
+
759
+ 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):
760
+ """
761
+ Specifies that the step will success under all circumstances.
762
+
763
+ The decorator will create an optional artifact, specified by `var`, which
764
+ contains the exception raised. You can use it to detect the presence
765
+ of errors, indicating that all happy-path artifacts produced by the step
766
+ are missing.
767
+
768
+ Parameters
769
+ ----------
770
+ var : str, optional, default None
771
+ Name of the artifact in which to store the caught exception.
772
+ If not specified, the exception is not stored.
773
+ print_exception : bool, default True
774
+ Determines whether or not the exception is printed to
775
+ stdout when caught.
776
+ """
777
+ ...
778
+
779
+ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: typing.Optional[str] = None, image_pull_policy: str = "KUBERNETES_IMAGE_PULL_POLICY", service_account: str = "METAFLOW_KUBERNETES_SERVICE_ACCOUNT", secrets: typing.Optional[typing.List[str]] = None, namespace: str = "METAFLOW_KUBERNETES_NAMESPACE", gpu: typing.Optional[int] = None, gpu_vendor: str = "KUBERNETES_GPU_VENDOR", tolerations: typing.List[str] = [], use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = "/metaflow_temp", persistent_volume_claims: typing.Optional[typing.Dict[str, str]] = None, shared_memory: typing.Optional[int] = None, port: typing.Optional[int] = None, compute_pool: typing.Optional[str] = None) -> 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]]]:
780
+ """
781
+ Specifies that this step should execute on Kubernetes.
782
+
783
+ Parameters
784
+ ----------
785
+ cpu : int, default 1
786
+ Number of CPUs required for this step. If `@resources` is
787
+ also present, the maximum value from all decorators is used.
788
+ memory : int, default 4096
789
+ Memory size (in MB) required for this step. If
790
+ `@resources` is also present, the maximum value from all decorators is
791
+ used.
792
+ disk : int, default 10240
793
+ Disk size (in MB) required for this step. If
794
+ `@resources` is also present, the maximum value from all decorators is
795
+ used.
796
+ image : str, optional, default None
797
+ Docker image to use when launching on Kubernetes. If not specified, and
798
+ METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
799
+ not, a default Docker image mapping to the current version of Python is used.
800
+ image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
801
+ If given, the imagePullPolicy to be applied to the Docker image of the step.
802
+ service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
803
+ Kubernetes service account to use when launching pod in Kubernetes.
804
+ secrets : List[str], optional, default None
805
+ Kubernetes secrets to use when launching pod in Kubernetes. These
806
+ secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
807
+ in Metaflow configuration.
808
+ namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
809
+ Kubernetes namespace to use when launching pod in Kubernetes.
810
+ gpu : int, optional, default None
811
+ Number of GPUs required for this step. A value of zero implies that
812
+ the scheduled node should not have GPUs.
813
+ gpu_vendor : str, default KUBERNETES_GPU_VENDOR
814
+ The vendor of the GPUs to be used for this step.
815
+ tolerations : List[str], default []
816
+ The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
817
+ Kubernetes tolerations to use when launching pod in Kubernetes.
818
+ use_tmpfs : bool, default False
819
+ This enables an explicit tmpfs mount for this step.
820
+ tmpfs_tempdir : bool, default True
821
+ sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
822
+ tmpfs_size : int, optional, default: None
823
+ The value for the size (in MiB) of the tmpfs mount for this step.
824
+ This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
825
+ memory allocated for this step.
826
+ tmpfs_path : str, optional, default /metaflow_temp
827
+ Path to tmpfs mount for this step.
828
+ persistent_volume_claims : Dict[str, str], optional, default None
829
+ A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
830
+ volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
831
+ shared_memory: int, optional
832
+ Shared memory size (in MiB) required for this step
833
+ port: int, optional
834
+ Port number to specify in the Kubernetes job object
835
+ compute_pool : str, optional, default None
836
+ Compute pool to be used for for this step.
837
+ If not specified, any accessible compute pool within the perimeter is used.
838
+ """
839
+ ...
840
+
730
841
  @typing.overload
731
842
  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]]]:
732
843
  """
@@ -841,6 +952,76 @@ def conda(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
841
952
  """
842
953
  ...
843
954
 
955
+ @typing.overload
956
+ 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]]]:
957
+ """
958
+ Creates a human-readable report, a Metaflow Card, after this step completes.
959
+
960
+ Note that you may add multiple `@card` decorators in a step with different parameters.
961
+
962
+ Parameters
963
+ ----------
964
+ type : str, default 'default'
965
+ Card type.
966
+ id : str, optional, default None
967
+ If multiple cards are present, use this id to identify this card.
968
+ options : Dict[str, Any], default {}
969
+ Options passed to the card. The contents depend on the card type.
970
+ timeout : int, default 45
971
+ Interrupt reporting if it takes more than this many seconds.
972
+
973
+
974
+ """
975
+ ...
976
+
977
+ @typing.overload
978
+ def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
979
+ ...
980
+
981
+ @typing.overload
982
+ def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
983
+ ...
984
+
985
+ 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):
986
+ """
987
+ Creates a human-readable report, a Metaflow Card, after this step completes.
988
+
989
+ Note that you may add multiple `@card` decorators in a step with different parameters.
990
+
991
+ Parameters
992
+ ----------
993
+ type : str, default 'default'
994
+ Card type.
995
+ id : str, optional, default None
996
+ If multiple cards are present, use this id to identify this card.
997
+ options : Dict[str, Any], default {}
998
+ Options passed to the card. The contents depend on the card type.
999
+ timeout : int, default 45
1000
+ Interrupt reporting if it takes more than this many seconds.
1001
+
1002
+
1003
+ """
1004
+ ...
1005
+
1006
+ @typing.overload
1007
+ def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1008
+ """
1009
+ Decorator prototype for all step decorators. This function gets specialized
1010
+ and imported for all decorators types by _import_plugin_decorators().
1011
+ """
1012
+ ...
1013
+
1014
+ @typing.overload
1015
+ def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1016
+ ...
1017
+
1018
+ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
1019
+ """
1020
+ Decorator prototype for all step decorators. This function gets specialized
1021
+ and imported for all decorators types by _import_plugin_decorators().
1022
+ """
1023
+ ...
1024
+
844
1025
  @typing.overload
845
1026
  def retry(*, times: int = 3, minutes_between_retries: int = 2) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
846
1027
  """
@@ -895,21 +1076,129 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
895
1076
  ...
896
1077
 
897
1078
  @typing.overload
898
- def batch(*, cpu: int = 1, gpu: int = 0, memory: int = 4096, image: typing.Optional[str] = None, queue: str = "METAFLOW_BATCH_JOB_QUEUE", iam_role: str = "METAFLOW_ECS_S3_ACCESS_IAM_ROLE", execution_role: str = "METAFLOW_ECS_FARGATE_EXECUTION_ROLE", shared_memory: typing.Optional[int] = None, max_swap: typing.Optional[int] = None, swappiness: typing.Optional[int] = None, use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = None, inferentia: int = 0, trainium: int = None, efa: int = 0, ephemeral_storage: int = None, log_driver: typing.Optional[str] = None, log_options: typing.Optional[typing.List[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]]]:
1079
+ 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]]]:
899
1080
  """
900
- Specifies that this step should execute on [AWS Batch](https://aws.amazon.com/batch/).
1081
+ Specifies environment variables to be set prior to the execution of a step.
1082
+
1083
+ Parameters
1084
+ ----------
1085
+ vars : Dict[str, str], default {}
1086
+ Dictionary of environment variables to set.
1087
+ """
1088
+ ...
1089
+
1090
+ @typing.overload
1091
+ def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1092
+ ...
1093
+
1094
+ @typing.overload
1095
+ def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1096
+ ...
1097
+
1098
+ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
1099
+ """
1100
+ Specifies environment variables to be set prior to the execution of a step.
1101
+
1102
+ Parameters
1103
+ ----------
1104
+ vars : Dict[str, str], default {}
1105
+ Dictionary of environment variables to set.
1106
+ """
1107
+ ...
1108
+
1109
+ @typing.overload
1110
+ def resources(*, cpu: int = 1, gpu: int = 0, 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]]]:
1111
+ """
1112
+ Specifies the resources needed when executing this step.
1113
+
1114
+ Use `@resources` to specify the resource requirements
1115
+ independently of the specific compute layer (`@batch`, `@kubernetes`).
1116
+
1117
+ You can choose the compute layer on the command line by executing e.g.
1118
+ ```
1119
+ python myflow.py run --with batch
1120
+ ```
1121
+ or
1122
+ ```
1123
+ python myflow.py run --with kubernetes
1124
+ ```
1125
+ which executes the flow on the desired system using the
1126
+ requirements specified in `@resources`.
901
1127
 
902
1128
  Parameters
903
1129
  ----------
904
1130
  cpu : int, default 1
905
- Number of CPUs required for this step. If `@resources` is
906
- also present, the maximum value from all decorators is used.
1131
+ Number of CPUs required for this step.
907
1132
  gpu : int, default 0
908
- Number of GPUs required for this step. If `@resources` is
909
- also present, the maximum value from all decorators is used.
1133
+ Number of GPUs required for this step.
1134
+ disk : int, optional, default None
1135
+ Disk size (in MB) required for this step. Only applies on Kubernetes.
910
1136
  memory : int, default 4096
911
- Memory size (in MB) required for this step. If
912
- `@resources` is also present, the maximum value from all decorators is
1137
+ Memory size (in MB) required for this step.
1138
+ shared_memory : int, optional, default None
1139
+ The value for the size (in MiB) of the /dev/shm volume for this step.
1140
+ This parameter maps to the `--shm-size` option in Docker.
1141
+ """
1142
+ ...
1143
+
1144
+ @typing.overload
1145
+ def resources(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1146
+ ...
1147
+
1148
+ @typing.overload
1149
+ def resources(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1150
+ ...
1151
+
1152
+ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, cpu: int = 1, gpu: int = 0, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None):
1153
+ """
1154
+ Specifies the resources needed when executing this step.
1155
+
1156
+ Use `@resources` to specify the resource requirements
1157
+ independently of the specific compute layer (`@batch`, `@kubernetes`).
1158
+
1159
+ You can choose the compute layer on the command line by executing e.g.
1160
+ ```
1161
+ python myflow.py run --with batch
1162
+ ```
1163
+ or
1164
+ ```
1165
+ python myflow.py run --with kubernetes
1166
+ ```
1167
+ which executes the flow on the desired system using the
1168
+ requirements specified in `@resources`.
1169
+
1170
+ Parameters
1171
+ ----------
1172
+ cpu : int, default 1
1173
+ Number of CPUs required for this step.
1174
+ gpu : int, default 0
1175
+ Number of GPUs required for this step.
1176
+ disk : int, optional, default None
1177
+ Disk size (in MB) required for this step. Only applies on Kubernetes.
1178
+ memory : int, default 4096
1179
+ Memory size (in MB) required for this step.
1180
+ shared_memory : int, optional, default None
1181
+ The value for the size (in MiB) of the /dev/shm volume for this step.
1182
+ This parameter maps to the `--shm-size` option in Docker.
1183
+ """
1184
+ ...
1185
+
1186
+ @typing.overload
1187
+ def batch(*, cpu: int = 1, gpu: int = 0, memory: int = 4096, image: typing.Optional[str] = None, queue: str = "METAFLOW_BATCH_JOB_QUEUE", iam_role: str = "METAFLOW_ECS_S3_ACCESS_IAM_ROLE", execution_role: str = "METAFLOW_ECS_FARGATE_EXECUTION_ROLE", shared_memory: typing.Optional[int] = None, max_swap: typing.Optional[int] = None, swappiness: typing.Optional[int] = None, use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = None, inferentia: int = 0, trainium: int = None, efa: int = 0, ephemeral_storage: int = None, log_driver: typing.Optional[str] = None, log_options: typing.Optional[typing.List[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]]]:
1188
+ """
1189
+ Specifies that this step should execute on [AWS Batch](https://aws.amazon.com/batch/).
1190
+
1191
+ Parameters
1192
+ ----------
1193
+ cpu : int, default 1
1194
+ Number of CPUs required for this step. If `@resources` is
1195
+ also present, the maximum value from all decorators is used.
1196
+ gpu : int, default 0
1197
+ Number of GPUs required for this step. If `@resources` is
1198
+ also present, the maximum value from all decorators is used.
1199
+ memory : int, default 4096
1200
+ Memory size (in MB) required for this step. If
1201
+ `@resources` is also present, the maximum value from all decorators is
913
1202
  used.
914
1203
  image : str, optional, default None
915
1204
  Docker image to use when launching on AWS Batch. If not specified, and
@@ -1041,427 +1330,89 @@ def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
1041
1330
  """
1042
1331
  ...
1043
1332
 
1044
- def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: typing.Optional[str] = None, image_pull_policy: str = "KUBERNETES_IMAGE_PULL_POLICY", service_account: str = "METAFLOW_KUBERNETES_SERVICE_ACCOUNT", secrets: typing.Optional[typing.List[str]] = None, namespace: str = "METAFLOW_KUBERNETES_NAMESPACE", gpu: typing.Optional[int] = None, gpu_vendor: str = "KUBERNETES_GPU_VENDOR", tolerations: typing.List[str] = [], use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = "/metaflow_temp", persistent_volume_claims: typing.Optional[typing.Dict[str, str]] = None, shared_memory: typing.Optional[int] = None, port: typing.Optional[int] = None, compute_pool: typing.Optional[str] = None) -> 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]]]:
1045
- """
1046
- Specifies that this step should execute on Kubernetes.
1047
-
1048
- Parameters
1049
- ----------
1050
- cpu : int, default 1
1051
- Number of CPUs required for this step. If `@resources` is
1052
- also present, the maximum value from all decorators is used.
1053
- memory : int, default 4096
1054
- Memory size (in MB) required for this step. If
1055
- `@resources` is also present, the maximum value from all decorators is
1056
- used.
1057
- disk : int, default 10240
1058
- Disk size (in MB) required for this step. If
1059
- `@resources` is also present, the maximum value from all decorators is
1060
- used.
1061
- image : str, optional, default None
1062
- Docker image to use when launching on Kubernetes. If not specified, and
1063
- METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
1064
- not, a default Docker image mapping to the current version of Python is used.
1065
- image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
1066
- If given, the imagePullPolicy to be applied to the Docker image of the step.
1067
- service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
1068
- Kubernetes service account to use when launching pod in Kubernetes.
1069
- secrets : List[str], optional, default None
1070
- Kubernetes secrets to use when launching pod in Kubernetes. These
1071
- secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
1072
- in Metaflow configuration.
1073
- namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
1074
- Kubernetes namespace to use when launching pod in Kubernetes.
1075
- gpu : int, optional, default None
1076
- Number of GPUs required for this step. A value of zero implies that
1077
- the scheduled node should not have GPUs.
1078
- gpu_vendor : str, default KUBERNETES_GPU_VENDOR
1079
- The vendor of the GPUs to be used for this step.
1080
- tolerations : List[str], default []
1081
- The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
1082
- Kubernetes tolerations to use when launching pod in Kubernetes.
1083
- use_tmpfs : bool, default False
1084
- This enables an explicit tmpfs mount for this step.
1085
- tmpfs_tempdir : bool, default True
1086
- sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
1087
- tmpfs_size : int, optional, default: None
1088
- The value for the size (in MiB) of the tmpfs mount for this step.
1089
- This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
1090
- memory allocated for this step.
1091
- tmpfs_path : str, optional, default /metaflow_temp
1092
- Path to tmpfs mount for this step.
1093
- persistent_volume_claims : Dict[str, str], optional, default None
1094
- A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
1095
- volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
1096
- shared_memory: int, optional
1097
- Shared memory size (in MiB) required for this step
1098
- port: int, optional
1099
- Port number to specify in the Kubernetes job object
1100
- compute_pool : str, optional, default None
1101
- Compute pool to be used for for this step.
1102
- If not specified, any accessible compute pool within the perimeter is used.
1103
- """
1104
- ...
1105
-
1106
1333
  @typing.overload
1107
- 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]]]:
1334
+ def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = []) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
1108
1335
  """
1109
- Specifies that the step will success under all circumstances.
1110
-
1111
- The decorator will create an optional artifact, specified by `var`, which
1112
- contains the exception raised. You can use it to detect the presence
1113
- of errors, indicating that all happy-path artifacts produced by the step
1114
- are missing.
1336
+ Specifies secrets to be retrieved and injected as environment variables prior to
1337
+ the execution of a step.
1115
1338
 
1116
1339
  Parameters
1117
1340
  ----------
1118
- var : str, optional, default None
1119
- Name of the artifact in which to store the caught exception.
1120
- If not specified, the exception is not stored.
1121
- print_exception : bool, default True
1122
- Determines whether or not the exception is printed to
1123
- stdout when caught.
1341
+ sources : List[Union[str, Dict[str, Any]]], default: []
1342
+ List of secret specs, defining how the secrets are to be retrieved
1124
1343
  """
1125
1344
  ...
1126
1345
 
1127
1346
  @typing.overload
1128
- def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1347
+ def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1129
1348
  ...
1130
1349
 
1131
1350
  @typing.overload
1132
- def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1351
+ def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1133
1352
  ...
1134
1353
 
1135
- 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):
1354
+ 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]]] = []):
1136
1355
  """
1137
- Specifies that the step will success under all circumstances.
1138
-
1139
- The decorator will create an optional artifact, specified by `var`, which
1140
- contains the exception raised. You can use it to detect the presence
1141
- of errors, indicating that all happy-path artifacts produced by the step
1142
- are missing.
1356
+ Specifies secrets to be retrieved and injected as environment variables prior to
1357
+ the execution of a step.
1143
1358
 
1144
1359
  Parameters
1145
1360
  ----------
1146
- var : str, optional, default None
1147
- Name of the artifact in which to store the caught exception.
1148
- If not specified, the exception is not stored.
1149
- print_exception : bool, default True
1150
- Determines whether or not the exception is printed to
1151
- stdout when caught.
1361
+ sources : List[Union[str, Dict[str, Any]]], default: []
1362
+ List of secret specs, defining how the secrets are to be retrieved
1152
1363
  """
1153
1364
  ...
1154
1365
 
1155
1366
  @typing.overload
1156
- def resources(*, cpu: int = 1, gpu: int = 0, 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]]]:
1367
+ 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]]]:
1157
1368
  """
1158
- Specifies the resources needed when executing this step.
1159
-
1160
- Use `@resources` to specify the resource requirements
1161
- independently of the specific compute layer (`@batch`, `@kubernetes`).
1369
+ Specifies the PyPI packages for the step.
1162
1370
 
1163
- You can choose the compute layer on the command line by executing e.g.
1164
- ```
1165
- python myflow.py run --with batch
1166
- ```
1167
- or
1168
- ```
1169
- python myflow.py run --with kubernetes
1170
- ```
1171
- which executes the flow on the desired system using the
1172
- requirements specified in `@resources`.
1371
+ Information in this decorator will augment any
1372
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
1373
+ you can use `@pypi_base` to set packages required by all
1374
+ steps and use `@pypi` to specify step-specific overrides.
1173
1375
 
1174
1376
  Parameters
1175
1377
  ----------
1176
- cpu : int, default 1
1177
- Number of CPUs required for this step.
1178
- gpu : int, default 0
1179
- Number of GPUs required for this step.
1180
- disk : int, optional, default None
1181
- Disk size (in MB) required for this step. Only applies on Kubernetes.
1182
- memory : int, default 4096
1183
- Memory size (in MB) required for this step.
1184
- shared_memory : int, optional, default None
1185
- The value for the size (in MiB) of the /dev/shm volume for this step.
1186
- This parameter maps to the `--shm-size` option in Docker.
1378
+ packages : Dict[str, str], default: {}
1379
+ Packages to use for this step. The key is the name of the package
1380
+ and the value is the version to use.
1381
+ python : str, optional, default: None
1382
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1383
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1187
1384
  """
1188
1385
  ...
1189
1386
 
1190
1387
  @typing.overload
1191
- def resources(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1388
+ def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1192
1389
  ...
1193
1390
 
1194
1391
  @typing.overload
1195
- def resources(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1392
+ def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1196
1393
  ...
1197
1394
 
1198
- def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, cpu: int = 1, gpu: int = 0, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None):
1395
+ 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):
1199
1396
  """
1200
- Specifies the resources needed when executing this step.
1201
-
1202
- Use `@resources` to specify the resource requirements
1203
- independently of the specific compute layer (`@batch`, `@kubernetes`).
1397
+ Specifies the PyPI packages for the step.
1204
1398
 
1205
- You can choose the compute layer on the command line by executing e.g.
1206
- ```
1207
- python myflow.py run --with batch
1208
- ```
1209
- or
1210
- ```
1211
- python myflow.py run --with kubernetes
1212
- ```
1213
- which executes the flow on the desired system using the
1214
- requirements specified in `@resources`.
1399
+ Information in this decorator will augment any
1400
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
1401
+ you can use `@pypi_base` to set packages required by all
1402
+ steps and use `@pypi` to specify step-specific overrides.
1215
1403
 
1216
1404
  Parameters
1217
1405
  ----------
1218
- cpu : int, default 1
1219
- Number of CPUs required for this step.
1220
- gpu : int, default 0
1221
- Number of GPUs required for this step.
1222
- disk : int, optional, default None
1223
- Disk size (in MB) required for this step. Only applies on Kubernetes.
1224
- memory : int, default 4096
1225
- Memory size (in MB) required for this step.
1226
- shared_memory : int, optional, default None
1227
- The value for the size (in MiB) of the /dev/shm volume for this step.
1228
- This parameter maps to the `--shm-size` option in Docker.
1406
+ packages : Dict[str, str], default: {}
1407
+ Packages to use for this step. The key is the name of the package
1408
+ and the value is the version to use.
1409
+ python : str, optional, default: None
1410
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1411
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1229
1412
  """
1230
1413
  ...
1231
1414
 
1232
- @typing.overload
1233
- def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = []) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
1234
- """
1235
- Specifies secrets to be retrieved and injected as environment variables prior to
1236
- the execution of a step.
1237
-
1238
- Parameters
1239
- ----------
1240
- sources : List[Union[str, Dict[str, Any]]], default: []
1241
- List of secret specs, defining how the secrets are to be retrieved
1242
- """
1243
- ...
1244
-
1245
- @typing.overload
1246
- def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1247
- ...
1248
-
1249
- @typing.overload
1250
- def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1251
- ...
1252
-
1253
- 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]]] = []):
1254
- """
1255
- Specifies secrets to be retrieved and injected as environment variables prior to
1256
- the execution of a step.
1257
-
1258
- Parameters
1259
- ----------
1260
- sources : List[Union[str, Dict[str, Any]]], default: []
1261
- List of secret specs, defining how the secrets are to be retrieved
1262
- """
1263
- ...
1264
-
1265
- @typing.overload
1266
- 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]]]:
1267
- """
1268
- Creates a human-readable report, a Metaflow Card, after this step completes.
1269
-
1270
- Note that you may add multiple `@card` decorators in a step with different parameters.
1271
-
1272
- Parameters
1273
- ----------
1274
- type : str, default 'default'
1275
- Card type.
1276
- id : str, optional, default None
1277
- If multiple cards are present, use this id to identify this card.
1278
- options : Dict[str, Any], default {}
1279
- Options passed to the card. The contents depend on the card type.
1280
- timeout : int, default 45
1281
- Interrupt reporting if it takes more than this many seconds.
1282
-
1283
-
1284
- """
1285
- ...
1286
-
1287
- @typing.overload
1288
- def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1289
- ...
1290
-
1291
- @typing.overload
1292
- def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1293
- ...
1294
-
1295
- 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):
1296
- """
1297
- Creates a human-readable report, a Metaflow Card, after this step completes.
1298
-
1299
- Note that you may add multiple `@card` decorators in a step with different parameters.
1300
-
1301
- Parameters
1302
- ----------
1303
- type : str, default 'default'
1304
- Card type.
1305
- id : str, optional, default None
1306
- If multiple cards are present, use this id to identify this card.
1307
- options : Dict[str, Any], default {}
1308
- Options passed to the card. The contents depend on the card type.
1309
- timeout : int, default 45
1310
- Interrupt reporting if it takes more than this many seconds.
1311
-
1312
-
1313
- """
1314
- ...
1315
-
1316
- @typing.overload
1317
- 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]]]:
1318
- """
1319
- Specifies the PyPI packages for the step.
1320
-
1321
- Information in this decorator will augment any
1322
- attributes set in the `@pyi_base` flow-level decorator. Hence,
1323
- you can use `@pypi_base` to set packages required by all
1324
- steps and use `@pypi` to specify step-specific overrides.
1325
-
1326
- Parameters
1327
- ----------
1328
- packages : Dict[str, str], default: {}
1329
- Packages to use for this step. The key is the name of the package
1330
- and the value is the version to use.
1331
- python : str, optional, default: None
1332
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1333
- that the version used will correspond to the version of the Python interpreter used to start the run.
1334
- """
1335
- ...
1336
-
1337
- @typing.overload
1338
- def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1339
- ...
1340
-
1341
- @typing.overload
1342
- def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1343
- ...
1344
-
1345
- 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):
1346
- """
1347
- Specifies the PyPI packages for the step.
1348
-
1349
- Information in this decorator will augment any
1350
- attributes set in the `@pyi_base` flow-level decorator. Hence,
1351
- you can use `@pypi_base` to set packages required by all
1352
- steps and use `@pypi` to specify step-specific overrides.
1353
-
1354
- Parameters
1355
- ----------
1356
- packages : Dict[str, str], default: {}
1357
- Packages to use for this step. The key is the name of the package
1358
- and the value is the version to use.
1359
- python : str, optional, default: None
1360
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1361
- that the version used will correspond to the version of the Python interpreter used to start the run.
1362
- """
1363
- ...
1364
-
1365
- @typing.overload
1366
- def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1367
- """
1368
- Decorator prototype for all step decorators. This function gets specialized
1369
- and imported for all decorators types by _import_plugin_decorators().
1370
- """
1371
- ...
1372
-
1373
- @typing.overload
1374
- def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1375
- ...
1376
-
1377
- def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
1378
- """
1379
- Decorator prototype for all step decorators. This function gets specialized
1380
- and imported for all decorators types by _import_plugin_decorators().
1381
- """
1382
- ...
1383
-
1384
- @typing.overload
1385
- 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]]]:
1386
- """
1387
- Specifies environment variables to be set prior to the execution of a step.
1388
-
1389
- Parameters
1390
- ----------
1391
- vars : Dict[str, str], default {}
1392
- Dictionary of environment variables to set.
1393
- """
1394
- ...
1395
-
1396
- @typing.overload
1397
- def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1398
- ...
1399
-
1400
- @typing.overload
1401
- def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1402
- ...
1403
-
1404
- def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
1405
- """
1406
- Specifies environment variables to be set prior to the execution of a step.
1407
-
1408
- Parameters
1409
- ----------
1410
- vars : Dict[str, str], default {}
1411
- Dictionary of environment variables to set.
1412
- """
1413
- ...
1414
-
1415
- @typing.overload
1416
- 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]]:
1417
- """
1418
- Specifies the Conda environment for all steps of the flow.
1419
-
1420
- Use `@conda_base` to set common libraries required by all
1421
- steps and use `@conda` to specify step-specific additions.
1422
-
1423
- Parameters
1424
- ----------
1425
- packages : Dict[str, str], default {}
1426
- Packages to use for this flow. The key is the name of the package
1427
- and the value is the version to use.
1428
- libraries : Dict[str, str], default {}
1429
- Supported for backward compatibility. When used with packages, packages will take precedence.
1430
- python : str, optional, default None
1431
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1432
- that the version used will correspond to the version of the Python interpreter used to start the run.
1433
- disabled : bool, default False
1434
- If set to True, disables Conda.
1435
- """
1436
- ...
1437
-
1438
- @typing.overload
1439
- def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1440
- ...
1441
-
1442
- 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):
1443
- """
1444
- Specifies the Conda environment for all steps of the flow.
1445
-
1446
- Use `@conda_base` to set common libraries required by all
1447
- steps and use `@conda` to specify step-specific additions.
1448
-
1449
- Parameters
1450
- ----------
1451
- packages : Dict[str, str], default {}
1452
- Packages to use for this flow. The key is the name of the package
1453
- and the value is the version to use.
1454
- libraries : Dict[str, str], default {}
1455
- Supported for backward compatibility. When used with packages, packages will take precedence.
1456
- python : str, optional, default None
1457
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1458
- that the version used will correspond to the version of the Python interpreter used to start the run.
1459
- disabled : bool, default False
1460
- If set to True, disables Conda.
1461
- """
1462
- ...
1463
-
1464
- 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]]:
1415
+ 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]]:
1465
1416
  """
1466
1417
  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)
1467
1418
  before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
@@ -1504,172 +1455,41 @@ def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, expone
1504
1455
  ...
1505
1456
 
1506
1457
  @typing.overload
1507
- def trigger_on_finish(*, flow: typing.Union[str, typing.Dict[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]]:
1508
- """
1509
- Specifies the flow(s) that this flow depends on.
1510
-
1511
- ```
1512
- @trigger_on_finish(flow='FooFlow')
1513
- ```
1514
- or
1515
- ```
1516
- @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1517
- ```
1518
- This decorator respects the @project decorator and triggers the flow
1519
- when upstream runs within the same namespace complete successfully
1520
-
1521
- Additionally, you can specify project aware upstream flow dependencies
1522
- by specifying the fully qualified project_flow_name.
1523
- ```
1524
- @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1525
- ```
1526
- or
1527
- ```
1528
- @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1529
- ```
1530
-
1531
- You can also specify just the project or project branch (other values will be
1532
- inferred from the current project or project branch):
1533
- ```
1534
- @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1535
- ```
1536
-
1537
- Note that `branch` is typically one of:
1538
- - `prod`
1539
- - `user.bob`
1540
- - `test.my_experiment`
1541
- - `prod.staging`
1542
-
1543
- Parameters
1544
- ----------
1545
- flow : Union[str, Dict[str, str]], optional, default None
1546
- Upstream flow dependency for this flow.
1547
- flows : List[Union[str, Dict[str, str]]], default []
1548
- Upstream flow dependencies for this flow.
1549
- options : Dict[str, Any], default {}
1550
- Backend-specific configuration for tuning eventing behavior.
1551
-
1552
-
1553
- """
1554
- ...
1555
-
1556
- @typing.overload
1557
- def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1558
- ...
1559
-
1560
- def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, flow: typing.Union[str, typing.Dict[str, str], None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}):
1561
- """
1562
- Specifies the flow(s) that this flow depends on.
1563
-
1564
- ```
1565
- @trigger_on_finish(flow='FooFlow')
1566
- ```
1567
- or
1568
- ```
1569
- @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1570
- ```
1571
- This decorator respects the @project decorator and triggers the flow
1572
- when upstream runs within the same namespace complete successfully
1573
-
1574
- Additionally, you can specify project aware upstream flow dependencies
1575
- by specifying the fully qualified project_flow_name.
1576
- ```
1577
- @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1578
- ```
1579
- or
1580
- ```
1581
- @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1582
- ```
1583
-
1584
- You can also specify just the project or project branch (other values will be
1585
- inferred from the current project or project branch):
1586
- ```
1587
- @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1588
- ```
1589
-
1590
- Note that `branch` is typically one of:
1591
- - `prod`
1592
- - `user.bob`
1593
- - `test.my_experiment`
1594
- - `prod.staging`
1595
-
1596
- Parameters
1597
- ----------
1598
- flow : Union[str, Dict[str, str]], optional, default None
1599
- Upstream flow dependency for this flow.
1600
- flows : List[Union[str, Dict[str, str]]], default []
1601
- Upstream flow dependencies for this flow.
1602
- options : Dict[str, Any], default {}
1603
- Backend-specific configuration for tuning eventing behavior.
1604
-
1605
-
1606
- """
1607
- ...
1608
-
1609
- def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1610
- """
1611
- Specifies what flows belong to the same project.
1612
-
1613
- A project-specific namespace is created for all flows that
1614
- use the same `@project(name)`.
1615
-
1616
- Parameters
1617
- ----------
1618
- name : str
1619
- Project name. Make sure that the name is unique amongst all
1620
- projects that use the same production scheduler. The name may
1621
- contain only lowercase alphanumeric characters and underscores.
1622
-
1623
-
1624
- """
1625
- ...
1626
-
1627
- @typing.overload
1628
- def schedule(*, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1458
+ def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1629
1459
  """
1630
- Specifies the times when the flow should be run when running on a
1631
- production scheduler.
1460
+ Specifies the PyPI packages for all steps of the flow.
1632
1461
 
1462
+ Use `@pypi_base` to set common packages required by all
1463
+ steps and use `@pypi` to specify step-specific overrides.
1633
1464
  Parameters
1634
1465
  ----------
1635
- hourly : bool, default False
1636
- Run the workflow hourly.
1637
- daily : bool, default True
1638
- Run the workflow daily.
1639
- weekly : bool, default False
1640
- Run the workflow weekly.
1641
- cron : str, optional, default None
1642
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1643
- specified by this expression.
1644
- timezone : str, optional, default None
1645
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1646
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1466
+ packages : Dict[str, str], default: {}
1467
+ Packages to use for this flow. The key is the name of the package
1468
+ and the value is the version to use.
1469
+ python : str, optional, default: None
1470
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1471
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1647
1472
  """
1648
1473
  ...
1649
1474
 
1650
1475
  @typing.overload
1651
- def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1476
+ def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1652
1477
  ...
1653
1478
 
1654
- def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None):
1479
+ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1655
1480
  """
1656
- Specifies the times when the flow should be run when running on a
1657
- production scheduler.
1481
+ Specifies the PyPI packages for all steps of the flow.
1658
1482
 
1483
+ Use `@pypi_base` to set common packages required by all
1484
+ steps and use `@pypi` to specify step-specific overrides.
1659
1485
  Parameters
1660
1486
  ----------
1661
- hourly : bool, default False
1662
- Run the workflow hourly.
1663
- daily : bool, default True
1664
- Run the workflow daily.
1665
- weekly : bool, default False
1666
- Run the workflow weekly.
1667
- cron : str, optional, default None
1668
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1669
- specified by this expression.
1670
- timezone : str, optional, default None
1671
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1672
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1487
+ packages : Dict[str, str], default: {}
1488
+ Packages to use for this flow. The key is the name of the package
1489
+ and the value is the version to use.
1490
+ python : str, optional, default: None
1491
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1492
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1673
1493
  """
1674
1494
  ...
1675
1495
 
@@ -1768,6 +1588,127 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
1768
1588
  """
1769
1589
  ...
1770
1590
 
1591
+ def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1592
+ """
1593
+ Specifies what flows belong to the same project.
1594
+
1595
+ A project-specific namespace is created for all flows that
1596
+ use the same `@project(name)`.
1597
+
1598
+ Parameters
1599
+ ----------
1600
+ name : str
1601
+ Project name. Make sure that the name is unique amongst all
1602
+ projects that use the same production scheduler. The name may
1603
+ contain only lowercase alphanumeric characters and underscores.
1604
+
1605
+
1606
+ """
1607
+ ...
1608
+
1609
+ @typing.overload
1610
+ def trigger_on_finish(*, flow: typing.Union[str, typing.Dict[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]]:
1611
+ """
1612
+ Specifies the flow(s) that this flow depends on.
1613
+
1614
+ ```
1615
+ @trigger_on_finish(flow='FooFlow')
1616
+ ```
1617
+ or
1618
+ ```
1619
+ @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1620
+ ```
1621
+ This decorator respects the @project decorator and triggers the flow
1622
+ when upstream runs within the same namespace complete successfully
1623
+
1624
+ Additionally, you can specify project aware upstream flow dependencies
1625
+ by specifying the fully qualified project_flow_name.
1626
+ ```
1627
+ @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1628
+ ```
1629
+ or
1630
+ ```
1631
+ @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1632
+ ```
1633
+
1634
+ You can also specify just the project or project branch (other values will be
1635
+ inferred from the current project or project branch):
1636
+ ```
1637
+ @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1638
+ ```
1639
+
1640
+ Note that `branch` is typically one of:
1641
+ - `prod`
1642
+ - `user.bob`
1643
+ - `test.my_experiment`
1644
+ - `prod.staging`
1645
+
1646
+ Parameters
1647
+ ----------
1648
+ flow : Union[str, Dict[str, str]], optional, default None
1649
+ Upstream flow dependency for this flow.
1650
+ flows : List[Union[str, Dict[str, str]]], default []
1651
+ Upstream flow dependencies for this flow.
1652
+ options : Dict[str, Any], default {}
1653
+ Backend-specific configuration for tuning eventing behavior.
1654
+
1655
+
1656
+ """
1657
+ ...
1658
+
1659
+ @typing.overload
1660
+ def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1661
+ ...
1662
+
1663
+ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, flow: typing.Union[str, typing.Dict[str, str], None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}):
1664
+ """
1665
+ Specifies the flow(s) that this flow depends on.
1666
+
1667
+ ```
1668
+ @trigger_on_finish(flow='FooFlow')
1669
+ ```
1670
+ or
1671
+ ```
1672
+ @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1673
+ ```
1674
+ This decorator respects the @project decorator and triggers the flow
1675
+ when upstream runs within the same namespace complete successfully
1676
+
1677
+ Additionally, you can specify project aware upstream flow dependencies
1678
+ by specifying the fully qualified project_flow_name.
1679
+ ```
1680
+ @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1681
+ ```
1682
+ or
1683
+ ```
1684
+ @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1685
+ ```
1686
+
1687
+ You can also specify just the project or project branch (other values will be
1688
+ inferred from the current project or project branch):
1689
+ ```
1690
+ @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1691
+ ```
1692
+
1693
+ Note that `branch` is typically one of:
1694
+ - `prod`
1695
+ - `user.bob`
1696
+ - `test.my_experiment`
1697
+ - `prod.staging`
1698
+
1699
+ Parameters
1700
+ ----------
1701
+ flow : Union[str, Dict[str, str]], optional, default None
1702
+ Upstream flow dependency for this flow.
1703
+ flows : List[Union[str, Dict[str, str]]], default []
1704
+ Upstream flow dependencies for this flow.
1705
+ options : Dict[str, Any], default {}
1706
+ Backend-specific configuration for tuning eventing behavior.
1707
+
1708
+
1709
+ """
1710
+ ...
1711
+
1771
1712
  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]]:
1772
1713
  """
1773
1714
  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.
@@ -1811,41 +1752,100 @@ def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str,
1811
1752
  ...
1812
1753
 
1813
1754
  @typing.overload
1814
- def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1755
+ 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]]:
1815
1756
  """
1816
- Specifies the PyPI packages for all steps of the flow.
1757
+ Specifies the Conda environment for all steps of the flow.
1758
+
1759
+ Use `@conda_base` to set common libraries required by all
1760
+ steps and use `@conda` to specify step-specific additions.
1817
1761
 
1818
- Use `@pypi_base` to set common packages required by all
1819
- steps and use `@pypi` to specify step-specific overrides.
1820
1762
  Parameters
1821
1763
  ----------
1822
- packages : Dict[str, str], default: {}
1764
+ packages : Dict[str, str], default {}
1823
1765
  Packages to use for this flow. The key is the name of the package
1824
1766
  and the value is the version to use.
1825
- python : str, optional, default: None
1767
+ libraries : Dict[str, str], default {}
1768
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1769
+ python : str, optional, default None
1826
1770
  Version of Python to use, e.g. '3.7.4'. A default value of None implies
1827
1771
  that the version used will correspond to the version of the Python interpreter used to start the run.
1772
+ disabled : bool, default False
1773
+ If set to True, disables Conda.
1828
1774
  """
1829
1775
  ...
1830
1776
 
1831
1777
  @typing.overload
1832
- def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1778
+ def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1833
1779
  ...
1834
1780
 
1835
- def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1781
+ 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):
1836
1782
  """
1837
- Specifies the PyPI packages for all steps of the flow.
1783
+ Specifies the Conda environment for all steps of the flow.
1784
+
1785
+ Use `@conda_base` to set common libraries required by all
1786
+ steps and use `@conda` to specify step-specific additions.
1838
1787
 
1839
- Use `@pypi_base` to set common packages required by all
1840
- steps and use `@pypi` to specify step-specific overrides.
1841
1788
  Parameters
1842
1789
  ----------
1843
- packages : Dict[str, str], default: {}
1790
+ packages : Dict[str, str], default {}
1844
1791
  Packages to use for this flow. The key is the name of the package
1845
1792
  and the value is the version to use.
1846
- python : str, optional, default: None
1793
+ libraries : Dict[str, str], default {}
1794
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1795
+ python : str, optional, default None
1847
1796
  Version of Python to use, e.g. '3.7.4'. A default value of None implies
1848
1797
  that the version used will correspond to the version of the Python interpreter used to start the run.
1798
+ disabled : bool, default False
1799
+ If set to True, disables Conda.
1800
+ """
1801
+ ...
1802
+
1803
+ @typing.overload
1804
+ def schedule(*, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1805
+ """
1806
+ Specifies the times when the flow should be run when running on a
1807
+ production scheduler.
1808
+
1809
+ Parameters
1810
+ ----------
1811
+ hourly : bool, default False
1812
+ Run the workflow hourly.
1813
+ daily : bool, default True
1814
+ Run the workflow daily.
1815
+ weekly : bool, default False
1816
+ Run the workflow weekly.
1817
+ cron : str, optional, default None
1818
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1819
+ specified by this expression.
1820
+ timezone : str, optional, default None
1821
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1822
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1823
+ """
1824
+ ...
1825
+
1826
+ @typing.overload
1827
+ def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1828
+ ...
1829
+
1830
+ def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly: bool = False, daily: bool = True, weekly: bool = False, cron: typing.Optional[str] = None, timezone: typing.Optional[str] = None):
1831
+ """
1832
+ Specifies the times when the flow should be run when running on a
1833
+ production scheduler.
1834
+
1835
+ Parameters
1836
+ ----------
1837
+ hourly : bool, default False
1838
+ Run the workflow hourly.
1839
+ daily : bool, default True
1840
+ Run the workflow daily.
1841
+ weekly : bool, default False
1842
+ Run the workflow weekly.
1843
+ cron : str, optional, default None
1844
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1845
+ specified by this expression.
1846
+ timezone : str, optional, default None
1847
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1848
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1849
1849
  """
1850
1850
  ...
1851
1851