ob-metaflow-stubs 4.6__py2.py3-none-any.whl → 4.8__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 +463 -414
  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 +5 -5
  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 +2 -2
  16. metaflow-stubs/metaflow_current.pyi +30 -7
  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 +7 -3
  21. metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
  22. metaflow-stubs/plugins/airflow/airflow.pyi +5 -5
  23. metaflow-stubs/plugins/airflow/airflow_cli.pyi +4 -4
  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 +3 -3
  30. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +3 -3
  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 +38 -5
  35. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +270 -5
  36. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +230 -5
  37. metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +292 -0
  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 +4 -4
  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 +23 -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 +260 -0
  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 +2 -2
  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 +3 -3
  71. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  72. metaflow-stubs/plugins/cards/card_modules/basic.pyi +2 -2
  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 +2 -2
  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 +4 -4
  87. metaflow-stubs/plugins/datatools/__init__.pyi +4 -4
  88. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  89. metaflow-stubs/plugins/datatools/s3/__init__.pyi +4 -4
  90. metaflow-stubs/plugins/datatools/s3/s3.pyi +6 -6
  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 +3 -3
  97. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  98. metaflow-stubs/plugins/frameworks/pytorch.pyi +5 -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 +19 -11
  107. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +12 -12
  108. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  109. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +15 -32
  110. metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +82 -28
  111. metaflow-stubs/plugins/logs_cli.pyi +2 -2
  112. metaflow-stubs/plugins/package_cli.pyi +2 -2
  113. metaflow-stubs/plugins/parallel_decorator.pyi +47 -2
  114. metaflow-stubs/plugins/perimeters.pyi +2 -2
  115. metaflow-stubs/plugins/project_decorator.pyi +3 -3
  116. metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
  117. metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
  118. metaflow-stubs/plugins/pypi/conda_environment.pyi +4 -4
  119. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -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 +3 -3
  126. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +3 -3
  127. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  128. metaflow-stubs/plugins/tag_cli.pyi +5 -5
  129. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +26 -3
  130. metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
  131. metaflow-stubs/procpoll.pyi +2 -2
  132. metaflow-stubs/profilers/__init__.pyi +2 -2
  133. metaflow-stubs/pylint_wrapper.pyi +2 -2
  134. metaflow-stubs/runner/__init__.pyi +2 -2
  135. metaflow-stubs/runner/deployer.pyi +354 -0
  136. metaflow-stubs/runner/metaflow_runner.pyi +11 -11
  137. metaflow-stubs/runner/nbdeploy.pyi +54 -0
  138. metaflow-stubs/runner/nbrun.pyi +7 -7
  139. metaflow-stubs/runner/subprocess_manager.pyi +2 -2
  140. metaflow-stubs/runner/utils.pyi +25 -0
  141. metaflow-stubs/system/__init__.pyi +3 -3
  142. metaflow-stubs/system/system_logger.pyi +2 -2
  143. metaflow-stubs/system/system_monitor.pyi +3 -3
  144. metaflow-stubs/tagging_util.pyi +2 -2
  145. metaflow-stubs/tuple_util.pyi +2 -2
  146. {ob_metaflow_stubs-4.6.dist-info → ob_metaflow_stubs-4.8.dist-info}/METADATA +1 -1
  147. ob_metaflow_stubs-4.8.dist-info/RECORD +150 -0
  148. ob_metaflow_stubs-4.6.dist-info/RECORD +0 -145
  149. {ob_metaflow_stubs-4.6.dist-info → ob_metaflow_stubs-4.8.dist-info}/WHEEL +0 -0
  150. {ob_metaflow_stubs-4.6.dist-info → ob_metaflow_stubs-4.8.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.7.1+ob(v1) #
4
- # Generated on 2024-07-12T16:22:02.506423 #
3
+ # MF version: 2.12.9.1+ob(v1) #
4
+ # Generated on 2024-07-25T19:14:17.762690 #
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.metaflow_current
12
- import metaflow.flowspec
13
11
  import typing
14
- import metaflow.client.core
15
- import metaflow.runner.metaflow_runner
16
- import io
17
- import metaflow.parameters
18
- import datetime
19
12
  import metaflow._vendor.click.types
20
- import metaflow.plugins.datatools.s3.s3
21
- import metaflow.events
13
+ import datetime
14
+ import metaflow.client.core
22
15
  import metaflow.datastore.inputs
16
+ import metaflow.events
17
+ import metaflow.plugins.datatools.s3.s3
18
+ import metaflow.parameters
19
+ import io
20
+ import metaflow.flowspec
21
+ import metaflow.runner.metaflow_runner
22
+ import metaflow.metaflow_current
23
23
  FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
24
24
  StepFlag = typing.NewType("StepFlag", bool)
25
25
 
@@ -728,135 +728,127 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
728
728
  ...
729
729
 
730
730
  @typing.overload
731
- 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]]]:
731
+ 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]]]:
732
732
  """
733
- Specifies secrets to be retrieved and injected as environment variables prior to
734
- the execution of a step.
733
+ Specifies the PyPI packages for the step.
734
+
735
+ Information in this decorator will augment any
736
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
737
+ you can use `@pypi_base` to set packages required by all
738
+ steps and use `@pypi` to specify step-specific overrides.
735
739
 
736
740
  Parameters
737
741
  ----------
738
- sources : List[Union[str, Dict[str, Any]]], default: []
739
- List of secret specs, defining how the secrets are to be retrieved
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
+ python : str, optional, default: None
746
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
747
+ that the version used will correspond to the version of the Python interpreter used to start the run.
740
748
  """
741
749
  ...
742
750
 
743
751
  @typing.overload
744
- def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
752
+ def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
745
753
  ...
746
754
 
747
755
  @typing.overload
748
- def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
756
+ def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
749
757
  ...
750
758
 
751
- 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]]] = []):
759
+ 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):
752
760
  """
753
- Specifies secrets to be retrieved and injected as environment variables prior to
754
- the execution of a step.
761
+ Specifies the PyPI packages for the step.
762
+
763
+ Information in this decorator will augment any
764
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
765
+ you can use `@pypi_base` to set packages required by all
766
+ steps and use `@pypi` to specify step-specific overrides.
755
767
 
756
768
  Parameters
757
769
  ----------
758
- sources : List[Union[str, Dict[str, Any]]], default: []
759
- List of secret specs, defining how the secrets are to be retrieved
770
+ packages : Dict[str, str], default: {}
771
+ Packages to use for this step. The key is the name of the package
772
+ and the value is the version to use.
773
+ python : str, optional, default: None
774
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
775
+ that the version used will correspond to the version of the Python interpreter used to start the run.
760
776
  """
761
777
  ...
762
778
 
763
779
  @typing.overload
764
- 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]]]:
780
+ 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]]]:
765
781
  """
766
- Specifies that the step will success under all circumstances.
782
+ Specifies the Conda environment for the step.
767
783
 
768
- The decorator will create an optional artifact, specified by `var`, which
769
- contains the exception raised. You can use it to detect the presence
770
- of errors, indicating that all happy-path artifacts produced by the step
771
- are missing.
784
+ Information in this decorator will augment any
785
+ attributes set in the `@conda_base` flow-level decorator. Hence,
786
+ you can use `@conda_base` to set packages required by all
787
+ steps and use `@conda` to specify step-specific overrides.
772
788
 
773
789
  Parameters
774
790
  ----------
775
- var : str, optional, default None
776
- Name of the artifact in which to store the caught exception.
777
- If not specified, the exception is not stored.
778
- print_exception : bool, default True
779
- Determines whether or not the exception is printed to
780
- stdout when caught.
791
+ packages : Dict[str, str], default {}
792
+ Packages to use for this step. The key is the name of the package
793
+ and the value is the version to use.
794
+ libraries : Dict[str, str], default {}
795
+ Supported for backward compatibility. When used with packages, packages will take precedence.
796
+ python : str, optional, default None
797
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
798
+ that the version used will correspond to the version of the Python interpreter used to start the run.
799
+ disabled : bool, default False
800
+ If set to True, disables @conda.
781
801
  """
782
802
  ...
783
803
 
784
804
  @typing.overload
785
- def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
805
+ def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
786
806
  ...
787
807
 
788
808
  @typing.overload
789
- def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
809
+ def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
790
810
  ...
791
811
 
792
- 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):
812
+ 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):
793
813
  """
794
- Specifies that the step will success under all circumstances.
814
+ Specifies the Conda environment for the step.
795
815
 
796
- The decorator will create an optional artifact, specified by `var`, which
797
- contains the exception raised. You can use it to detect the presence
798
- of errors, indicating that all happy-path artifacts produced by the step
799
- are missing.
816
+ Information in this decorator will augment any
817
+ attributes set in the `@conda_base` flow-level decorator. Hence,
818
+ you can use `@conda_base` to set packages required by all
819
+ steps and use `@conda` to specify step-specific overrides.
800
820
 
801
821
  Parameters
802
822
  ----------
803
- var : str, optional, default None
804
- Name of the artifact in which to store the caught exception.
805
- If not specified, the exception is not stored.
806
- print_exception : bool, default True
807
- Determines whether or not the exception is printed to
808
- stdout when caught.
823
+ packages : Dict[str, str], default {}
824
+ Packages to use for this step. The key is the name of the package
825
+ and the value is the version to use.
826
+ libraries : Dict[str, str], default {}
827
+ Supported for backward compatibility. When used with packages, packages will take precedence.
828
+ python : str, optional, default None
829
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
830
+ that the version used will correspond to the version of the Python interpreter used to start the run.
831
+ disabled : bool, default False
832
+ If set to True, disables @conda.
809
833
  """
810
834
  ...
811
835
 
812
836
  @typing.overload
813
- 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]]]:
837
+ def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
814
838
  """
815
- Creates a human-readable report, a Metaflow Card, after this step completes.
816
-
817
- Note that you may add multiple `@card` decorators in a step with different parameters.
818
-
819
- Parameters
820
- ----------
821
- type : str, default 'default'
822
- Card type.
823
- id : str, optional, default None
824
- If multiple cards are present, use this id to identify this card.
825
- options : Dict[str, Any], default {}
826
- Options passed to the card. The contents depend on the card type.
827
- timeout : int, default 45
828
- Interrupt reporting if it takes more than this many seconds.
829
-
830
-
839
+ Decorator prototype for all step decorators. This function gets specialized
840
+ and imported for all decorators types by _import_plugin_decorators().
831
841
  """
832
842
  ...
833
843
 
834
844
  @typing.overload
835
- def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
836
- ...
837
-
838
- @typing.overload
839
- def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
845
+ def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
840
846
  ...
841
847
 
842
- 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):
848
+ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
843
849
  """
844
- Creates a human-readable report, a Metaflow Card, after this step completes.
845
-
846
- Note that you may add multiple `@card` decorators in a step with different parameters.
847
-
848
- Parameters
849
- ----------
850
- type : str, default 'default'
851
- Card type.
852
- id : str, optional, default None
853
- If multiple cards are present, use this id to identify this card.
854
- options : Dict[str, Any], default {}
855
- Options passed to the card. The contents depend on the card type.
856
- timeout : int, default 45
857
- Interrupt reporting if it takes more than this many seconds.
858
-
859
-
850
+ Decorator prototype for all step decorators. This function gets specialized
851
+ and imported for all decorators types by _import_plugin_decorators().
860
852
  """
861
853
  ...
862
854
 
@@ -914,33 +906,51 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
914
906
  ...
915
907
 
916
908
  @typing.overload
917
- 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]]]:
909
+ 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]]]:
918
910
  """
919
- Specifies environment variables to be set prior to the execution of a step.
911
+ Specifies that the step will success under all circumstances.
912
+
913
+ The decorator will create an optional artifact, specified by `var`, which
914
+ contains the exception raised. You can use it to detect the presence
915
+ of errors, indicating that all happy-path artifacts produced by the step
916
+ are missing.
920
917
 
921
918
  Parameters
922
919
  ----------
923
- vars : Dict[str, str], default {}
924
- Dictionary of environment variables to set.
920
+ var : str, optional, default None
921
+ Name of the artifact in which to store the caught exception.
922
+ If not specified, the exception is not stored.
923
+ print_exception : bool, default True
924
+ Determines whether or not the exception is printed to
925
+ stdout when caught.
925
926
  """
926
927
  ...
927
928
 
928
929
  @typing.overload
929
- def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
930
+ def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
930
931
  ...
931
932
 
932
933
  @typing.overload
933
- def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
934
+ def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
934
935
  ...
935
936
 
936
- def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
937
+ 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):
937
938
  """
938
- Specifies environment variables to be set prior to the execution of a step.
939
+ Specifies that the step will success under all circumstances.
940
+
941
+ The decorator will create an optional artifact, specified by `var`, which
942
+ contains the exception raised. You can use it to detect the presence
943
+ of errors, indicating that all happy-path artifacts produced by the step
944
+ are missing.
939
945
 
940
946
  Parameters
941
947
  ----------
942
- vars : Dict[str, str], default {}
943
- Dictionary of environment variables to set.
948
+ var : str, optional, default None
949
+ Name of the artifact in which to store the caught exception.
950
+ If not specified, the exception is not stored.
951
+ print_exception : bool, default True
952
+ Determines whether or not the exception is printed to
953
+ stdout when caught.
944
954
  """
945
955
  ...
946
956
 
@@ -1092,122 +1102,39 @@ def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
1092
1102
  ...
1093
1103
 
1094
1104
  @typing.overload
1095
- 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]]]:
1105
+ 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]]]:
1096
1106
  """
1097
- Specifies the Conda environment for the step.
1098
-
1099
- Information in this decorator will augment any
1100
- attributes set in the `@conda_base` flow-level decorator. Hence,
1101
- you can use `@conda_base` to set packages required by all
1102
- steps and use `@conda` to specify step-specific overrides.
1107
+ Specifies environment variables to be set prior to the execution of a step.
1103
1108
 
1104
1109
  Parameters
1105
1110
  ----------
1106
- packages : Dict[str, str], default {}
1107
- Packages to use for this step. The key is the name of the package
1108
- and the value is the version to use.
1109
- libraries : Dict[str, str], default {}
1110
- Supported for backward compatibility. When used with packages, packages will take precedence.
1111
- python : str, optional, default None
1112
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1113
- that the version used will correspond to the version of the Python interpreter used to start the run.
1114
- disabled : bool, default False
1115
- If set to True, disables @conda.
1111
+ vars : Dict[str, str], default {}
1112
+ Dictionary of environment variables to set.
1116
1113
  """
1117
1114
  ...
1118
1115
 
1119
1116
  @typing.overload
1120
- def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1117
+ def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1121
1118
  ...
1122
1119
 
1123
1120
  @typing.overload
1124
- def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1121
+ def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1125
1122
  ...
1126
1123
 
1127
- 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):
1124
+ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
1128
1125
  """
1129
- Specifies the Conda environment for the step.
1130
-
1131
- Information in this decorator will augment any
1132
- attributes set in the `@conda_base` flow-level decorator. Hence,
1133
- you can use `@conda_base` to set packages required by all
1134
- steps and use `@conda` to specify step-specific overrides.
1126
+ Specifies environment variables to be set prior to the execution of a step.
1135
1127
 
1136
1128
  Parameters
1137
1129
  ----------
1138
- packages : Dict[str, str], default {}
1139
- Packages to use for this step. The key is the name of the package
1140
- and the value is the version to use.
1141
- libraries : Dict[str, str], default {}
1142
- Supported for backward compatibility. When used with packages, packages will take precedence.
1143
- python : str, optional, default None
1144
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1145
- that the version used will correspond to the version of the Python interpreter used to start the run.
1146
- disabled : bool, default False
1147
- If set to True, disables @conda.
1130
+ vars : Dict[str, str], default {}
1131
+ Dictionary of environment variables to set.
1148
1132
  """
1149
1133
  ...
1150
1134
 
1151
- @typing.overload
1152
- 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]]]:
1135
+ 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]]]:
1153
1136
  """
1154
- Specifies a timeout for your step.
1155
-
1156
- This decorator is useful if this step may hang indefinitely.
1157
-
1158
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
1159
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
1160
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
1161
-
1162
- Note that all the values specified in parameters are added together so if you specify
1163
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
1164
-
1165
- Parameters
1166
- ----------
1167
- seconds : int, default 0
1168
- Number of seconds to wait prior to timing out.
1169
- minutes : int, default 0
1170
- Number of minutes to wait prior to timing out.
1171
- hours : int, default 0
1172
- Number of hours to wait prior to timing out.
1173
- """
1174
- ...
1175
-
1176
- @typing.overload
1177
- def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1178
- ...
1179
-
1180
- @typing.overload
1181
- def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1182
- ...
1183
-
1184
- 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):
1185
- """
1186
- Specifies a timeout for your step.
1187
-
1188
- This decorator is useful if this step may hang indefinitely.
1189
-
1190
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
1191
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
1192
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
1193
-
1194
- Note that all the values specified in parameters are added together so if you specify
1195
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
1196
-
1197
- Parameters
1198
- ----------
1199
- seconds : int, default 0
1200
- Number of seconds to wait prior to timing out.
1201
- minutes : int, default 0
1202
- Number of minutes to wait prior to timing out.
1203
- hours : int, default 0
1204
- Number of hours to wait prior to timing out.
1205
- """
1206
- ...
1207
-
1208
- 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]]]:
1209
- """
1210
- Specifies that this step should execute on Kubernetes.
1137
+ Specifies that this step should execute on Kubernetes.
1211
1138
 
1212
1139
  Parameters
1213
1140
  ----------
@@ -1265,51 +1192,143 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
1265
1192
  ...
1266
1193
 
1267
1194
  @typing.overload
1268
- 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]]]:
1195
+ 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]]]:
1269
1196
  """
1270
- Specifies the PyPI packages for the step.
1197
+ Specifies secrets to be retrieved and injected as environment variables prior to
1198
+ the execution of a step.
1271
1199
 
1272
- Information in this decorator will augment any
1273
- attributes set in the `@pyi_base` flow-level decorator. Hence,
1274
- you can use `@pypi_base` to set packages required by all
1275
- steps and use `@pypi` to specify step-specific overrides.
1200
+ Parameters
1201
+ ----------
1202
+ sources : List[Union[str, Dict[str, Any]]], default: []
1203
+ List of secret specs, defining how the secrets are to be retrieved
1204
+ """
1205
+ ...
1206
+
1207
+ @typing.overload
1208
+ def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1209
+ ...
1210
+
1211
+ @typing.overload
1212
+ def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1213
+ ...
1214
+
1215
+ 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]]] = []):
1216
+ """
1217
+ Specifies secrets to be retrieved and injected as environment variables prior to
1218
+ the execution of a step.
1276
1219
 
1277
1220
  Parameters
1278
1221
  ----------
1279
- packages : Dict[str, str], default: {}
1280
- Packages to use for this step. The key is the name of the package
1281
- and the value is the version to use.
1282
- python : str, optional, default: None
1283
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1284
- that the version used will correspond to the version of the Python interpreter used to start the run.
1222
+ sources : List[Union[str, Dict[str, Any]]], default: []
1223
+ List of secret specs, defining how the secrets are to be retrieved
1285
1224
  """
1286
1225
  ...
1287
1226
 
1288
1227
  @typing.overload
1289
- def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1228
+ 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]]]:
1229
+ """
1230
+ Specifies a timeout for your step.
1231
+
1232
+ This decorator is useful if this step may hang indefinitely.
1233
+
1234
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
1235
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
1236
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
1237
+
1238
+ Note that all the values specified in parameters are added together so if you specify
1239
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
1240
+
1241
+ Parameters
1242
+ ----------
1243
+ seconds : int, default 0
1244
+ Number of seconds to wait prior to timing out.
1245
+ minutes : int, default 0
1246
+ Number of minutes to wait prior to timing out.
1247
+ hours : int, default 0
1248
+ Number of hours to wait prior to timing out.
1249
+ """
1290
1250
  ...
1291
1251
 
1292
1252
  @typing.overload
1293
- def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1253
+ def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1294
1254
  ...
1295
1255
 
1296
- 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):
1256
+ @typing.overload
1257
+ def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1258
+ ...
1259
+
1260
+ 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):
1297
1261
  """
1298
- Specifies the PyPI packages for the step.
1262
+ Specifies a timeout for your step.
1299
1263
 
1300
- Information in this decorator will augment any
1301
- attributes set in the `@pyi_base` flow-level decorator. Hence,
1302
- you can use `@pypi_base` to set packages required by all
1303
- steps and use `@pypi` to specify step-specific overrides.
1264
+ This decorator is useful if this step may hang indefinitely.
1265
+
1266
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
1267
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
1268
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
1269
+
1270
+ Note that all the values specified in parameters are added together so if you specify
1271
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
1304
1272
 
1305
1273
  Parameters
1306
1274
  ----------
1307
- packages : Dict[str, str], default: {}
1308
- Packages to use for this step. The key is the name of the package
1309
- and the value is the version to use.
1310
- python : str, optional, default: None
1311
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1312
- that the version used will correspond to the version of the Python interpreter used to start the run.
1275
+ seconds : int, default 0
1276
+ Number of seconds to wait prior to timing out.
1277
+ minutes : int, default 0
1278
+ Number of minutes to wait prior to timing out.
1279
+ hours : int, default 0
1280
+ Number of hours to wait prior to timing out.
1281
+ """
1282
+ ...
1283
+
1284
+ @typing.overload
1285
+ 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]]]:
1286
+ """
1287
+ Creates a human-readable report, a Metaflow Card, after this step completes.
1288
+
1289
+ Note that you may add multiple `@card` decorators in a step with different parameters.
1290
+
1291
+ Parameters
1292
+ ----------
1293
+ type : str, default 'default'
1294
+ Card type.
1295
+ id : str, optional, default None
1296
+ If multiple cards are present, use this id to identify this card.
1297
+ options : Dict[str, Any], default {}
1298
+ Options passed to the card. The contents depend on the card type.
1299
+ timeout : int, default 45
1300
+ Interrupt reporting if it takes more than this many seconds.
1301
+
1302
+
1303
+ """
1304
+ ...
1305
+
1306
+ @typing.overload
1307
+ def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1308
+ ...
1309
+
1310
+ @typing.overload
1311
+ def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1312
+ ...
1313
+
1314
+ 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):
1315
+ """
1316
+ Creates a human-readable report, a Metaflow Card, after this step completes.
1317
+
1318
+ Note that you may add multiple `@card` decorators in a step with different parameters.
1319
+
1320
+ Parameters
1321
+ ----------
1322
+ type : str, default 'default'
1323
+ Card type.
1324
+ id : str, optional, default None
1325
+ If multiple cards are present, use this id to identify this card.
1326
+ options : Dict[str, Any], default {}
1327
+ Options passed to the card. The contents depend on the card type.
1328
+ timeout : int, default 45
1329
+ Interrupt reporting if it takes more than this many seconds.
1330
+
1331
+
1313
1332
  """
1314
1333
  ...
1315
1334
 
@@ -1390,136 +1409,6 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
1390
1409
  """
1391
1410
  ...
1392
1411
 
1393
- @typing.overload
1394
- 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]]:
1395
- """
1396
- Specifies the times when the flow should be run when running on a
1397
- production scheduler.
1398
-
1399
- Parameters
1400
- ----------
1401
- hourly : bool, default False
1402
- Run the workflow hourly.
1403
- daily : bool, default True
1404
- Run the workflow daily.
1405
- weekly : bool, default False
1406
- Run the workflow weekly.
1407
- cron : str, optional, default None
1408
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1409
- specified by this expression.
1410
- timezone : str, optional, default None
1411
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1412
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1413
- """
1414
- ...
1415
-
1416
- @typing.overload
1417
- def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1418
- ...
1419
-
1420
- 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):
1421
- """
1422
- Specifies the times when the flow should be run when running on a
1423
- production scheduler.
1424
-
1425
- Parameters
1426
- ----------
1427
- hourly : bool, default False
1428
- Run the workflow hourly.
1429
- daily : bool, default True
1430
- Run the workflow daily.
1431
- weekly : bool, default False
1432
- Run the workflow weekly.
1433
- cron : str, optional, default None
1434
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1435
- specified by this expression.
1436
- timezone : str, optional, default None
1437
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1438
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1439
- """
1440
- ...
1441
-
1442
- 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]]:
1443
- """
1444
- 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.
1445
- 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.
1446
-
1447
- Parameters
1448
- ----------
1449
- timeout : int
1450
- Time, in seconds before the task times out and fails. (Default: 3600)
1451
- poke_interval : int
1452
- Time in seconds that the job should wait in between each try. (Default: 60)
1453
- mode : str
1454
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1455
- exponential_backoff : bool
1456
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1457
- pool : str
1458
- the slot pool this task should run in,
1459
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1460
- soft_fail : bool
1461
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1462
- name : str
1463
- Name of the sensor on Airflow
1464
- description : str
1465
- Description of sensor in the Airflow UI
1466
- external_dag_id : str
1467
- The dag_id that contains the task you want to wait for.
1468
- external_task_ids : List[str]
1469
- The list of task_ids that you want to wait for.
1470
- If None (default value) the sensor waits for the DAG. (Default: None)
1471
- allowed_states : List[str]
1472
- Iterable of allowed states, (Default: ['success'])
1473
- failed_states : List[str]
1474
- Iterable of failed or dis-allowed states. (Default: None)
1475
- execution_delta : datetime.timedelta
1476
- time difference with the previous execution to look at,
1477
- the default is the same logical date as the current task or DAG. (Default: None)
1478
- check_existence: bool
1479
- Set to True to check if the external task exists or check if
1480
- the DAG to wait for exists. (Default: True)
1481
- """
1482
- ...
1483
-
1484
- @typing.overload
1485
- def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1486
- """
1487
- Specifies the PyPI packages for all steps of the flow.
1488
-
1489
- Use `@pypi_base` to set common packages required by all
1490
- steps and use `@pypi` to specify step-specific overrides.
1491
- Parameters
1492
- ----------
1493
- packages : Dict[str, str], default: {}
1494
- Packages to use for this flow. The key is the name of the package
1495
- and the value is the version to use.
1496
- python : str, optional, default: None
1497
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1498
- that the version used will correspond to the version of the Python interpreter used to start the run.
1499
- """
1500
- ...
1501
-
1502
- @typing.overload
1503
- def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1504
- ...
1505
-
1506
- def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1507
- """
1508
- Specifies the PyPI packages for all steps of the flow.
1509
-
1510
- Use `@pypi_base` to set common packages required by all
1511
- steps and use `@pypi` to specify step-specific overrides.
1512
- Parameters
1513
- ----------
1514
- packages : Dict[str, str], default: {}
1515
- Packages to use for this flow. The key is the name of the package
1516
- and the value is the version to use.
1517
- python : str, optional, default: None
1518
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1519
- that the version used will correspond to the version of the Python interpreter used to start the run.
1520
- """
1521
- ...
1522
-
1523
1412
  @typing.overload
1524
1413
  def trigger(*, event: typing.Union[str, typing.Dict[str, typing.Any], None] = None, events: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], options: typing.Dict[str, typing.Any] = {}) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1525
1414
  """
@@ -1615,34 +1504,42 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
1615
1504
  """
1616
1505
  ...
1617
1506
 
1618
- def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1507
+ @typing.overload
1508
+ def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1619
1509
  """
1620
- This decorator is used to run NIM containers in Metaflow tasks as sidecars.
1621
-
1622
- User code call
1623
- -----------
1624
- @nim(
1625
- models=['meta/llama3-8b-instruct', 'meta/llama3-70b-instruct'],
1626
- backend='managed'
1627
- )
1628
-
1629
- Valid backend options
1630
- ---------------------
1631
- - 'managed': Outerbounds selects a compute provider based on the model.
1632
- - 🚧 'dataplane': Run in your account.
1510
+ Specifies the PyPI packages for all steps of the flow.
1633
1511
 
1634
- Valid model options
1635
- ----------------
1636
- - 'meta/llama3-8b-instruct': 8B parameter model
1637
- - 'meta/llama3-70b-instruct': 70B parameter model
1638
- - Upon request, any model here: https://nvcf.ngc.nvidia.com/functions?filter=nvidia-functions
1512
+ Use `@pypi_base` to set common packages required by all
1513
+ steps and use `@pypi` to specify step-specific overrides.
1514
+ Parameters
1515
+ ----------
1516
+ packages : Dict[str, str], default: {}
1517
+ Packages to use for this flow. The key is the name of the package
1518
+ and the value is the version to use.
1519
+ python : str, optional, default: None
1520
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1521
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1522
+ """
1523
+ ...
1524
+
1525
+ @typing.overload
1526
+ def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1527
+ ...
1528
+
1529
+ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1530
+ """
1531
+ Specifies the PyPI packages for all steps of the flow.
1639
1532
 
1533
+ Use `@pypi_base` to set common packages required by all
1534
+ steps and use `@pypi` to specify step-specific overrides.
1640
1535
  Parameters
1641
1536
  ----------
1642
- models: list[NIM]
1643
- List of NIM containers running models in sidecars.
1644
- backend: str
1645
- Compute provider to run the NIM container.
1537
+ packages : Dict[str, str], default: {}
1538
+ Packages to use for this flow. The key is the name of the package
1539
+ and the value is the version to use.
1540
+ python : str, optional, default: None
1541
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1542
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1646
1543
  """
1647
1544
  ...
1648
1545
 
@@ -1695,6 +1592,37 @@ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packa
1695
1592
  """
1696
1593
  ...
1697
1594
 
1595
+ def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1596
+ """
1597
+ This decorator is used to run NIM containers in Metaflow tasks as sidecars.
1598
+
1599
+ User code call
1600
+ -----------
1601
+ @nim(
1602
+ models=['meta/llama3-8b-instruct', 'meta/llama3-70b-instruct'],
1603
+ backend='managed'
1604
+ )
1605
+
1606
+ Valid backend options
1607
+ ---------------------
1608
+ - 'managed': Outerbounds selects a compute provider based on the model.
1609
+ - 🚧 'dataplane': Run in your account.
1610
+
1611
+ Valid model options
1612
+ ----------------
1613
+ - 'meta/llama3-8b-instruct': 8B parameter model
1614
+ - 'meta/llama3-70b-instruct': 70B parameter model
1615
+ - Upon request, any model here: https://nvcf.ngc.nvidia.com/functions?filter=nvidia-functions
1616
+
1617
+ Parameters
1618
+ ----------
1619
+ models: list[NIM]
1620
+ List of NIM containers running models in sidecars.
1621
+ backend: str
1622
+ Compute provider to run the NIM container.
1623
+ """
1624
+ ...
1625
+
1698
1626
  def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1699
1627
  """
1700
1628
  Specifies what flows belong to the same project.
@@ -1713,48 +1641,6 @@ def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typ
1713
1641
  """
1714
1642
  ...
1715
1643
 
1716
- 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]]:
1717
- """
1718
- 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)
1719
- before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
1720
- and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
1721
- added as a flow decorators. Adding more than one decorator will ensure that `start` step
1722
- starts only after all sensors finish.
1723
-
1724
- Parameters
1725
- ----------
1726
- timeout : int
1727
- Time, in seconds before the task times out and fails. (Default: 3600)
1728
- poke_interval : int
1729
- Time in seconds that the job should wait in between each try. (Default: 60)
1730
- mode : str
1731
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1732
- exponential_backoff : bool
1733
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1734
- pool : str
1735
- the slot pool this task should run in,
1736
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1737
- soft_fail : bool
1738
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1739
- name : str
1740
- Name of the sensor on Airflow
1741
- description : str
1742
- Description of sensor in the Airflow UI
1743
- bucket_key : Union[str, List[str]]
1744
- The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1745
- When it's specified as a full s3:// url, please leave `bucket_name` as None
1746
- bucket_name : str
1747
- Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1748
- When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1749
- wildcard_match : bool
1750
- whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1751
- aws_conn_id : str
1752
- a reference to the s3 connection on Airflow. (Default: None)
1753
- verify : bool
1754
- Whether or not to verify SSL certificates for S3 connection. (Default: None)
1755
- """
1756
- ...
1757
-
1758
1644
  @typing.overload
1759
1645
  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]]:
1760
1646
  """
@@ -1858,6 +1744,139 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
1858
1744
  """
1859
1745
  ...
1860
1746
 
1747
+ 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]]:
1748
+ """
1749
+ 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.
1750
+ 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.
1751
+
1752
+ Parameters
1753
+ ----------
1754
+ timeout : int
1755
+ Time, in seconds before the task times out and fails. (Default: 3600)
1756
+ poke_interval : int
1757
+ Time in seconds that the job should wait in between each try. (Default: 60)
1758
+ mode : str
1759
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1760
+ exponential_backoff : bool
1761
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1762
+ pool : str
1763
+ the slot pool this task should run in,
1764
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
1765
+ soft_fail : bool
1766
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
1767
+ name : str
1768
+ Name of the sensor on Airflow
1769
+ description : str
1770
+ Description of sensor in the Airflow UI
1771
+ external_dag_id : str
1772
+ The dag_id that contains the task you want to wait for.
1773
+ external_task_ids : List[str]
1774
+ The list of task_ids that you want to wait for.
1775
+ If None (default value) the sensor waits for the DAG. (Default: None)
1776
+ allowed_states : List[str]
1777
+ Iterable of allowed states, (Default: ['success'])
1778
+ failed_states : List[str]
1779
+ Iterable of failed or dis-allowed states. (Default: None)
1780
+ execution_delta : datetime.timedelta
1781
+ time difference with the previous execution to look at,
1782
+ the default is the same logical date as the current task or DAG. (Default: None)
1783
+ check_existence: bool
1784
+ Set to True to check if the external task exists or check if
1785
+ the DAG to wait for exists. (Default: True)
1786
+ """
1787
+ ...
1788
+
1789
+ @typing.overload
1790
+ 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]]:
1791
+ """
1792
+ Specifies the times when the flow should be run when running on a
1793
+ production scheduler.
1794
+
1795
+ Parameters
1796
+ ----------
1797
+ hourly : bool, default False
1798
+ Run the workflow hourly.
1799
+ daily : bool, default True
1800
+ Run the workflow daily.
1801
+ weekly : bool, default False
1802
+ Run the workflow weekly.
1803
+ cron : str, optional, default None
1804
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1805
+ specified by this expression.
1806
+ timezone : str, optional, default None
1807
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1808
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1809
+ """
1810
+ ...
1811
+
1812
+ @typing.overload
1813
+ def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1814
+ ...
1815
+
1816
+ 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):
1817
+ """
1818
+ Specifies the times when the flow should be run when running on a
1819
+ production scheduler.
1820
+
1821
+ Parameters
1822
+ ----------
1823
+ hourly : bool, default False
1824
+ Run the workflow hourly.
1825
+ daily : bool, default True
1826
+ Run the workflow daily.
1827
+ weekly : bool, default False
1828
+ Run the workflow weekly.
1829
+ cron : str, optional, default None
1830
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1831
+ specified by this expression.
1832
+ timezone : str, optional, default None
1833
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1834
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1835
+ """
1836
+ ...
1837
+
1838
+ 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]]:
1839
+ """
1840
+ 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)
1841
+ before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
1842
+ and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
1843
+ added as a flow decorators. Adding more than one decorator will ensure that `start` step
1844
+ starts only after all sensors finish.
1845
+
1846
+ Parameters
1847
+ ----------
1848
+ timeout : int
1849
+ Time, in seconds before the task times out and fails. (Default: 3600)
1850
+ poke_interval : int
1851
+ Time in seconds that the job should wait in between each try. (Default: 60)
1852
+ mode : str
1853
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1854
+ exponential_backoff : bool
1855
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1856
+ pool : str
1857
+ the slot pool this task should run in,
1858
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
1859
+ soft_fail : bool
1860
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
1861
+ name : str
1862
+ Name of the sensor on Airflow
1863
+ description : str
1864
+ Description of sensor in the Airflow UI
1865
+ bucket_key : Union[str, List[str]]
1866
+ The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1867
+ When it's specified as a full s3:// url, please leave `bucket_name` as None
1868
+ bucket_name : str
1869
+ Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1870
+ When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1871
+ wildcard_match : bool
1872
+ whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1873
+ aws_conn_id : str
1874
+ a reference to the s3 connection on Airflow. (Default: None)
1875
+ verify : bool
1876
+ Whether or not to verify SSL certificates for S3 connection. (Default: None)
1877
+ """
1878
+ ...
1879
+
1861
1880
  def namespace(ns: typing.Optional[str]) -> typing.Optional[str]:
1862
1881
  """
1863
1882
  Switch namespace to the one provided.
@@ -3006,6 +3025,36 @@ class NBRunner(object, metaclass=type):
3006
3025
  ...
3007
3026
  ...
3008
3027
 
3028
+ class Deployer(object, metaclass=type):
3029
+ def __init__(self, flow_file: str, show_output: bool = True, profile: typing.Optional[str] = None, env: typing.Optional[typing.Dict] = None, cwd: typing.Optional[str] = None, **kwargs):
3030
+ ...
3031
+ def _Deployer__make_function(self, deployer_class):
3032
+ """
3033
+ Create a function for the given deployer class.
3034
+
3035
+ Parameters
3036
+ ----------
3037
+ deployer_class : Type[DeployerImpl]
3038
+ Deployer implementation class.
3039
+
3040
+ Returns
3041
+ -------
3042
+ Callable
3043
+ Function that initializes and returns an instance of the deployer class.
3044
+ """
3045
+ ...
3046
+ ...
3047
+
3048
+ class NBDeployer(object, metaclass=type):
3049
+ def __init__(self, flow, show_output: bool = True, profile: typing.Optional[str] = None, env: typing.Optional[typing.Dict] = None, base_dir: str = "/tmp", **kwargs):
3050
+ ...
3051
+ def cleanup(self):
3052
+ """
3053
+ Delete any temporary files created during execution.
3054
+ """
3055
+ ...
3056
+ ...
3057
+
3009
3058
  def get_aws_client(module, with_error = False, role_arn = None, session_vars = None, client_params = None):
3010
3059
  ...
3011
3060