ob-metaflow-stubs 5.0__py2.py3-none-any.whl → 5.1__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 (137) hide show
  1. metaflow-stubs/__init__.pyi +485 -485
  2. metaflow-stubs/cards.pyi +5 -5
  3. metaflow-stubs/cli.pyi +3 -3
  4. metaflow-stubs/client/__init__.pyi +4 -4
  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 +3 -3
  9. metaflow-stubs/exception.pyi +2 -2
  10. metaflow-stubs/flowspec.pyi +4 -4
  11. metaflow-stubs/generated_for.txt +1 -1
  12. metaflow-stubs/includefile.pyi +4 -4
  13. metaflow-stubs/metadata/metadata.pyi +3 -3
  14. metaflow-stubs/metadata/util.pyi +2 -2
  15. metaflow-stubs/metaflow_config.pyi +4 -2
  16. metaflow-stubs/metaflow_current.pyi +22 -22
  17. metaflow-stubs/mflog/mflog.pyi +2 -2
  18. metaflow-stubs/multicore_utils.pyi +2 -2
  19. metaflow-stubs/parameters.pyi +4 -4
  20. metaflow-stubs/plugins/__init__.pyi +2 -2
  21. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  22. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  23. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  24. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
  25. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +3 -3
  26. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +3 -3
  27. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +3 -3
  28. metaflow-stubs/plugins/argo/__init__.pyi +2 -2
  29. metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
  30. metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
  31. metaflow-stubs/plugins/argo/argo_workflows.pyi +44 -10
  32. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +14 -14
  33. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +7 -7
  34. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +4 -4
  35. metaflow-stubs/plugins/aws/__init__.pyi +2 -2
  36. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  37. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  38. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  39. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  40. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  41. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  42. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +2 -2
  43. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
  44. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  45. metaflow-stubs/plugins/aws/step_functions/production_token.pyi +2 -2
  46. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
  47. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
  48. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  49. metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +2 -2
  50. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  51. metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
  52. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  53. metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +2 -2
  54. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  55. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  56. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  57. metaflow-stubs/plugins/cards/__init__.pyi +2 -2
  58. metaflow-stubs/plugins/cards/card_cli.pyi +3 -3
  59. metaflow-stubs/plugins/cards/card_client.pyi +3 -3
  60. metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
  61. metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
  62. metaflow-stubs/plugins/cards/card_decorator.pyi +3 -3
  63. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  64. metaflow-stubs/plugins/cards/card_modules/basic.pyi +4 -4
  65. metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
  66. metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
  67. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
  68. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  69. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +3 -3
  70. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  71. metaflow-stubs/plugins/cards/component_serializer.pyi +4 -4
  72. metaflow-stubs/plugins/cards/exception.pyi +2 -2
  73. metaflow-stubs/plugins/catch_decorator.pyi +4 -4
  74. metaflow-stubs/plugins/datatools/__init__.pyi +3 -3
  75. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  76. metaflow-stubs/plugins/datatools/s3/__init__.pyi +3 -3
  77. metaflow-stubs/plugins/datatools/s3/s3.pyi +5 -5
  78. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  79. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  80. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  81. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  82. metaflow-stubs/plugins/environment_decorator.pyi +2 -2
  83. metaflow-stubs/plugins/events_decorator.pyi +3 -3
  84. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  85. metaflow-stubs/plugins/frameworks/pytorch.pyi +3 -3
  86. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  87. metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +2 -2
  88. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  89. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  90. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  91. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  92. metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
  93. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +3 -3
  94. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +3 -3
  95. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  96. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +4 -4
  97. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -4
  98. metaflow-stubs/plugins/logs_cli.pyi +3 -3
  99. metaflow-stubs/plugins/package_cli.pyi +2 -2
  100. metaflow-stubs/plugins/parallel_decorator.pyi +3 -3
  101. metaflow-stubs/plugins/perimeters.pyi +2 -2
  102. metaflow-stubs/plugins/project_decorator.pyi +3 -3
  103. metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
  104. metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
  105. metaflow-stubs/plugins/pypi/conda_environment.pyi +4 -4
  106. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
  107. metaflow-stubs/plugins/pypi/pypi_environment.pyi +3 -3
  108. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  109. metaflow-stubs/plugins/resources_decorator.pyi +2 -2
  110. metaflow-stubs/plugins/retry_decorator.pyi +2 -2
  111. metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
  112. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
  113. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
  114. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  115. metaflow-stubs/plugins/tag_cli.pyi +4 -4
  116. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +3 -3
  117. metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
  118. metaflow-stubs/procpoll.pyi +2 -2
  119. metaflow-stubs/profilers/__init__.pyi +2 -2
  120. metaflow-stubs/pylint_wrapper.pyi +2 -2
  121. metaflow-stubs/runner/__init__.pyi +2 -2
  122. metaflow-stubs/runner/deployer.pyi +4 -4
  123. metaflow-stubs/runner/metaflow_runner.pyi +4 -4
  124. metaflow-stubs/runner/nbdeploy.pyi +2 -2
  125. metaflow-stubs/runner/nbrun.pyi +2 -2
  126. metaflow-stubs/runner/subprocess_manager.pyi +2 -2
  127. metaflow-stubs/runner/utils.pyi +2 -2
  128. metaflow-stubs/system/__init__.pyi +2 -2
  129. metaflow-stubs/system/system_logger.pyi +2 -2
  130. metaflow-stubs/system/system_monitor.pyi +2 -2
  131. metaflow-stubs/tagging_util.pyi +2 -2
  132. metaflow-stubs/tuple_util.pyi +2 -2
  133. {ob_metaflow_stubs-5.0.dist-info → ob_metaflow_stubs-5.1.dist-info}/METADATA +1 -1
  134. ob_metaflow_stubs-5.1.dist-info/RECORD +137 -0
  135. ob_metaflow_stubs-5.0.dist-info/RECORD +0 -137
  136. {ob_metaflow_stubs-5.0.dist-info → ob_metaflow_stubs-5.1.dist-info}/WHEEL +0 -0
  137. {ob_metaflow_stubs-5.0.dist-info → ob_metaflow_stubs-5.1.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.10.2+ob(v1) #
4
- # Generated on 2024-08-06T17:10:53.103007 #
3
+ # MF version: 2.12.11.0+ob(v1) #
4
+ # Generated on 2024-08-08T23:50:17.875353 #
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.events
12
- import metaflow.flowspec
13
11
  import metaflow.parameters
12
+ import typing
13
+ import metaflow.plugins.datatools.s3.s3
14
+ import metaflow.client.core
14
15
  import metaflow.metaflow_current
16
+ import metaflow.flowspec
17
+ import metaflow._vendor.click.types
15
18
  import io
16
- import metaflow.client.core
19
+ import datetime
17
20
  import metaflow.datastore.inputs
21
+ import metaflow.events
18
22
  import metaflow.runner.metaflow_runner
19
- import typing
20
- import metaflow._vendor.click.types
21
- import metaflow.plugins.datatools.s3.s3
22
- import datetime
23
23
  FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
24
24
  StepFlag = typing.NewType("StepFlag", bool)
25
25
 
@@ -728,59 +728,185 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
728
728
  ...
729
729
 
730
730
  @typing.overload
731
- 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]]]:
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
732
  """
733
- Specifies the Conda environment for the step.
733
+ Specifies that the step will success under all circumstances.
734
734
 
735
- Information in this decorator will augment any
736
- attributes set in the `@conda_base` flow-level decorator. Hence,
737
- you can use `@conda_base` to set packages required by all
738
- steps and use `@conda` to specify step-specific overrides.
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
739
 
740
740
  Parameters
741
741
  ----------
742
- packages : Dict[str, str], default {}
743
- Packages to use for this step. The key is the name of the package
744
- and the value is the version to use.
745
- libraries : Dict[str, str], default {}
746
- Supported for backward compatibility. When used with packages, packages will take precedence.
747
- python : str, optional, default None
748
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
749
- that the version used will correspond to the version of the Python interpreter used to start the run.
750
- disabled : bool, default False
751
- If set to True, disables @conda.
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.
752
748
  """
753
749
  ...
754
750
 
755
751
  @typing.overload
756
- def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
752
+ def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
757
753
  ...
758
754
 
759
755
  @typing.overload
760
- def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
756
+ def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
761
757
  ...
762
758
 
763
- 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):
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):
764
760
  """
765
- Specifies the Conda environment for the step.
761
+ Specifies that the step will success under all circumstances.
766
762
 
767
- Information in this decorator will augment any
768
- attributes set in the `@conda_base` flow-level decorator. Hence,
769
- you can use `@conda_base` to set packages required by all
770
- steps and use `@conda` to specify step-specific overrides.
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.
771
767
 
772
768
  Parameters
773
769
  ----------
774
- packages : Dict[str, str], default {}
775
- Packages to use for this step. The key is the name of the package
776
- and the value is the version to use.
777
- libraries : Dict[str, str], default {}
778
- Supported for backward compatibility. When used with packages, packages will take precedence.
779
- python : str, optional, default None
780
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
781
- that the version used will correspond to the version of the Python interpreter used to start the run.
782
- disabled : bool, default False
783
- If set to True, disables @conda.
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
+ @typing.overload
780
+ 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]]]:
781
+ """
782
+ Specifies the resources needed when executing this step.
783
+
784
+ Use `@resources` to specify the resource requirements
785
+ independently of the specific compute layer (`@batch`, `@kubernetes`).
786
+
787
+ You can choose the compute layer on the command line by executing e.g.
788
+ ```
789
+ python myflow.py run --with batch
790
+ ```
791
+ or
792
+ ```
793
+ python myflow.py run --with kubernetes
794
+ ```
795
+ which executes the flow on the desired system using the
796
+ requirements specified in `@resources`.
797
+
798
+ Parameters
799
+ ----------
800
+ cpu : int, default 1
801
+ Number of CPUs required for this step.
802
+ gpu : int, default 0
803
+ Number of GPUs required for this step.
804
+ disk : int, optional, default None
805
+ Disk size (in MB) required for this step. Only applies on Kubernetes.
806
+ memory : int, default 4096
807
+ Memory size (in MB) required for this step.
808
+ shared_memory : int, optional, default None
809
+ The value for the size (in MiB) of the /dev/shm volume for this step.
810
+ This parameter maps to the `--shm-size` option in Docker.
811
+ """
812
+ ...
813
+
814
+ @typing.overload
815
+ def resources(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
816
+ ...
817
+
818
+ @typing.overload
819
+ def resources(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
820
+ ...
821
+
822
+ 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):
823
+ """
824
+ Specifies the resources needed when executing this step.
825
+
826
+ Use `@resources` to specify the resource requirements
827
+ independently of the specific compute layer (`@batch`, `@kubernetes`).
828
+
829
+ You can choose the compute layer on the command line by executing e.g.
830
+ ```
831
+ python myflow.py run --with batch
832
+ ```
833
+ or
834
+ ```
835
+ python myflow.py run --with kubernetes
836
+ ```
837
+ which executes the flow on the desired system using the
838
+ requirements specified in `@resources`.
839
+
840
+ Parameters
841
+ ----------
842
+ cpu : int, default 1
843
+ Number of CPUs required for this step.
844
+ gpu : int, default 0
845
+ Number of GPUs required for this step.
846
+ disk : int, optional, default None
847
+ Disk size (in MB) required for this step. Only applies on Kubernetes.
848
+ memory : int, default 4096
849
+ Memory size (in MB) required for this step.
850
+ shared_memory : int, optional, default None
851
+ The value for the size (in MiB) of the /dev/shm volume for this step.
852
+ This parameter maps to the `--shm-size` option in Docker.
853
+ """
854
+ ...
855
+
856
+ @typing.overload
857
+ 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]]]:
858
+ """
859
+ Specifies a timeout for your step.
860
+
861
+ This decorator is useful if this step may hang indefinitely.
862
+
863
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
864
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
865
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
866
+
867
+ Note that all the values specified in parameters are added together so if you specify
868
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
869
+
870
+ Parameters
871
+ ----------
872
+ seconds : int, default 0
873
+ Number of seconds to wait prior to timing out.
874
+ minutes : int, default 0
875
+ Number of minutes to wait prior to timing out.
876
+ hours : int, default 0
877
+ Number of hours to wait prior to timing out.
878
+ """
879
+ ...
880
+
881
+ @typing.overload
882
+ def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
883
+ ...
884
+
885
+ @typing.overload
886
+ def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
887
+ ...
888
+
889
+ 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):
890
+ """
891
+ Specifies a timeout for your step.
892
+
893
+ This decorator is useful if this step may hang indefinitely.
894
+
895
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
896
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
897
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
898
+
899
+ Note that all the values specified in parameters are added together so if you specify
900
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
901
+
902
+ Parameters
903
+ ----------
904
+ seconds : int, default 0
905
+ Number of seconds to wait prior to timing out.
906
+ minutes : int, default 0
907
+ Number of minutes to wait prior to timing out.
908
+ hours : int, default 0
909
+ Number of hours to wait prior to timing out.
784
910
  """
785
911
  ...
786
912
 
@@ -865,56 +991,83 @@ def pypi(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typ
865
991
  ...
866
992
 
867
993
  @typing.overload
868
- 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]]]:
994
+ def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
869
995
  """
870
- Creates a human-readable report, a Metaflow Card, after this step completes.
871
-
872
- Note that you may add multiple `@card` decorators in a step with different parameters.
873
-
874
- Parameters
875
- ----------
876
- type : str, default 'default'
877
- Card type.
878
- id : str, optional, default None
879
- If multiple cards are present, use this id to identify this card.
880
- options : Dict[str, Any], default {}
881
- Options passed to the card. The contents depend on the card type.
882
- timeout : int, default 45
883
- Interrupt reporting if it takes more than this many seconds.
884
-
885
-
996
+ Decorator prototype for all step decorators. This function gets specialized
997
+ and imported for all decorators types by _import_plugin_decorators().
886
998
  """
887
999
  ...
888
1000
 
889
1001
  @typing.overload
890
- def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1002
+ def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
891
1003
  ...
892
1004
 
893
- @typing.overload
894
- def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1005
+ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
1006
+ """
1007
+ Decorator prototype for all step decorators. This function gets specialized
1008
+ and imported for all decorators types by _import_plugin_decorators().
1009
+ """
895
1010
  ...
896
1011
 
897
- 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):
1012
+ 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) -> 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]]]:
898
1013
  """
899
- Creates a human-readable report, a Metaflow Card, after this step completes.
900
-
901
- Note that you may add multiple `@card` decorators in a step with different parameters.
1014
+ Specifies that this step should execute on Kubernetes.
902
1015
 
903
1016
  Parameters
904
1017
  ----------
905
- type : str, default 'default'
906
- Card type.
907
- id : str, optional, default None
908
- If multiple cards are present, use this id to identify this card.
909
- options : Dict[str, Any], default {}
910
- Options passed to the card. The contents depend on the card type.
911
- timeout : int, default 45
912
- Interrupt reporting if it takes more than this many seconds.
913
-
914
-
915
- """
916
- ...
917
-
1018
+ cpu : int, default 1
1019
+ Number of CPUs required for this step. If `@resources` is
1020
+ also present, the maximum value from all decorators is used.
1021
+ memory : int, default 4096
1022
+ Memory size (in MB) required for this step. If
1023
+ `@resources` is also present, the maximum value from all decorators is
1024
+ used.
1025
+ disk : int, default 10240
1026
+ Disk size (in MB) required for this step. If
1027
+ `@resources` is also present, the maximum value from all decorators is
1028
+ used.
1029
+ image : str, optional, default None
1030
+ Docker image to use when launching on Kubernetes. If not specified, and
1031
+ METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
1032
+ not, a default Docker image mapping to the current version of Python is used.
1033
+ image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
1034
+ If given, the imagePullPolicy to be applied to the Docker image of the step.
1035
+ service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
1036
+ Kubernetes service account to use when launching pod in Kubernetes.
1037
+ secrets : List[str], optional, default None
1038
+ Kubernetes secrets to use when launching pod in Kubernetes. These
1039
+ secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
1040
+ in Metaflow configuration.
1041
+ namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
1042
+ Kubernetes namespace to use when launching pod in Kubernetes.
1043
+ gpu : int, optional, default None
1044
+ Number of GPUs required for this step. A value of zero implies that
1045
+ the scheduled node should not have GPUs.
1046
+ gpu_vendor : str, default KUBERNETES_GPU_VENDOR
1047
+ The vendor of the GPUs to be used for this step.
1048
+ tolerations : List[str], default []
1049
+ The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
1050
+ Kubernetes tolerations to use when launching pod in Kubernetes.
1051
+ use_tmpfs : bool, default False
1052
+ This enables an explicit tmpfs mount for this step.
1053
+ tmpfs_tempdir : bool, default True
1054
+ sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
1055
+ tmpfs_size : int, optional, default: None
1056
+ The value for the size (in MiB) of the tmpfs mount for this step.
1057
+ This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
1058
+ memory allocated for this step.
1059
+ tmpfs_path : str, optional, default /metaflow_temp
1060
+ Path to tmpfs mount for this step.
1061
+ persistent_volume_claims : Dict[str, str], optional, default None
1062
+ A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
1063
+ volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
1064
+ shared_memory: int, optional
1065
+ Shared memory size (in MiB) required for this step
1066
+ port: int, optional
1067
+ Port number to specify in the Kubernetes job object
1068
+ """
1069
+ ...
1070
+
918
1071
  @typing.overload
919
1072
  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]]]:
920
1073
  """
@@ -969,268 +1122,135 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
969
1122
  ...
970
1123
 
971
1124
  @typing.overload
972
- 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]]]:
1125
+ 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]]]:
973
1126
  """
974
- Specifies a timeout for your step.
975
-
976
- This decorator is useful if this step may hang indefinitely.
977
-
978
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
979
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
980
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
1127
+ Specifies the Conda environment for the step.
981
1128
 
982
- Note that all the values specified in parameters are added together so if you specify
983
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
1129
+ Information in this decorator will augment any
1130
+ attributes set in the `@conda_base` flow-level decorator. Hence,
1131
+ you can use `@conda_base` to set packages required by all
1132
+ steps and use `@conda` to specify step-specific overrides.
984
1133
 
985
1134
  Parameters
986
1135
  ----------
987
- seconds : int, default 0
988
- Number of seconds to wait prior to timing out.
989
- minutes : int, default 0
990
- Number of minutes to wait prior to timing out.
991
- hours : int, default 0
992
- Number of hours to wait prior to timing out.
1136
+ packages : Dict[str, str], default {}
1137
+ Packages to use for this step. The key is the name of the package
1138
+ and the value is the version to use.
1139
+ libraries : Dict[str, str], default {}
1140
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1141
+ python : str, optional, default None
1142
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1143
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1144
+ disabled : bool, default False
1145
+ If set to True, disables @conda.
993
1146
  """
994
1147
  ...
995
1148
 
996
1149
  @typing.overload
997
- def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1150
+ def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
998
1151
  ...
999
1152
 
1000
1153
  @typing.overload
1001
- def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1154
+ def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1002
1155
  ...
1003
1156
 
1004
- 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):
1157
+ 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):
1005
1158
  """
1006
- Specifies a timeout for your step.
1007
-
1008
- This decorator is useful if this step may hang indefinitely.
1009
-
1010
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
1011
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
1012
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
1159
+ Specifies the Conda environment for the step.
1013
1160
 
1014
- Note that all the values specified in parameters are added together so if you specify
1015
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
1161
+ Information in this decorator will augment any
1162
+ attributes set in the `@conda_base` flow-level decorator. Hence,
1163
+ you can use `@conda_base` to set packages required by all
1164
+ steps and use `@conda` to specify step-specific overrides.
1016
1165
 
1017
1166
  Parameters
1018
1167
  ----------
1019
- seconds : int, default 0
1020
- Number of seconds to wait prior to timing out.
1021
- minutes : int, default 0
1022
- Number of minutes to wait prior to timing out.
1023
- hours : int, default 0
1024
- Number of hours to wait prior to timing out.
1168
+ packages : Dict[str, str], default {}
1169
+ Packages to use for this step. The key is the name of the package
1170
+ and the value is the version to use.
1171
+ libraries : Dict[str, str], default {}
1172
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1173
+ python : str, optional, default None
1174
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1175
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1176
+ disabled : bool, default False
1177
+ If set to True, disables @conda.
1025
1178
  """
1026
1179
  ...
1027
1180
 
1028
1181
  @typing.overload
1029
- 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]]]:
1182
+ 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]]]:
1030
1183
  """
1031
- Specifies the resources needed when executing this step.
1032
-
1033
- Use `@resources` to specify the resource requirements
1034
- independently of the specific compute layer (`@batch`, `@kubernetes`).
1184
+ Creates a human-readable report, a Metaflow Card, after this step completes.
1035
1185
 
1036
- You can choose the compute layer on the command line by executing e.g.
1037
- ```
1038
- python myflow.py run --with batch
1039
- ```
1040
- or
1041
- ```
1042
- python myflow.py run --with kubernetes
1043
- ```
1044
- which executes the flow on the desired system using the
1045
- requirements specified in `@resources`.
1186
+ Note that you may add multiple `@card` decorators in a step with different parameters.
1046
1187
 
1047
1188
  Parameters
1048
1189
  ----------
1049
- cpu : int, default 1
1050
- Number of CPUs required for this step.
1051
- gpu : int, default 0
1052
- Number of GPUs required for this step.
1053
- disk : int, optional, default None
1054
- Disk size (in MB) required for this step. Only applies on Kubernetes.
1055
- memory : int, default 4096
1056
- Memory size (in MB) required for this step.
1057
- shared_memory : int, optional, default None
1058
- The value for the size (in MiB) of the /dev/shm volume for this step.
1059
- This parameter maps to the `--shm-size` option in Docker.
1190
+ type : str, default 'default'
1191
+ Card type.
1192
+ id : str, optional, default None
1193
+ If multiple cards are present, use this id to identify this card.
1194
+ options : Dict[str, Any], default {}
1195
+ Options passed to the card. The contents depend on the card type.
1196
+ timeout : int, default 45
1197
+ Interrupt reporting if it takes more than this many seconds.
1198
+
1199
+
1060
1200
  """
1061
1201
  ...
1062
1202
 
1063
1203
  @typing.overload
1064
- def resources(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1204
+ def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1065
1205
  ...
1066
1206
 
1067
1207
  @typing.overload
1068
- def resources(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1208
+ def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1069
1209
  ...
1070
1210
 
1071
- 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):
1211
+ 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):
1072
1212
  """
1073
- Specifies the resources needed when executing this step.
1074
-
1075
- Use `@resources` to specify the resource requirements
1076
- independently of the specific compute layer (`@batch`, `@kubernetes`).
1213
+ Creates a human-readable report, a Metaflow Card, after this step completes.
1077
1214
 
1078
- You can choose the compute layer on the command line by executing e.g.
1079
- ```
1080
- python myflow.py run --with batch
1081
- ```
1082
- or
1083
- ```
1084
- python myflow.py run --with kubernetes
1085
- ```
1086
- which executes the flow on the desired system using the
1087
- requirements specified in `@resources`.
1215
+ Note that you may add multiple `@card` decorators in a step with different parameters.
1088
1216
 
1089
1217
  Parameters
1090
1218
  ----------
1091
- cpu : int, default 1
1092
- Number of CPUs required for this step.
1093
- gpu : int, default 0
1094
- Number of GPUs required for this step.
1095
- disk : int, optional, default None
1096
- Disk size (in MB) required for this step. Only applies on Kubernetes.
1097
- memory : int, default 4096
1098
- Memory size (in MB) required for this step.
1099
- shared_memory : int, optional, default None
1100
- The value for the size (in MiB) of the /dev/shm volume for this step.
1101
- This parameter maps to the `--shm-size` option in Docker.
1102
- """
1103
- ...
1104
-
1105
- @typing.overload
1106
- 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]]]:
1107
- """
1108
- Specifies that the step will success under all circumstances.
1219
+ type : str, default 'default'
1220
+ Card type.
1221
+ id : str, optional, default None
1222
+ If multiple cards are present, use this id to identify this card.
1223
+ options : Dict[str, Any], default {}
1224
+ Options passed to the card. The contents depend on the card type.
1225
+ timeout : int, default 45
1226
+ Interrupt reporting if it takes more than this many seconds.
1109
1227
 
1110
- The decorator will create an optional artifact, specified by `var`, which
1111
- contains the exception raised. You can use it to detect the presence
1112
- of errors, indicating that all happy-path artifacts produced by the step
1113
- are missing.
1114
1228
 
1115
- Parameters
1116
- ----------
1117
- var : str, optional, default None
1118
- Name of the artifact in which to store the caught exception.
1119
- If not specified, the exception is not stored.
1120
- print_exception : bool, default True
1121
- Determines whether or not the exception is printed to
1122
- stdout when caught.
1123
1229
  """
1124
1230
  ...
1125
1231
 
1126
1232
  @typing.overload
1127
- def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1128
- ...
1129
-
1130
- @typing.overload
1131
- def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1132
- ...
1133
-
1134
- 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):
1135
- """
1136
- Specifies that the step will success under all circumstances.
1137
-
1138
- The decorator will create an optional artifact, specified by `var`, which
1139
- contains the exception raised. You can use it to detect the presence
1140
- of errors, indicating that all happy-path artifacts produced by the step
1141
- are missing.
1142
-
1143
- Parameters
1144
- ----------
1145
- var : str, optional, default None
1146
- Name of the artifact in which to store the caught exception.
1147
- If not specified, the exception is not stored.
1148
- print_exception : bool, default True
1149
- Determines whether or not the exception is printed to
1150
- stdout when caught.
1151
- """
1152
- ...
1153
-
1154
- 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) -> 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]]]:
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]]]:
1155
1234
  """
1156
- Specifies that this step should execute on Kubernetes.
1235
+ Specifies secrets to be retrieved and injected as environment variables prior to
1236
+ the execution of a step.
1157
1237
 
1158
1238
  Parameters
1159
1239
  ----------
1160
- cpu : int, default 1
1161
- Number of CPUs required for this step. If `@resources` is
1162
- also present, the maximum value from all decorators is used.
1163
- memory : int, default 4096
1164
- Memory size (in MB) required for this step. If
1165
- `@resources` is also present, the maximum value from all decorators is
1166
- used.
1167
- disk : int, default 10240
1168
- Disk size (in MB) required for this step. If
1169
- `@resources` is also present, the maximum value from all decorators is
1170
- used.
1171
- image : str, optional, default None
1172
- Docker image to use when launching on Kubernetes. If not specified, and
1173
- METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
1174
- not, a default Docker image mapping to the current version of Python is used.
1175
- image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
1176
- If given, the imagePullPolicy to be applied to the Docker image of the step.
1177
- service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
1178
- Kubernetes service account to use when launching pod in Kubernetes.
1179
- secrets : List[str], optional, default None
1180
- Kubernetes secrets to use when launching pod in Kubernetes. These
1181
- secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
1182
- in Metaflow configuration.
1183
- namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
1184
- Kubernetes namespace to use when launching pod in Kubernetes.
1185
- gpu : int, optional, default None
1186
- Number of GPUs required for this step. A value of zero implies that
1187
- the scheduled node should not have GPUs.
1188
- gpu_vendor : str, default KUBERNETES_GPU_VENDOR
1189
- The vendor of the GPUs to be used for this step.
1190
- tolerations : List[str], default []
1191
- The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
1192
- Kubernetes tolerations to use when launching pod in Kubernetes.
1193
- use_tmpfs : bool, default False
1194
- This enables an explicit tmpfs mount for this step.
1195
- tmpfs_tempdir : bool, default True
1196
- sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
1197
- tmpfs_size : int, optional, default: None
1198
- The value for the size (in MiB) of the tmpfs mount for this step.
1199
- This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
1200
- memory allocated for this step.
1201
- tmpfs_path : str, optional, default /metaflow_temp
1202
- Path to tmpfs mount for this step.
1203
- persistent_volume_claims : Dict[str, str], optional, default None
1204
- A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
1205
- volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
1206
- shared_memory: int, optional
1207
- Shared memory size (in MiB) required for this step
1208
- port: int, optional
1209
- Port number to specify in the Kubernetes job object
1240
+ sources : List[Union[str, Dict[str, Any]]], default: []
1241
+ List of secret specs, defining how the secrets are to be retrieved
1210
1242
  """
1211
1243
  ...
1212
1244
 
1213
1245
  @typing.overload
1214
- def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1215
- """
1216
- Decorator prototype for all step decorators. This function gets specialized
1217
- and imported for all decorators types by _import_plugin_decorators().
1218
- """
1246
+ def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1219
1247
  ...
1220
1248
 
1221
1249
  @typing.overload
1222
- def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1223
- ...
1224
-
1225
- def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
1226
- """
1227
- Decorator prototype for all step decorators. This function gets specialized
1228
- and imported for all decorators types by _import_plugin_decorators().
1229
- """
1250
+ def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1230
1251
  ...
1231
1252
 
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]]]:
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]]] = []):
1234
1254
  """
1235
1255
  Specifies secrets to be retrieved and injected as environment variables prior to
1236
1256
  the execution of a step.
@@ -1243,22 +1263,41 @@ def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.An
1243
1263
  ...
1244
1264
 
1245
1265
  @typing.overload
1246
- def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1266
+ def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1267
+ """
1268
+ Specifies the PyPI packages for all steps of the flow.
1269
+
1270
+ Use `@pypi_base` to set common packages required by all
1271
+ steps and use `@pypi` to specify step-specific overrides.
1272
+ Parameters
1273
+ ----------
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
+ python : str, optional, default: None
1278
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1279
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1280
+ """
1247
1281
  ...
1248
1282
 
1249
1283
  @typing.overload
1250
- def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1284
+ def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1251
1285
  ...
1252
1286
 
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]]] = []):
1287
+ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1254
1288
  """
1255
- Specifies secrets to be retrieved and injected as environment variables prior to
1256
- the execution of a step.
1289
+ Specifies the PyPI packages for all steps of the flow.
1257
1290
 
1291
+ Use `@pypi_base` to set common packages required by all
1292
+ steps and use `@pypi` to specify step-specific overrides.
1258
1293
  Parameters
1259
1294
  ----------
1260
- sources : List[Union[str, Dict[str, Any]]], default: []
1261
- List of secret specs, defining how the secrets are to be retrieved
1295
+ packages : Dict[str, str], default: {}
1296
+ Packages to use for this flow. The key is the name of the package
1297
+ and the value is the version to use.
1298
+ python : str, optional, default: None
1299
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1300
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1262
1301
  """
1263
1302
  ...
1264
1303
 
@@ -1324,105 +1363,14 @@ def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, expone
1324
1363
  The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1325
1364
  When it's specified as a full s3:// url, please leave `bucket_name` as None
1326
1365
  bucket_name : str
1327
- Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1328
- When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1329
- wildcard_match : bool
1330
- whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1331
- aws_conn_id : str
1332
- a reference to the s3 connection on Airflow. (Default: None)
1333
- verify : bool
1334
- Whether or not to verify SSL certificates for S3 connection. (Default: None)
1335
- """
1336
- ...
1337
-
1338
- 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]]:
1339
- """
1340
- 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.
1341
- 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.
1342
-
1343
- Parameters
1344
- ----------
1345
- timeout : int
1346
- Time, in seconds before the task times out and fails. (Default: 3600)
1347
- poke_interval : int
1348
- Time in seconds that the job should wait in between each try. (Default: 60)
1349
- mode : str
1350
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1351
- exponential_backoff : bool
1352
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1353
- pool : str
1354
- the slot pool this task should run in,
1355
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1356
- soft_fail : bool
1357
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1358
- name : str
1359
- Name of the sensor on Airflow
1360
- description : str
1361
- Description of sensor in the Airflow UI
1362
- external_dag_id : str
1363
- The dag_id that contains the task you want to wait for.
1364
- external_task_ids : List[str]
1365
- The list of task_ids that you want to wait for.
1366
- If None (default value) the sensor waits for the DAG. (Default: None)
1367
- allowed_states : List[str]
1368
- Iterable of allowed states, (Default: ['success'])
1369
- failed_states : List[str]
1370
- Iterable of failed or dis-allowed states. (Default: None)
1371
- execution_delta : datetime.timedelta
1372
- time difference with the previous execution to look at,
1373
- the default is the same logical date as the current task or DAG. (Default: None)
1374
- check_existence: bool
1375
- Set to True to check if the external task exists or check if
1376
- the DAG to wait for exists. (Default: True)
1377
- """
1378
- ...
1379
-
1380
- @typing.overload
1381
- 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]]:
1382
- """
1383
- Specifies the times when the flow should be run when running on a
1384
- production scheduler.
1385
-
1386
- Parameters
1387
- ----------
1388
- hourly : bool, default False
1389
- Run the workflow hourly.
1390
- daily : bool, default True
1391
- Run the workflow daily.
1392
- weekly : bool, default False
1393
- Run the workflow weekly.
1394
- cron : str, optional, default None
1395
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1396
- specified by this expression.
1397
- timezone : str, optional, default None
1398
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1399
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1400
- """
1401
- ...
1402
-
1403
- @typing.overload
1404
- def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1405
- ...
1406
-
1407
- 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):
1408
- """
1409
- Specifies the times when the flow should be run when running on a
1410
- production scheduler.
1411
-
1412
- Parameters
1413
- ----------
1414
- hourly : bool, default False
1415
- Run the workflow hourly.
1416
- daily : bool, default True
1417
- Run the workflow daily.
1418
- weekly : bool, default False
1419
- Run the workflow weekly.
1420
- cron : str, optional, default None
1421
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1422
- specified by this expression.
1423
- timezone : str, optional, default None
1424
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1425
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1366
+ Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1367
+ When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1368
+ wildcard_match : bool
1369
+ whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1370
+ aws_conn_id : str
1371
+ a reference to the s3 connection on Airflow. (Default: None)
1372
+ verify : bool
1373
+ Whether or not to verify SSL certificates for S3 connection. (Default: None)
1426
1374
  """
1427
1375
  ...
1428
1376
 
@@ -1529,109 +1477,45 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
1529
1477
  """
1530
1478
  ...
1531
1479
 
1532
- def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1480
+ 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]]:
1533
1481
  """
1534
- Specifies what flows belong to the same project.
1535
-
1536
- A project-specific namespace is created for all flows that
1537
- use the same `@project(name)`.
1482
+ 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.
1483
+ 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.
1538
1484
 
1539
1485
  Parameters
1540
1486
  ----------
1487
+ timeout : int
1488
+ Time, in seconds before the task times out and fails. (Default: 3600)
1489
+ poke_interval : int
1490
+ Time in seconds that the job should wait in between each try. (Default: 60)
1491
+ mode : str
1492
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1493
+ exponential_backoff : bool
1494
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1495
+ pool : str
1496
+ the slot pool this task should run in,
1497
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
1498
+ soft_fail : bool
1499
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
1541
1500
  name : str
1542
- Project name. Make sure that the name is unique amongst all
1543
- projects that use the same production scheduler. The name may
1544
- contain only lowercase alphanumeric characters and underscores.
1545
-
1546
-
1547
- """
1548
- ...
1549
-
1550
- @typing.overload
1551
- def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1552
- """
1553
- Specifies the PyPI packages for all steps of the flow.
1554
-
1555
- Use `@pypi_base` to set common packages required by all
1556
- steps and use `@pypi` to specify step-specific overrides.
1557
- Parameters
1558
- ----------
1559
- packages : Dict[str, str], default: {}
1560
- Packages to use for this flow. The key is the name of the package
1561
- and the value is the version to use.
1562
- python : str, optional, default: None
1563
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1564
- that the version used will correspond to the version of the Python interpreter used to start the run.
1565
- """
1566
- ...
1567
-
1568
- @typing.overload
1569
- def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1570
- ...
1571
-
1572
- def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1573
- """
1574
- Specifies the PyPI packages for all steps of the flow.
1575
-
1576
- Use `@pypi_base` to set common packages required by all
1577
- steps and use `@pypi` to specify step-specific overrides.
1578
- Parameters
1579
- ----------
1580
- packages : Dict[str, str], default: {}
1581
- Packages to use for this flow. The key is the name of the package
1582
- and the value is the version to use.
1583
- python : str, optional, default: None
1584
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1585
- that the version used will correspond to the version of the Python interpreter used to start the run.
1586
- """
1587
- ...
1588
-
1589
- @typing.overload
1590
- 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]]:
1591
- """
1592
- Specifies the Conda environment for all steps of the flow.
1593
-
1594
- Use `@conda_base` to set common libraries required by all
1595
- steps and use `@conda` to specify step-specific additions.
1596
-
1597
- Parameters
1598
- ----------
1599
- packages : Dict[str, str], default {}
1600
- Packages to use for this flow. The key is the name of the package
1601
- and the value is the version to use.
1602
- libraries : Dict[str, str], default {}
1603
- Supported for backward compatibility. When used with packages, packages will take precedence.
1604
- python : str, optional, default None
1605
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1606
- that the version used will correspond to the version of the Python interpreter used to start the run.
1607
- disabled : bool, default False
1608
- If set to True, disables Conda.
1609
- """
1610
- ...
1611
-
1612
- @typing.overload
1613
- def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1614
- ...
1615
-
1616
- 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):
1617
- """
1618
- Specifies the Conda environment for all steps of the flow.
1619
-
1620
- Use `@conda_base` to set common libraries required by all
1621
- steps and use `@conda` to specify step-specific additions.
1622
-
1623
- Parameters
1624
- ----------
1625
- packages : Dict[str, str], default {}
1626
- Packages to use for this flow. The key is the name of the package
1627
- and the value is the version to use.
1628
- libraries : Dict[str, str], default {}
1629
- Supported for backward compatibility. When used with packages, packages will take precedence.
1630
- python : str, optional, default None
1631
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1632
- that the version used will correspond to the version of the Python interpreter used to start the run.
1633
- disabled : bool, default False
1634
- If set to True, disables Conda.
1501
+ Name of the sensor on Airflow
1502
+ description : str
1503
+ Description of sensor in the Airflow UI
1504
+ external_dag_id : str
1505
+ The dag_id that contains the task you want to wait for.
1506
+ external_task_ids : List[str]
1507
+ The list of task_ids that you want to wait for.
1508
+ If None (default value) the sensor waits for the DAG. (Default: None)
1509
+ allowed_states : List[str]
1510
+ Iterable of allowed states, (Default: ['success'])
1511
+ failed_states : List[str]
1512
+ Iterable of failed or dis-allowed states. (Default: None)
1513
+ execution_delta : datetime.timedelta
1514
+ time difference with the previous execution to look at,
1515
+ the default is the same logical date as the current task or DAG. (Default: None)
1516
+ check_existence: bool
1517
+ Set to True to check if the external task exists or check if
1518
+ the DAG to wait for exists. (Default: True)
1635
1519
  """
1636
1520
  ...
1637
1521
 
@@ -1730,6 +1614,122 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
1730
1614
  """
1731
1615
  ...
1732
1616
 
1617
+ @typing.overload
1618
+ 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]]:
1619
+ """
1620
+ Specifies the times when the flow should be run when running on a
1621
+ production scheduler.
1622
+
1623
+ Parameters
1624
+ ----------
1625
+ hourly : bool, default False
1626
+ Run the workflow hourly.
1627
+ daily : bool, default True
1628
+ Run the workflow daily.
1629
+ weekly : bool, default False
1630
+ Run the workflow weekly.
1631
+ cron : str, optional, default None
1632
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1633
+ specified by this expression.
1634
+ timezone : str, optional, default None
1635
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1636
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1637
+ """
1638
+ ...
1639
+
1640
+ @typing.overload
1641
+ def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1642
+ ...
1643
+
1644
+ 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):
1645
+ """
1646
+ Specifies the times when the flow should be run when running on a
1647
+ production scheduler.
1648
+
1649
+ Parameters
1650
+ ----------
1651
+ hourly : bool, default False
1652
+ Run the workflow hourly.
1653
+ daily : bool, default True
1654
+ Run the workflow daily.
1655
+ weekly : bool, default False
1656
+ Run the workflow weekly.
1657
+ cron : str, optional, default None
1658
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1659
+ specified by this expression.
1660
+ timezone : str, optional, default None
1661
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1662
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1663
+ """
1664
+ ...
1665
+
1666
+ @typing.overload
1667
+ 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]]:
1668
+ """
1669
+ Specifies the Conda environment for all steps of the flow.
1670
+
1671
+ Use `@conda_base` to set common libraries required by all
1672
+ steps and use `@conda` to specify step-specific additions.
1673
+
1674
+ Parameters
1675
+ ----------
1676
+ packages : Dict[str, str], default {}
1677
+ Packages to use for this flow. The key is the name of the package
1678
+ and the value is the version to use.
1679
+ libraries : Dict[str, str], default {}
1680
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1681
+ python : str, optional, default None
1682
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1683
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1684
+ disabled : bool, default False
1685
+ If set to True, disables Conda.
1686
+ """
1687
+ ...
1688
+
1689
+ @typing.overload
1690
+ def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1691
+ ...
1692
+
1693
+ 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):
1694
+ """
1695
+ Specifies the Conda environment for all steps of the flow.
1696
+
1697
+ Use `@conda_base` to set common libraries required by all
1698
+ steps and use `@conda` to specify step-specific additions.
1699
+
1700
+ Parameters
1701
+ ----------
1702
+ packages : Dict[str, str], default {}
1703
+ Packages to use for this flow. The key is the name of the package
1704
+ and the value is the version to use.
1705
+ libraries : Dict[str, str], default {}
1706
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1707
+ python : str, optional, default None
1708
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1709
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1710
+ disabled : bool, default False
1711
+ If set to True, disables Conda.
1712
+ """
1713
+ ...
1714
+
1715
+ def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1716
+ """
1717
+ Specifies what flows belong to the same project.
1718
+
1719
+ A project-specific namespace is created for all flows that
1720
+ use the same `@project(name)`.
1721
+
1722
+ Parameters
1723
+ ----------
1724
+ name : str
1725
+ Project name. Make sure that the name is unique amongst all
1726
+ projects that use the same production scheduler. The name may
1727
+ contain only lowercase alphanumeric characters and underscores.
1728
+
1729
+
1730
+ """
1731
+ ...
1732
+
1733
1733
  def namespace(ns: typing.Optional[str]) -> typing.Optional[str]:
1734
1734
  """
1735
1735
  Switch namespace to the one provided.