metaflow-stubs 2.11.12__py2.py3-none-any.whl → 2.11.13__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 (132) hide show
  1. metaflow-stubs/__init__.pyi +469 -469
  2. metaflow-stubs/cards.pyi +6 -6
  3. metaflow-stubs/cli.pyi +3 -3
  4. metaflow-stubs/client/__init__.pyi +4 -4
  5. metaflow-stubs/client/core.pyi +7 -7
  6. metaflow-stubs/client/filecache.pyi +2 -2
  7. metaflow-stubs/clone_util.pyi +2 -2
  8. metaflow-stubs/events.pyi +2 -2
  9. metaflow-stubs/exception.pyi +2 -2
  10. metaflow-stubs/flowspec.pyi +3 -3
  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 +8 -2
  16. metaflow-stubs/metaflow_current.pyi +5 -5
  17. metaflow-stubs/mflog/mflog.pyi +2 -2
  18. metaflow-stubs/multicore_utils.pyi +2 -2
  19. metaflow-stubs/parameters.pyi +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.pyi +4 -4
  23. metaflow-stubs/plugins/airflow/airflow_cli.pyi +3 -3
  24. metaflow-stubs/plugins/airflow/airflow_decorator.pyi +2 -2
  25. metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
  26. metaflow-stubs/plugins/airflow/exception.pyi +2 -2
  27. metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
  28. metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
  29. metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
  30. metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
  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 +3 -3
  35. metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +3 -3
  36. metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +4 -4
  37. metaflow-stubs/plugins/aws/__init__.pyi +2 -2
  38. metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
  39. metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
  40. metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
  41. metaflow-stubs/plugins/aws/batch/batch.pyi +2 -2
  42. metaflow-stubs/plugins/aws/batch/batch_cli.pyi +2 -2
  43. metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
  44. metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +3 -3
  45. metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
  46. metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +3 -3
  47. metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
  48. metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +2 -2
  49. metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
  50. metaflow-stubs/plugins/aws/step_functions/production_token.pyi +2 -2
  51. metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
  52. metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +2 -2
  53. metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +3 -3
  54. metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
  55. metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +2 -2
  56. metaflow-stubs/plugins/azure/__init__.pyi +2 -2
  57. metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
  58. metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
  59. metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
  60. metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
  61. metaflow-stubs/plugins/cards/__init__.pyi +2 -2
  62. metaflow-stubs/plugins/cards/card_cli.pyi +4 -4
  63. metaflow-stubs/plugins/cards/card_client.pyi +4 -4
  64. metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
  65. metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
  66. metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
  67. metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
  68. metaflow-stubs/plugins/cards/card_modules/basic.pyi +3 -3
  69. metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
  70. metaflow-stubs/plugins/cards/card_modules/chevron/__init__.pyi +2 -2
  71. metaflow-stubs/plugins/cards/card_modules/chevron/main.pyi +2 -2
  72. metaflow-stubs/plugins/cards/card_modules/chevron/metadata.pyi +2 -2
  73. metaflow-stubs/plugins/cards/card_modules/chevron/renderer.pyi +2 -2
  74. metaflow-stubs/plugins/cards/card_modules/chevron/tokenizer.pyi +2 -2
  75. metaflow-stubs/plugins/cards/card_modules/components.pyi +3 -3
  76. metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
  77. metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
  78. metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +3 -3
  79. metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
  80. metaflow-stubs/plugins/cards/component_serializer.pyi +3 -3
  81. metaflow-stubs/plugins/cards/exception.pyi +2 -2
  82. metaflow-stubs/plugins/catch_decorator.pyi +3 -3
  83. metaflow-stubs/plugins/datatools/__init__.pyi +4 -4
  84. metaflow-stubs/plugins/datatools/local.pyi +2 -2
  85. metaflow-stubs/plugins/datatools/s3/__init__.pyi +3 -3
  86. metaflow-stubs/plugins/datatools/s3/s3.pyi +3 -3
  87. metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
  88. metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
  89. metaflow-stubs/plugins/debug_logger.pyi +2 -2
  90. metaflow-stubs/plugins/debug_monitor.pyi +2 -2
  91. metaflow-stubs/plugins/environment_decorator.pyi +2 -2
  92. metaflow-stubs/plugins/events_decorator.pyi +2 -2
  93. metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
  94. metaflow-stubs/plugins/frameworks/pytorch.pyi +3 -3
  95. metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
  96. metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
  97. metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
  98. metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
  99. metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
  100. metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
  101. metaflow-stubs/plugins/kubernetes/kubernetes.pyi +3 -3
  102. metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +3 -3
  103. metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
  104. metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +9 -3
  105. metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +2 -2
  106. metaflow-stubs/plugins/package_cli.pyi +2 -2
  107. metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
  108. metaflow-stubs/plugins/project_decorator.pyi +2 -2
  109. metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
  110. metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
  111. metaflow-stubs/plugins/pypi/conda_environment.pyi +4 -4
  112. metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
  113. metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
  114. metaflow-stubs/plugins/pypi/utils.pyi +2 -2
  115. metaflow-stubs/plugins/resources_decorator.pyi +2 -2
  116. metaflow-stubs/plugins/retry_decorator.pyi +2 -2
  117. metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
  118. metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
  119. metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
  120. metaflow-stubs/plugins/storage_executor.pyi +2 -2
  121. metaflow-stubs/plugins/tag_cli.pyi +4 -4
  122. metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +2 -2
  123. metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
  124. metaflow-stubs/procpoll.pyi +2 -2
  125. metaflow-stubs/pylint_wrapper.pyi +2 -2
  126. metaflow-stubs/tagging_util.pyi +2 -2
  127. metaflow-stubs/version.pyi +2 -2
  128. {metaflow_stubs-2.11.12.dist-info → metaflow_stubs-2.11.13.dist-info}/METADATA +2 -2
  129. metaflow_stubs-2.11.13.dist-info/RECORD +132 -0
  130. metaflow_stubs-2.11.12.dist-info/RECORD +0 -132
  131. {metaflow_stubs-2.11.12.dist-info → metaflow_stubs-2.11.13.dist-info}/WHEEL +0 -0
  132. {metaflow_stubs-2.11.12.dist-info → metaflow_stubs-2.11.13.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
1
1
  ##################################################################################
2
2
  # Auto-generated Metaflow stub file #
3
- # MF version: 2.11.12 #
4
- # Generated on 2024-05-03T20:23:27.231184 #
3
+ # MF version: 2.11.13 #
4
+ # Generated on 2024-05-06T22:21:21.471072 #
5
5
  ##################################################################################
6
6
 
7
7
  from __future__ import annotations
@@ -9,14 +9,14 @@ from __future__ import annotations
9
9
  import typing
10
10
  if typing.TYPE_CHECKING:
11
11
  import metaflow.plugins.datatools.s3.s3
12
+ import datetime
12
13
  import io
14
+ import typing
13
15
  import metaflow.client.core
14
- import metaflow.events
15
16
  import metaflow.parameters
16
- import datetime
17
- import metaflow.metaflow_current
18
17
  import metaflow._vendor.click.types
19
- import typing
18
+ import metaflow.events
19
+ import metaflow.metaflow_current
20
20
  import metaflow.datastore.inputs
21
21
  FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
22
22
  StepFlag = typing.NewType("StepFlag", bool)
@@ -725,88 +725,6 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
725
725
  """
726
726
  ...
727
727
 
728
- @typing.overload
729
- 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]]]:
730
- """
731
- Specifies the PyPI packages for the step.
732
-
733
- Information in this decorator will augment any
734
- attributes set in the `@pyi_base` flow-level decorator. Hence,
735
- you can use `@pypi_base` to set packages required by all
736
- steps and use `@pypi` to specify step-specific overrides.
737
-
738
- Parameters
739
- ----------
740
- packages : Dict[str, str], default: {}
741
- Packages to use for this step. The key is the name of the package
742
- and the value is the version to use.
743
- python : str, optional, default: None
744
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
745
- that the version used will correspond to the version of the Python interpreter used to start the run.
746
- """
747
- ...
748
-
749
- @typing.overload
750
- def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
751
- ...
752
-
753
- @typing.overload
754
- def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
755
- ...
756
-
757
- 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):
758
- """
759
- Specifies the PyPI packages for the step.
760
-
761
- Information in this decorator will augment any
762
- attributes set in the `@pyi_base` flow-level decorator. Hence,
763
- you can use `@pypi_base` to set packages required by all
764
- steps and use `@pypi` to specify step-specific overrides.
765
-
766
- Parameters
767
- ----------
768
- packages : Dict[str, str], default: {}
769
- Packages to use for this step. The key is the name of the package
770
- and the value is the version to use.
771
- python : str, optional, default: None
772
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
773
- that the version used will correspond to the version of the Python interpreter used to start the run.
774
- """
775
- ...
776
-
777
- @typing.overload
778
- 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]]]:
779
- """
780
- Specifies secrets to be retrieved and injected as environment variables prior to
781
- the execution of a step.
782
-
783
- Parameters
784
- ----------
785
- sources : List[Union[str, Dict[str, Any]]], default: []
786
- List of secret specs, defining how the secrets are to be retrieved
787
- """
788
- ...
789
-
790
- @typing.overload
791
- def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
792
- ...
793
-
794
- @typing.overload
795
- def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
796
- ...
797
-
798
- 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]]] = []):
799
- """
800
- Specifies secrets to be retrieved and injected as environment variables prior to
801
- the execution of a step.
802
-
803
- Parameters
804
- ----------
805
- sources : List[Union[str, Dict[str, Any]]], default: []
806
- List of secret specs, defining how the secrets are to be retrieved
807
- """
808
- ...
809
-
810
728
  @typing.overload
811
729
  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]]]:
812
730
  """
@@ -865,110 +783,94 @@ def conda(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
865
783
  ...
866
784
 
867
785
  @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]]]:
786
+ 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]]]:
869
787
  """
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.
788
+ Specifies secrets to be retrieved and injected as environment variables prior to
789
+ the execution of a step.
873
790
 
874
791
  Parameters
875
792
  ----------
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
-
793
+ sources : List[Union[str, Dict[str, Any]]], default: []
794
+ List of secret specs, defining how the secrets are to be retrieved
886
795
  """
887
796
  ...
888
797
 
889
798
  @typing.overload
890
- def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
799
+ def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
891
800
  ...
892
801
 
893
802
  @typing.overload
894
- def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
895
- ...
896
-
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):
898
- """
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.
902
-
903
- Parameters
904
- ----------
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
- """
803
+ def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
916
804
  ...
917
805
 
918
- @typing.overload
919
- 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]]]:
806
+ 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]]] = []):
920
807
  """
921
- Specifies a timeout for your step.
922
-
923
- This decorator is useful if this step may hang indefinitely.
924
-
925
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
926
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
927
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
928
-
929
- Note that all the values specified in parameters are added together so if you specify
930
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
808
+ Specifies secrets to be retrieved and injected as environment variables prior to
809
+ the execution of a step.
931
810
 
932
811
  Parameters
933
812
  ----------
934
- seconds : int, default 0
935
- Number of seconds to wait prior to timing out.
936
- minutes : int, default 0
937
- Number of minutes to wait prior to timing out.
938
- hours : int, default 0
939
- Number of hours to wait prior to timing out.
813
+ sources : List[Union[str, Dict[str, Any]]], default: []
814
+ List of secret specs, defining how the secrets are to be retrieved
940
815
  """
941
816
  ...
942
817
 
943
- @typing.overload
944
- def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
945
- ...
946
-
947
- @typing.overload
948
- def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
949
- ...
950
-
951
- 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):
818
+ 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]]]:
952
819
  """
953
- Specifies a timeout for your step.
954
-
955
- This decorator is useful if this step may hang indefinitely.
956
-
957
- This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
958
- A timeout is considered to be an exception thrown by the step. It will cause the step to be
959
- retried if needed and the exception will be caught by the `@catch` decorator, if present.
960
-
961
- Note that all the values specified in parameters are added together so if you specify
962
- 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
820
+ Specifies that this step should execute on Kubernetes.
963
821
 
964
822
  Parameters
965
823
  ----------
966
- seconds : int, default 0
967
- Number of seconds to wait prior to timing out.
968
- minutes : int, default 0
969
- Number of minutes to wait prior to timing out.
970
- hours : int, default 0
971
- Number of hours to wait prior to timing out.
824
+ cpu : int, default 1
825
+ Number of CPUs required for this step. If `@resources` is
826
+ also present, the maximum value from all decorators is used.
827
+ memory : int, default 4096
828
+ Memory size (in MB) required for this step. If
829
+ `@resources` is also present, the maximum value from all decorators is
830
+ used.
831
+ disk : int, default 10240
832
+ Disk size (in MB) required for this step. If
833
+ `@resources` is also present, the maximum value from all decorators is
834
+ used.
835
+ image : str, optional, default None
836
+ Docker image to use when launching on Kubernetes. If not specified, and
837
+ METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
838
+ not, a default Docker image mapping to the current version of Python is used.
839
+ image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
840
+ If given, the imagePullPolicy to be applied to the Docker image of the step.
841
+ service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
842
+ Kubernetes service account to use when launching pod in Kubernetes.
843
+ secrets : List[str], optional, default None
844
+ Kubernetes secrets to use when launching pod in Kubernetes. These
845
+ secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
846
+ in Metaflow configuration.
847
+ namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
848
+ Kubernetes namespace to use when launching pod in Kubernetes.
849
+ gpu : int, optional, default None
850
+ Number of GPUs required for this step. A value of zero implies that
851
+ the scheduled node should not have GPUs.
852
+ gpu_vendor : str, default KUBERNETES_GPU_VENDOR
853
+ The vendor of the GPUs to be used for this step.
854
+ tolerations : List[str], default []
855
+ The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
856
+ Kubernetes tolerations to use when launching pod in Kubernetes.
857
+ use_tmpfs : bool, default False
858
+ This enables an explicit tmpfs mount for this step.
859
+ tmpfs_tempdir : bool, default True
860
+ sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
861
+ tmpfs_size : int, optional, default: None
862
+ The value for the size (in MiB) of the tmpfs mount for this step.
863
+ This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
864
+ memory allocated for this step.
865
+ tmpfs_path : str, optional, default /metaflow_temp
866
+ Path to tmpfs mount for this step.
867
+ persistent_volume_claims : Dict[str, str], optional, default None
868
+ A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
869
+ volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
870
+ shared_memory: int, optional
871
+ Shared memory size (in MiB) required for this step
872
+ port: int, optional
873
+ Port number to specify in the Kubernetes job object
972
874
  """
973
875
  ...
974
876
 
@@ -1049,62 +951,152 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
1049
951
  """
1050
952
  ...
1051
953
 
1052
- 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]]]:
954
+ @typing.overload
955
+ 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]]]:
1053
956
  """
1054
- Specifies that this step should execute on Kubernetes.
957
+ Creates a human-readable report, a Metaflow Card, after this step completes.
958
+
959
+ Note that you may add multiple `@card` decorators in a step with different parameters.
1055
960
 
1056
961
  Parameters
1057
962
  ----------
1058
- cpu : int, default 1
1059
- Number of CPUs required for this step. If `@resources` is
1060
- also present, the maximum value from all decorators is used.
1061
- memory : int, default 4096
1062
- Memory size (in MB) required for this step. If
1063
- `@resources` is also present, the maximum value from all decorators is
1064
- used.
1065
- disk : int, default 10240
1066
- Disk size (in MB) required for this step. If
1067
- `@resources` is also present, the maximum value from all decorators is
1068
- used.
1069
- image : str, optional, default None
1070
- Docker image to use when launching on Kubernetes. If not specified, and
1071
- METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
1072
- not, a default Docker image mapping to the current version of Python is used.
1073
- image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
1074
- If given, the imagePullPolicy to be applied to the Docker image of the step.
1075
- service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
1076
- Kubernetes service account to use when launching pod in Kubernetes.
1077
- secrets : List[str], optional, default None
1078
- Kubernetes secrets to use when launching pod in Kubernetes. These
1079
- secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
1080
- in Metaflow configuration.
1081
- namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
1082
- Kubernetes namespace to use when launching pod in Kubernetes.
1083
- gpu : int, optional, default None
1084
- Number of GPUs required for this step. A value of zero implies that
1085
- the scheduled node should not have GPUs.
1086
- gpu_vendor : str, default KUBERNETES_GPU_VENDOR
1087
- The vendor of the GPUs to be used for this step.
1088
- tolerations : List[str], default []
1089
- The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
1090
- Kubernetes tolerations to use when launching pod in Kubernetes.
1091
- use_tmpfs : bool, default False
1092
- This enables an explicit tmpfs mount for this step.
1093
- tmpfs_tempdir : bool, default True
1094
- sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
1095
- tmpfs_size : int, optional, default: None
1096
- The value for the size (in MiB) of the tmpfs mount for this step.
1097
- This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
1098
- memory allocated for this step.
1099
- tmpfs_path : str, optional, default /metaflow_temp
1100
- Path to tmpfs mount for this step.
1101
- persistent_volume_claims : Dict[str, str], optional, default None
1102
- A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
1103
- volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
1104
- shared_memory: int, optional
1105
- Shared memory size (in MiB) required for this step
1106
- port: int, optional
1107
- Port number to specify in the Kubernetes job object
963
+ type : str, default 'default'
964
+ Card type.
965
+ id : str, optional, default None
966
+ If multiple cards are present, use this id to identify this card.
967
+ options : Dict[str, Any], default {}
968
+ Options passed to the card. The contents depend on the card type.
969
+ timeout : int, default 45
970
+ Interrupt reporting if it takes more than this many seconds.
971
+
972
+
973
+ """
974
+ ...
975
+
976
+ @typing.overload
977
+ def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
978
+ ...
979
+
980
+ @typing.overload
981
+ def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
982
+ ...
983
+
984
+ 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):
985
+ """
986
+ Creates a human-readable report, a Metaflow Card, after this step completes.
987
+
988
+ Note that you may add multiple `@card` decorators in a step with different parameters.
989
+
990
+ Parameters
991
+ ----------
992
+ type : str, default 'default'
993
+ Card type.
994
+ id : str, optional, default None
995
+ If multiple cards are present, use this id to identify this card.
996
+ options : Dict[str, Any], default {}
997
+ Options passed to the card. The contents depend on the card type.
998
+ timeout : int, default 45
999
+ Interrupt reporting if it takes more than this many seconds.
1000
+
1001
+
1002
+ """
1003
+ ...
1004
+
1005
+ @typing.overload
1006
+ 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]]]:
1007
+ """
1008
+ Specifies the PyPI packages for the step.
1009
+
1010
+ Information in this decorator will augment any
1011
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
1012
+ you can use `@pypi_base` to set packages required by all
1013
+ steps and use `@pypi` to specify step-specific overrides.
1014
+
1015
+ Parameters
1016
+ ----------
1017
+ packages : Dict[str, str], default: {}
1018
+ Packages to use for this step. The key is the name of the package
1019
+ and the value is the version to use.
1020
+ python : str, optional, default: None
1021
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1022
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1023
+ """
1024
+ ...
1025
+
1026
+ @typing.overload
1027
+ def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1028
+ ...
1029
+
1030
+ @typing.overload
1031
+ def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1032
+ ...
1033
+
1034
+ 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):
1035
+ """
1036
+ Specifies the PyPI packages for the step.
1037
+
1038
+ Information in this decorator will augment any
1039
+ attributes set in the `@pyi_base` flow-level decorator. Hence,
1040
+ you can use `@pypi_base` to set packages required by all
1041
+ steps and use `@pypi` to specify step-specific overrides.
1042
+
1043
+ Parameters
1044
+ ----------
1045
+ packages : Dict[str, str], default: {}
1046
+ Packages to use for this step. The key is the name of the package
1047
+ and the value is the version to use.
1048
+ python : str, optional, default: None
1049
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1050
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1051
+ """
1052
+ ...
1053
+
1054
+ @typing.overload
1055
+ 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]]]:
1056
+ """
1057
+ Specifies that the step will success under all circumstances.
1058
+
1059
+ The decorator will create an optional artifact, specified by `var`, which
1060
+ contains the exception raised. You can use it to detect the presence
1061
+ of errors, indicating that all happy-path artifacts produced by the step
1062
+ are missing.
1063
+
1064
+ Parameters
1065
+ ----------
1066
+ var : str, optional, default None
1067
+ Name of the artifact in which to store the caught exception.
1068
+ If not specified, the exception is not stored.
1069
+ print_exception : bool, default True
1070
+ Determines whether or not the exception is printed to
1071
+ stdout when caught.
1072
+ """
1073
+ ...
1074
+
1075
+ @typing.overload
1076
+ def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1077
+ ...
1078
+
1079
+ @typing.overload
1080
+ def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1081
+ ...
1082
+
1083
+ 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):
1084
+ """
1085
+ Specifies that the step will success under all circumstances.
1086
+
1087
+ The decorator will create an optional artifact, specified by `var`, which
1088
+ contains the exception raised. You can use it to detect the presence
1089
+ of errors, indicating that all happy-path artifacts produced by the step
1090
+ are missing.
1091
+
1092
+ Parameters
1093
+ ----------
1094
+ var : str, optional, default None
1095
+ Name of the artifact in which to store the caught exception.
1096
+ If not specified, the exception is not stored.
1097
+ print_exception : bool, default True
1098
+ Determines whether or not the exception is printed to
1099
+ stdout when caught.
1108
1100
  """
1109
1101
  ...
1110
1102
 
@@ -1340,184 +1332,89 @@ def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
1340
1332
  ...
1341
1333
 
1342
1334
  @typing.overload
1343
- 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]]]:
1335
+ 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]]]:
1344
1336
  """
1345
- Specifies that the step will success under all circumstances.
1337
+ Specifies a timeout for your step.
1346
1338
 
1347
- The decorator will create an optional artifact, specified by `var`, which
1348
- contains the exception raised. You can use it to detect the presence
1349
- of errors, indicating that all happy-path artifacts produced by the step
1350
- are missing.
1339
+ This decorator is useful if this step may hang indefinitely.
1340
+
1341
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
1342
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
1343
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
1344
+
1345
+ Note that all the values specified in parameters are added together so if you specify
1346
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
1351
1347
 
1352
1348
  Parameters
1353
1349
  ----------
1354
- var : str, optional, default None
1355
- Name of the artifact in which to store the caught exception.
1356
- If not specified, the exception is not stored.
1357
- print_exception : bool, default True
1358
- Determines whether or not the exception is printed to
1359
- stdout when caught.
1350
+ seconds : int, default 0
1351
+ Number of seconds to wait prior to timing out.
1352
+ minutes : int, default 0
1353
+ Number of minutes to wait prior to timing out.
1354
+ hours : int, default 0
1355
+ Number of hours to wait prior to timing out.
1360
1356
  """
1361
1357
  ...
1362
1358
 
1363
1359
  @typing.overload
1364
- def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1360
+ def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
1365
1361
  ...
1366
1362
 
1367
1363
  @typing.overload
1368
- def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1364
+ def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
1369
1365
  ...
1370
1366
 
1371
- 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):
1367
+ 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):
1372
1368
  """
1373
- Specifies that the step will success under all circumstances.
1369
+ Specifies a timeout for your step.
1374
1370
 
1375
- The decorator will create an optional artifact, specified by `var`, which
1376
- contains the exception raised. You can use it to detect the presence
1377
- of errors, indicating that all happy-path artifacts produced by the step
1378
- are missing.
1371
+ This decorator is useful if this step may hang indefinitely.
1372
+
1373
+ This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
1374
+ A timeout is considered to be an exception thrown by the step. It will cause the step to be
1375
+ retried if needed and the exception will be caught by the `@catch` decorator, if present.
1376
+
1377
+ Note that all the values specified in parameters are added together so if you specify
1378
+ 60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
1379
1379
 
1380
1380
  Parameters
1381
1381
  ----------
1382
- var : str, optional, default None
1383
- Name of the artifact in which to store the caught exception.
1384
- If not specified, the exception is not stored.
1385
- print_exception : bool, default True
1386
- Determines whether or not the exception is printed to
1387
- stdout when caught.
1382
+ seconds : int, default 0
1383
+ Number of seconds to wait prior to timing out.
1384
+ minutes : int, default 0
1385
+ Number of minutes to wait prior to timing out.
1386
+ hours : int, default 0
1387
+ Number of hours to wait prior to timing out.
1388
1388
  """
1389
1389
  ...
1390
1390
 
1391
1391
  @typing.overload
1392
- 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]]:
1392
+ 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]]:
1393
1393
  """
1394
- Specifies the flow(s) that this flow depends on.
1394
+ Specifies the event(s) that this flow depends on.
1395
1395
 
1396
1396
  ```
1397
- @trigger_on_finish(flow='FooFlow')
1397
+ @trigger(event='foo')
1398
1398
  ```
1399
1399
  or
1400
1400
  ```
1401
- @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1401
+ @trigger(events=['foo', 'bar'])
1402
1402
  ```
1403
- This decorator respects the @project decorator and triggers the flow
1404
- when upstream runs within the same namespace complete successfully
1405
1403
 
1406
- Additionally, you can specify project aware upstream flow dependencies
1407
- by specifying the fully qualified project_flow_name.
1404
+ Additionally, you can specify the parameter mappings
1405
+ to map event payload to Metaflow parameters for the flow.
1408
1406
  ```
1409
- @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1407
+ @trigger(event={'name':'foo', 'parameters':{'flow_param': 'event_field'}})
1410
1408
  ```
1411
1409
  or
1412
1410
  ```
1413
- @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1411
+ @trigger(events=[{'name':'foo', 'parameters':{'flow_param_1': 'event_field_1'},
1412
+ {'name':'bar', 'parameters':{'flow_param_2': 'event_field_2'}])
1414
1413
  ```
1415
1414
 
1416
- You can also specify just the project or project branch (other values will be
1417
- inferred from the current project or project branch):
1415
+ 'parameters' can also be a list of strings and tuples like so:
1418
1416
  ```
1419
- @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1420
- ```
1421
-
1422
- Note that `branch` is typically one of:
1423
- - `prod`
1424
- - `user.bob`
1425
- - `test.my_experiment`
1426
- - `prod.staging`
1427
-
1428
- Parameters
1429
- ----------
1430
- flow : Union[str, Dict[str, str]], optional, default None
1431
- Upstream flow dependency for this flow.
1432
- flows : List[Union[str, Dict[str, str]]], default []
1433
- Upstream flow dependencies for this flow.
1434
- options : Dict[str, Any], default {}
1435
- Backend-specific configuration for tuning eventing behavior.
1436
-
1437
-
1438
- """
1439
- ...
1440
-
1441
- @typing.overload
1442
- def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1443
- ...
1444
-
1445
- def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, flow: typing.Union[str, typing.Dict[str, str], None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}):
1446
- """
1447
- Specifies the flow(s) that this flow depends on.
1448
-
1449
- ```
1450
- @trigger_on_finish(flow='FooFlow')
1451
- ```
1452
- or
1453
- ```
1454
- @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1455
- ```
1456
- This decorator respects the @project decorator and triggers the flow
1457
- when upstream runs within the same namespace complete successfully
1458
-
1459
- Additionally, you can specify project aware upstream flow dependencies
1460
- by specifying the fully qualified project_flow_name.
1461
- ```
1462
- @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1463
- ```
1464
- or
1465
- ```
1466
- @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1467
- ```
1468
-
1469
- You can also specify just the project or project branch (other values will be
1470
- inferred from the current project or project branch):
1471
- ```
1472
- @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1473
- ```
1474
-
1475
- Note that `branch` is typically one of:
1476
- - `prod`
1477
- - `user.bob`
1478
- - `test.my_experiment`
1479
- - `prod.staging`
1480
-
1481
- Parameters
1482
- ----------
1483
- flow : Union[str, Dict[str, str]], optional, default None
1484
- Upstream flow dependency for this flow.
1485
- flows : List[Union[str, Dict[str, str]]], default []
1486
- Upstream flow dependencies for this flow.
1487
- options : Dict[str, Any], default {}
1488
- Backend-specific configuration for tuning eventing behavior.
1489
-
1490
-
1491
- """
1492
- ...
1493
-
1494
- @typing.overload
1495
- 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]]:
1496
- """
1497
- Specifies the event(s) that this flow depends on.
1498
-
1499
- ```
1500
- @trigger(event='foo')
1501
- ```
1502
- or
1503
- ```
1504
- @trigger(events=['foo', 'bar'])
1505
- ```
1506
-
1507
- Additionally, you can specify the parameter mappings
1508
- to map event payload to Metaflow parameters for the flow.
1509
- ```
1510
- @trigger(event={'name':'foo', 'parameters':{'flow_param': 'event_field'}})
1511
- ```
1512
- or
1513
- ```
1514
- @trigger(events=[{'name':'foo', 'parameters':{'flow_param_1': 'event_field_1'},
1515
- {'name':'bar', 'parameters':{'flow_param_2': 'event_field_2'}])
1516
- ```
1517
-
1518
- 'parameters' can also be a list of strings and tuples like so:
1519
- ```
1520
- @trigger(event={'name':'foo', 'parameters':['common_name', ('flow_param', 'event_field')]})
1417
+ @trigger(event={'name':'foo', 'parameters':['common_name', ('flow_param', 'event_field')]})
1521
1418
  ```
1522
1419
  This is equivalent to:
1523
1420
  ```
@@ -1586,45 +1483,52 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
1586
1483
  """
1587
1484
  ...
1588
1485
 
1589
- 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]]:
1486
+ @typing.overload
1487
+ 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]]:
1590
1488
  """
1591
- 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)
1592
- before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
1593
- and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
1594
- added as a flow decorators. Adding more than one decorator will ensure that `start` step
1595
- starts only after all sensors finish.
1489
+ Specifies the times when the flow should be run when running on a
1490
+ production scheduler.
1596
1491
 
1597
1492
  Parameters
1598
1493
  ----------
1599
- timeout : int
1600
- Time, in seconds before the task times out and fails. (Default: 3600)
1601
- poke_interval : int
1602
- Time in seconds that the job should wait in between each try. (Default: 60)
1603
- mode : str
1604
- How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1605
- exponential_backoff : bool
1606
- allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1607
- pool : str
1608
- the slot pool this task should run in,
1609
- slot pools are a way to limit concurrency for certain tasks. (Default:None)
1610
- soft_fail : bool
1611
- Set to true to mark the task as SKIPPED on failure. (Default: False)
1612
- name : str
1613
- Name of the sensor on Airflow
1614
- description : str
1615
- Description of sensor in the Airflow UI
1616
- bucket_key : Union[str, List[str]]
1617
- The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1618
- When it's specified as a full s3:// url, please leave `bucket_name` as None
1619
- bucket_name : str
1620
- Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1621
- When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1622
- wildcard_match : bool
1623
- whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1624
- aws_conn_id : str
1625
- a reference to the s3 connection on Airflow. (Default: None)
1626
- verify : bool
1627
- Whether or not to verify SSL certificates for S3 connection. (Default: None)
1494
+ hourly : bool, default False
1495
+ Run the workflow hourly.
1496
+ daily : bool, default True
1497
+ Run the workflow daily.
1498
+ weekly : bool, default False
1499
+ Run the workflow weekly.
1500
+ cron : str, optional, default None
1501
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1502
+ specified by this expression.
1503
+ timezone : str, optional, default None
1504
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1505
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1506
+ """
1507
+ ...
1508
+
1509
+ @typing.overload
1510
+ def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1511
+ ...
1512
+
1513
+ 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):
1514
+ """
1515
+ Specifies the times when the flow should be run when running on a
1516
+ production scheduler.
1517
+
1518
+ Parameters
1519
+ ----------
1520
+ hourly : bool, default False
1521
+ Run the workflow hourly.
1522
+ daily : bool, default True
1523
+ Run the workflow daily.
1524
+ weekly : bool, default False
1525
+ Run the workflow weekly.
1526
+ cron : str, optional, default None
1527
+ Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1528
+ specified by this expression.
1529
+ timezone : str, optional, default None
1530
+ Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1531
+ which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1628
1532
  """
1629
1533
  ...
1630
1534
 
@@ -1647,51 +1551,41 @@ def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typ
1647
1551
  ...
1648
1552
 
1649
1553
  @typing.overload
1650
- 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]]:
1554
+ def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1651
1555
  """
1652
- Specifies the Conda environment for all steps of the flow.
1653
-
1654
- Use `@conda_base` to set common libraries required by all
1655
- steps and use `@conda` to specify step-specific additions.
1556
+ Specifies the PyPI packages for all steps of the flow.
1656
1557
 
1558
+ Use `@pypi_base` to set common packages required by all
1559
+ steps and use `@pypi` to specify step-specific overrides.
1657
1560
  Parameters
1658
1561
  ----------
1659
- packages : Dict[str, str], default {}
1562
+ packages : Dict[str, str], default: {}
1660
1563
  Packages to use for this flow. The key is the name of the package
1661
1564
  and the value is the version to use.
1662
- libraries : Dict[str, str], default {}
1663
- Supported for backward compatibility. When used with packages, packages will take precedence.
1664
- python : str, optional, default None
1565
+ python : str, optional, default: None
1665
1566
  Version of Python to use, e.g. '3.7.4'. A default value of None implies
1666
1567
  that the version used will correspond to the version of the Python interpreter used to start the run.
1667
- disabled : bool, default False
1668
- If set to True, disables Conda.
1669
1568
  """
1670
1569
  ...
1671
1570
 
1672
1571
  @typing.overload
1673
- def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1572
+ def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1674
1573
  ...
1675
1574
 
1676
- 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):
1575
+ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1677
1576
  """
1678
- Specifies the Conda environment for all steps of the flow.
1679
-
1680
- Use `@conda_base` to set common libraries required by all
1681
- steps and use `@conda` to specify step-specific additions.
1577
+ Specifies the PyPI packages for all steps of the flow.
1682
1578
 
1579
+ Use `@pypi_base` to set common packages required by all
1580
+ steps and use `@pypi` to specify step-specific overrides.
1683
1581
  Parameters
1684
1582
  ----------
1685
- packages : Dict[str, str], default {}
1583
+ packages : Dict[str, str], default: {}
1686
1584
  Packages to use for this flow. The key is the name of the package
1687
1585
  and the value is the version to use.
1688
- libraries : Dict[str, str], default {}
1689
- Supported for backward compatibility. When used with packages, packages will take precedence.
1690
- python : str, optional, default None
1586
+ python : str, optional, default: None
1691
1587
  Version of Python to use, e.g. '3.7.4'. A default value of None implies
1692
1588
  that the version used will correspond to the version of the Python interpreter used to start the run.
1693
- disabled : bool, default False
1694
- If set to True, disables Conda.
1695
1589
  """
1696
1590
  ...
1697
1591
 
@@ -1737,91 +1631,197 @@ def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str,
1737
1631
  """
1738
1632
  ...
1739
1633
 
1740
- @typing.overload
1741
- 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]]:
1634
+ 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]]:
1742
1635
  """
1743
- Specifies the times when the flow should be run when running on a
1744
- production scheduler.
1636
+ 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)
1637
+ before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
1638
+ and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
1639
+ added as a flow decorators. Adding more than one decorator will ensure that `start` step
1640
+ starts only after all sensors finish.
1745
1641
 
1746
1642
  Parameters
1747
1643
  ----------
1748
- hourly : bool, default False
1749
- Run the workflow hourly.
1750
- daily : bool, default True
1751
- Run the workflow daily.
1752
- weekly : bool, default False
1753
- Run the workflow weekly.
1754
- cron : str, optional, default None
1755
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1756
- specified by this expression.
1757
- timezone : str, optional, default None
1758
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1759
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1644
+ timeout : int
1645
+ Time, in seconds before the task times out and fails. (Default: 3600)
1646
+ poke_interval : int
1647
+ Time in seconds that the job should wait in between each try. (Default: 60)
1648
+ mode : str
1649
+ How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
1650
+ exponential_backoff : bool
1651
+ allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
1652
+ pool : str
1653
+ the slot pool this task should run in,
1654
+ slot pools are a way to limit concurrency for certain tasks. (Default:None)
1655
+ soft_fail : bool
1656
+ Set to true to mark the task as SKIPPED on failure. (Default: False)
1657
+ name : str
1658
+ Name of the sensor on Airflow
1659
+ description : str
1660
+ Description of sensor in the Airflow UI
1661
+ bucket_key : Union[str, List[str]]
1662
+ The key(s) being waited on. Supports full s3:// style url or relative path from root level.
1663
+ When it's specified as a full s3:// url, please leave `bucket_name` as None
1664
+ bucket_name : str
1665
+ Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
1666
+ When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
1667
+ wildcard_match : bool
1668
+ whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
1669
+ aws_conn_id : str
1670
+ a reference to the s3 connection on Airflow. (Default: None)
1671
+ verify : bool
1672
+ Whether or not to verify SSL certificates for S3 connection. (Default: None)
1760
1673
  """
1761
1674
  ...
1762
1675
 
1763
1676
  @typing.overload
1764
- def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1765
- ...
1766
-
1767
- 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):
1677
+ 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]]:
1768
1678
  """
1769
- Specifies the times when the flow should be run when running on a
1770
- production scheduler.
1679
+ Specifies the Conda environment for all steps of the flow.
1680
+
1681
+ Use `@conda_base` to set common libraries required by all
1682
+ steps and use `@conda` to specify step-specific additions.
1771
1683
 
1772
1684
  Parameters
1773
1685
  ----------
1774
- hourly : bool, default False
1775
- Run the workflow hourly.
1776
- daily : bool, default True
1777
- Run the workflow daily.
1778
- weekly : bool, default False
1779
- Run the workflow weekly.
1780
- cron : str, optional, default None
1781
- Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
1782
- specified by this expression.
1783
- timezone : str, optional, default None
1784
- Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
1785
- which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
1686
+ packages : Dict[str, str], default {}
1687
+ Packages to use for this flow. The key is the name of the package
1688
+ and the value is the version to use.
1689
+ libraries : Dict[str, str], default {}
1690
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1691
+ python : str, optional, default None
1692
+ Version of Python to use, e.g. '3.7.4'. A default value of None implies
1693
+ that the version used will correspond to the version of the Python interpreter used to start the run.
1694
+ disabled : bool, default False
1695
+ If set to True, disables Conda.
1786
1696
  """
1787
1697
  ...
1788
1698
 
1789
1699
  @typing.overload
1790
- def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
1700
+ def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1701
+ ...
1702
+
1703
+ 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):
1791
1704
  """
1792
- Specifies the PyPI packages for all steps of the flow.
1705
+ Specifies the Conda environment for all steps of the flow.
1706
+
1707
+ Use `@conda_base` to set common libraries required by all
1708
+ steps and use `@conda` to specify step-specific additions.
1793
1709
 
1794
- Use `@pypi_base` to set common packages required by all
1795
- steps and use `@pypi` to specify step-specific overrides.
1796
1710
  Parameters
1797
1711
  ----------
1798
- packages : Dict[str, str], default: {}
1712
+ packages : Dict[str, str], default {}
1799
1713
  Packages to use for this flow. The key is the name of the package
1800
1714
  and the value is the version to use.
1801
- python : str, optional, default: None
1715
+ libraries : Dict[str, str], default {}
1716
+ Supported for backward compatibility. When used with packages, packages will take precedence.
1717
+ python : str, optional, default None
1802
1718
  Version of Python to use, e.g. '3.7.4'. A default value of None implies
1803
1719
  that the version used will correspond to the version of the Python interpreter used to start the run.
1720
+ disabled : bool, default False
1721
+ If set to True, disables Conda.
1804
1722
  """
1805
1723
  ...
1806
1724
 
1807
1725
  @typing.overload
1808
- def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1726
+ 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]]:
1727
+ """
1728
+ Specifies the flow(s) that this flow depends on.
1729
+
1730
+ ```
1731
+ @trigger_on_finish(flow='FooFlow')
1732
+ ```
1733
+ or
1734
+ ```
1735
+ @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1736
+ ```
1737
+ This decorator respects the @project decorator and triggers the flow
1738
+ when upstream runs within the same namespace complete successfully
1739
+
1740
+ Additionally, you can specify project aware upstream flow dependencies
1741
+ by specifying the fully qualified project_flow_name.
1742
+ ```
1743
+ @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1744
+ ```
1745
+ or
1746
+ ```
1747
+ @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1748
+ ```
1749
+
1750
+ You can also specify just the project or project branch (other values will be
1751
+ inferred from the current project or project branch):
1752
+ ```
1753
+ @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1754
+ ```
1755
+
1756
+ Note that `branch` is typically one of:
1757
+ - `prod`
1758
+ - `user.bob`
1759
+ - `test.my_experiment`
1760
+ - `prod.staging`
1761
+
1762
+ Parameters
1763
+ ----------
1764
+ flow : Union[str, Dict[str, str]], optional, default None
1765
+ Upstream flow dependency for this flow.
1766
+ flows : List[Union[str, Dict[str, str]]], default []
1767
+ Upstream flow dependencies for this flow.
1768
+ options : Dict[str, Any], default {}
1769
+ Backend-specific configuration for tuning eventing behavior.
1770
+
1771
+
1772
+ """
1809
1773
  ...
1810
1774
 
1811
- def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
1775
+ @typing.overload
1776
+ def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
1777
+ ...
1778
+
1779
+ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, flow: typing.Union[str, typing.Dict[str, str], None] = None, flows: typing.List[typing.Union[str, typing.Dict[str, str]]] = [], options: typing.Dict[str, typing.Any] = {}):
1812
1780
  """
1813
- Specifies the PyPI packages for all steps of the flow.
1781
+ Specifies the flow(s) that this flow depends on.
1782
+
1783
+ ```
1784
+ @trigger_on_finish(flow='FooFlow')
1785
+ ```
1786
+ or
1787
+ ```
1788
+ @trigger_on_finish(flows=['FooFlow', 'BarFlow'])
1789
+ ```
1790
+ This decorator respects the @project decorator and triggers the flow
1791
+ when upstream runs within the same namespace complete successfully
1792
+
1793
+ Additionally, you can specify project aware upstream flow dependencies
1794
+ by specifying the fully qualified project_flow_name.
1795
+ ```
1796
+ @trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
1797
+ ```
1798
+ or
1799
+ ```
1800
+ @trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
1801
+ ```
1802
+
1803
+ You can also specify just the project or project branch (other values will be
1804
+ inferred from the current project or project branch):
1805
+ ```
1806
+ @trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
1807
+ ```
1808
+
1809
+ Note that `branch` is typically one of:
1810
+ - `prod`
1811
+ - `user.bob`
1812
+ - `test.my_experiment`
1813
+ - `prod.staging`
1814
1814
 
1815
- Use `@pypi_base` to set common packages required by all
1816
- steps and use `@pypi` to specify step-specific overrides.
1817
1815
  Parameters
1818
1816
  ----------
1819
- packages : Dict[str, str], default: {}
1820
- Packages to use for this flow. The key is the name of the package
1821
- and the value is the version to use.
1822
- python : str, optional, default: None
1823
- Version of Python to use, e.g. '3.7.4'. A default value of None implies
1824
- that the version used will correspond to the version of the Python interpreter used to start the run.
1817
+ flow : Union[str, Dict[str, str]], optional, default None
1818
+ Upstream flow dependency for this flow.
1819
+ flows : List[Union[str, Dict[str, str]]], default []
1820
+ Upstream flow dependencies for this flow.
1821
+ options : Dict[str, Any], default {}
1822
+ Backend-specific configuration for tuning eventing behavior.
1823
+
1824
+
1825
1825
  """
1826
1826
  ...
1827
1827