metaflow-stubs 2.11.4__py2.py3-none-any.whl → 2.11.5__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.
- metaflow-stubs/__init__.pyi +449 -437
- metaflow-stubs/cards.pyi +4 -4
- metaflow-stubs/cli.pyi +2 -2
- metaflow-stubs/client/__init__.pyi +4 -4
- metaflow-stubs/client/core.pyi +7 -7
- metaflow-stubs/client/filecache.pyi +3 -3
- metaflow-stubs/clone_util.pyi +31 -0
- metaflow-stubs/events.pyi +3 -3
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +5 -5
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +5 -5
- metaflow-stubs/metadata/metadata.pyi +2 -2
- metaflow-stubs/metadata/util.pyi +2 -2
- metaflow-stubs/metaflow_config.pyi +4 -2
- metaflow-stubs/metaflow_current.pyi +18 -18
- metaflow-stubs/mflog/mflog.pyi +2 -2
- metaflow-stubs/multicore_utils.pyi +2 -2
- metaflow-stubs/parameters.pyi +4 -4
- metaflow-stubs/plugins/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow.pyi +3 -3
- metaflow-stubs/plugins/airflow/airflow_cli.pyi +3 -3
- metaflow-stubs/plugins/airflow/airflow_decorator.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
- metaflow-stubs/plugins/airflow/exception.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
- metaflow-stubs/plugins/argo/__init__.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +4 -4
- metaflow-stubs/plugins/aws/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
- metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch.pyi +4 -4
- metaflow-stubs/plugins/aws/batch/batch_cli.pyi +4 -4
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +3 -3
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/dynamo_db_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/production_token.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +4 -4
- metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_decorator.pyi +2 -2
- metaflow-stubs/plugins/azure/__init__.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_utils.pyi +2 -2
- metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +2 -2
- metaflow-stubs/plugins/azure/includefile_support.pyi +2 -2
- metaflow-stubs/plugins/cards/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_cli.pyi +4 -4
- metaflow-stubs/plugins/cards/card_client.pyi +3 -3
- metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
- metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +3 -3
- metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/main.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/metadata.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/renderer.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/chevron/tokenizer.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
- metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
- metaflow-stubs/plugins/cards/component_serializer.pyi +4 -4
- metaflow-stubs/plugins/cards/exception.pyi +2 -2
- metaflow-stubs/plugins/catch_decorator.pyi +3 -3
- metaflow-stubs/plugins/datatools/__init__.pyi +4 -4
- metaflow-stubs/plugins/datatools/local.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +4 -4
- metaflow-stubs/plugins/datatools/s3/s3.pyi +5 -5
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
- metaflow-stubs/plugins/debug_logger.pyi +2 -2
- metaflow-stubs/plugins/debug_monitor.pyi +2 -2
- metaflow-stubs/plugins/environment_decorator.pyi +2 -2
- metaflow-stubs/plugins/events_decorator.pyi +2 -2
- metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
- metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
- metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_exceptions.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_utils.pyi +2 -2
- metaflow-stubs/plugins/gcp/includefile_support.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/__init__.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +3 -3
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_job.pyi +2 -2
- metaflow-stubs/plugins/package_cli.pyi +2 -2
- metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
- metaflow-stubs/plugins/project_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_environment.pyi +3 -3
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
- metaflow-stubs/plugins/pypi/utils.pyi +2 -2
- metaflow-stubs/plugins/resources_decorator.pyi +2 -2
- metaflow-stubs/plugins/retry_decorator.pyi +2 -2
- metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
- metaflow-stubs/plugins/storage_executor.pyi +2 -2
- metaflow-stubs/plugins/tag_cli.pyi +5 -5
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +2 -2
- metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
- metaflow-stubs/procpoll.pyi +2 -2
- metaflow-stubs/pylint_wrapper.pyi +2 -2
- metaflow-stubs/tagging_util.pyi +2 -2
- metaflow-stubs/version.pyi +2 -2
- {metaflow_stubs-2.11.4.dist-info → metaflow_stubs-2.11.5.dist-info}/METADATA +2 -2
- metaflow_stubs-2.11.5.dist-info/RECORD +132 -0
- {metaflow_stubs-2.11.4.dist-info → metaflow_stubs-2.11.5.dist-info}/WHEEL +1 -1
- metaflow_stubs-2.11.4.dist-info/RECORD +0 -131
- {metaflow_stubs-2.11.4.dist-info → metaflow_stubs-2.11.5.dist-info}/top_level.txt +0 -0
metaflow-stubs/__init__.pyi
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.11.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.11.5 #
|
4
|
+
# Generated on 2024-03-14T18:36:24.873925 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.events
|
12
|
-
import io
|
13
11
|
import metaflow.metaflow_current
|
14
|
-
import metaflow.
|
15
|
-
import metaflow.client.core
|
12
|
+
import metaflow._vendor.click.types
|
16
13
|
import datetime
|
14
|
+
import metaflow.events
|
17
15
|
import metaflow.parameters
|
18
|
-
import
|
19
|
-
import metaflow.
|
16
|
+
import metaflow.client.core
|
17
|
+
import metaflow.plugins.datatools.s3.s3
|
20
18
|
import metaflow.datastore.inputs
|
19
|
+
import io
|
20
|
+
import typing
|
21
21
|
FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
|
22
22
|
StepFlag = typing.NewType("StepFlag", bool)
|
23
23
|
|
@@ -725,37 +725,6 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
725
725
|
"""
|
726
726
|
...
|
727
727
|
|
728
|
-
@typing.overload
|
729
|
-
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]]]:
|
730
|
-
"""
|
731
|
-
Specifies environment variables to be set prior to the execution of a step.
|
732
|
-
|
733
|
-
Parameters
|
734
|
-
----------
|
735
|
-
vars : Dict[str, str], default {}
|
736
|
-
Dictionary of environment variables to set.
|
737
|
-
"""
|
738
|
-
...
|
739
|
-
|
740
|
-
@typing.overload
|
741
|
-
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
742
|
-
...
|
743
|
-
|
744
|
-
@typing.overload
|
745
|
-
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
746
|
-
...
|
747
|
-
|
748
|
-
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
749
|
-
"""
|
750
|
-
Specifies environment variables to be set prior to the execution of a step.
|
751
|
-
|
752
|
-
Parameters
|
753
|
-
----------
|
754
|
-
vars : Dict[str, str], default {}
|
755
|
-
Dictionary of environment variables to set.
|
756
|
-
"""
|
757
|
-
...
|
758
|
-
|
759
728
|
@typing.overload
|
760
729
|
def resources(*, cpu: int = 1, gpu: int = 0, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
761
730
|
"""
|
@@ -834,125 +803,33 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
|
|
834
803
|
...
|
835
804
|
|
836
805
|
@typing.overload
|
837
|
-
def
|
806
|
+
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]]]:
|
838
807
|
"""
|
839
|
-
Specifies
|
808
|
+
Specifies environment variables to be set prior to the execution of a step.
|
840
809
|
|
841
810
|
Parameters
|
842
811
|
----------
|
843
|
-
|
844
|
-
|
845
|
-
also present, the maximum value from all decorators is used.
|
846
|
-
gpu : int, default 0
|
847
|
-
Number of GPUs required for this step. If `@resources` is
|
848
|
-
also present, the maximum value from all decorators is used.
|
849
|
-
memory : int, default 4096
|
850
|
-
Memory size (in MB) required for this step. If
|
851
|
-
`@resources` is also present, the maximum value from all decorators is
|
852
|
-
used.
|
853
|
-
image : str, optional, default None
|
854
|
-
Docker image to use when launching on AWS Batch. If not specified, and
|
855
|
-
METAFLOW_BATCH_CONTAINER_IMAGE is specified, that image is used. If
|
856
|
-
not, a default Docker image mapping to the current version of Python is used.
|
857
|
-
queue : str, default METAFLOW_BATCH_JOB_QUEUE
|
858
|
-
AWS Batch Job Queue to submit the job to.
|
859
|
-
iam_role : str, default METAFLOW_ECS_S3_ACCESS_IAM_ROLE
|
860
|
-
AWS IAM role that AWS Batch container uses to access AWS cloud resources.
|
861
|
-
execution_role : str, default METAFLOW_ECS_FARGATE_EXECUTION_ROLE
|
862
|
-
AWS IAM role that AWS Batch can use [to trigger AWS Fargate tasks]
|
863
|
-
(https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html).
|
864
|
-
shared_memory : int, optional, default None
|
865
|
-
The value for the size (in MiB) of the /dev/shm volume for this step.
|
866
|
-
This parameter maps to the `--shm-size` option in Docker.
|
867
|
-
max_swap : int, optional, default None
|
868
|
-
The total amount of swap memory (in MiB) a container can use for this
|
869
|
-
step. This parameter is translated to the `--memory-swap` option in
|
870
|
-
Docker where the value is the sum of the container memory plus the
|
871
|
-
`max_swap` value.
|
872
|
-
swappiness : int, optional, default None
|
873
|
-
This allows you to tune memory swappiness behavior for this step.
|
874
|
-
A swappiness value of 0 causes swapping not to happen unless absolutely
|
875
|
-
necessary. A swappiness value of 100 causes pages to be swapped very
|
876
|
-
aggressively. Accepted values are whole numbers between 0 and 100.
|
877
|
-
use_tmpfs : bool, default False
|
878
|
-
This enables an explicit tmpfs mount for this step.
|
879
|
-
tmpfs_tempdir : bool, default True
|
880
|
-
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
881
|
-
tmpfs_size : int, optional, default None
|
882
|
-
The value for the size (in MiB) of the tmpfs mount for this step.
|
883
|
-
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
884
|
-
memory allocated for this step.
|
885
|
-
tmpfs_path : str, optional, default None
|
886
|
-
Path to tmpfs mount for this step. Defaults to /metaflow_temp.
|
887
|
-
inferentia : int, default 0
|
888
|
-
Number of Inferentia chips required for this step.
|
889
|
-
efa : int, default 0
|
890
|
-
Number of elastic fabric adapter network devices to attach to container
|
812
|
+
vars : Dict[str, str], default {}
|
813
|
+
Dictionary of environment variables to set.
|
891
814
|
"""
|
892
815
|
...
|
893
816
|
|
894
817
|
@typing.overload
|
895
|
-
def
|
818
|
+
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
896
819
|
...
|
897
820
|
|
898
821
|
@typing.overload
|
899
|
-
def
|
822
|
+
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
900
823
|
...
|
901
824
|
|
902
|
-
def
|
825
|
+
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
903
826
|
"""
|
904
|
-
Specifies
|
827
|
+
Specifies environment variables to be set prior to the execution of a step.
|
905
828
|
|
906
829
|
Parameters
|
907
830
|
----------
|
908
|
-
|
909
|
-
|
910
|
-
also present, the maximum value from all decorators is used.
|
911
|
-
gpu : int, default 0
|
912
|
-
Number of GPUs required for this step. If `@resources` is
|
913
|
-
also present, the maximum value from all decorators is used.
|
914
|
-
memory : int, default 4096
|
915
|
-
Memory size (in MB) required for this step. If
|
916
|
-
`@resources` is also present, the maximum value from all decorators is
|
917
|
-
used.
|
918
|
-
image : str, optional, default None
|
919
|
-
Docker image to use when launching on AWS Batch. If not specified, and
|
920
|
-
METAFLOW_BATCH_CONTAINER_IMAGE is specified, that image is used. If
|
921
|
-
not, a default Docker image mapping to the current version of Python is used.
|
922
|
-
queue : str, default METAFLOW_BATCH_JOB_QUEUE
|
923
|
-
AWS Batch Job Queue to submit the job to.
|
924
|
-
iam_role : str, default METAFLOW_ECS_S3_ACCESS_IAM_ROLE
|
925
|
-
AWS IAM role that AWS Batch container uses to access AWS cloud resources.
|
926
|
-
execution_role : str, default METAFLOW_ECS_FARGATE_EXECUTION_ROLE
|
927
|
-
AWS IAM role that AWS Batch can use [to trigger AWS Fargate tasks]
|
928
|
-
(https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html).
|
929
|
-
shared_memory : int, optional, default None
|
930
|
-
The value for the size (in MiB) of the /dev/shm volume for this step.
|
931
|
-
This parameter maps to the `--shm-size` option in Docker.
|
932
|
-
max_swap : int, optional, default None
|
933
|
-
The total amount of swap memory (in MiB) a container can use for this
|
934
|
-
step. This parameter is translated to the `--memory-swap` option in
|
935
|
-
Docker where the value is the sum of the container memory plus the
|
936
|
-
`max_swap` value.
|
937
|
-
swappiness : int, optional, default None
|
938
|
-
This allows you to tune memory swappiness behavior for this step.
|
939
|
-
A swappiness value of 0 causes swapping not to happen unless absolutely
|
940
|
-
necessary. A swappiness value of 100 causes pages to be swapped very
|
941
|
-
aggressively. Accepted values are whole numbers between 0 and 100.
|
942
|
-
use_tmpfs : bool, default False
|
943
|
-
This enables an explicit tmpfs mount for this step.
|
944
|
-
tmpfs_tempdir : bool, default True
|
945
|
-
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
946
|
-
tmpfs_size : int, optional, default None
|
947
|
-
The value for the size (in MiB) of the tmpfs mount for this step.
|
948
|
-
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
949
|
-
memory allocated for this step.
|
950
|
-
tmpfs_path : str, optional, default None
|
951
|
-
Path to tmpfs mount for this step. Defaults to /metaflow_temp.
|
952
|
-
inferentia : int, default 0
|
953
|
-
Number of Inferentia chips required for this step.
|
954
|
-
efa : int, default 0
|
955
|
-
Number of elastic fabric adapter network devices to attach to container
|
831
|
+
vars : Dict[str, str], default {}
|
832
|
+
Dictionary of environment variables to set.
|
956
833
|
"""
|
957
834
|
...
|
958
835
|
|
@@ -990,106 +867,108 @@ def secrets(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
|
|
990
867
|
...
|
991
868
|
|
992
869
|
@typing.overload
|
993
|
-
def
|
870
|
+
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]]]:
|
994
871
|
"""
|
995
|
-
|
872
|
+
Specifies a timeout for your step.
|
996
873
|
|
997
|
-
|
874
|
+
This decorator is useful if this step may hang indefinitely.
|
998
875
|
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
Card type.
|
1003
|
-
id : str, optional, default None
|
1004
|
-
If multiple cards are present, use this id to identify this card.
|
1005
|
-
options : Dict[str, Any], default {}
|
1006
|
-
Options passed to the card. The contents depend on the card type.
|
1007
|
-
timeout : int, default 45
|
1008
|
-
Interrupt reporting if it takes more than this many seconds.
|
876
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
877
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
878
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
1009
879
|
|
880
|
+
Note that all the values specified in parameters are added together so if you specify
|
881
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
1010
882
|
|
883
|
+
Parameters
|
884
|
+
----------
|
885
|
+
seconds : int, default 0
|
886
|
+
Number of seconds to wait prior to timing out.
|
887
|
+
minutes : int, default 0
|
888
|
+
Number of minutes to wait prior to timing out.
|
889
|
+
hours : int, default 0
|
890
|
+
Number of hours to wait prior to timing out.
|
1011
891
|
"""
|
1012
892
|
...
|
1013
893
|
|
1014
894
|
@typing.overload
|
1015
|
-
def
|
895
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1016
896
|
...
|
1017
897
|
|
1018
898
|
@typing.overload
|
1019
|
-
def
|
899
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1020
900
|
...
|
1021
901
|
|
1022
|
-
def
|
902
|
+
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):
|
1023
903
|
"""
|
1024
|
-
|
904
|
+
Specifies a timeout for your step.
|
1025
905
|
|
1026
|
-
|
906
|
+
This decorator is useful if this step may hang indefinitely.
|
1027
907
|
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
Card type.
|
1032
|
-
id : str, optional, default None
|
1033
|
-
If multiple cards are present, use this id to identify this card.
|
1034
|
-
options : Dict[str, Any], default {}
|
1035
|
-
Options passed to the card. The contents depend on the card type.
|
1036
|
-
timeout : int, default 45
|
1037
|
-
Interrupt reporting if it takes more than this many seconds.
|
908
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
909
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
910
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
1038
911
|
|
912
|
+
Note that all the values specified in parameters are added together so if you specify
|
913
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
1039
914
|
|
915
|
+
Parameters
|
916
|
+
----------
|
917
|
+
seconds : int, default 0
|
918
|
+
Number of seconds to wait prior to timing out.
|
919
|
+
minutes : int, default 0
|
920
|
+
Number of minutes to wait prior to timing out.
|
921
|
+
hours : int, default 0
|
922
|
+
Number of hours to wait prior to timing out.
|
1040
923
|
"""
|
1041
924
|
...
|
1042
925
|
|
1043
926
|
@typing.overload
|
1044
|
-
def
|
927
|
+
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]]]:
|
1045
928
|
"""
|
1046
|
-
Specifies the
|
1047
|
-
to a step needs to be retried.
|
1048
|
-
|
1049
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
1050
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
1051
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
929
|
+
Specifies the PyPI packages for the step.
|
1052
930
|
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
931
|
+
Information in this decorator will augment any
|
932
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
933
|
+
you can use `@pypi_base` to set packages required by all
|
934
|
+
steps and use `@pypi` to specify step-specific overrides.
|
1056
935
|
|
1057
936
|
Parameters
|
1058
937
|
----------
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
938
|
+
packages : Dict[str, str], default: {}
|
939
|
+
Packages to use for this step. The key is the name of the package
|
940
|
+
and the value is the version to use.
|
941
|
+
python : str, optional, default: None
|
942
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
943
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1063
944
|
"""
|
1064
945
|
...
|
1065
946
|
|
1066
947
|
@typing.overload
|
1067
|
-
def
|
948
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1068
949
|
...
|
1069
950
|
|
1070
951
|
@typing.overload
|
1071
|
-
def
|
952
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1072
953
|
...
|
1073
954
|
|
1074
|
-
def
|
955
|
+
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):
|
1075
956
|
"""
|
1076
|
-
Specifies the
|
1077
|
-
to a step needs to be retried.
|
1078
|
-
|
1079
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
1080
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
1081
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
957
|
+
Specifies the PyPI packages for the step.
|
1082
958
|
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
959
|
+
Information in this decorator will augment any
|
960
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
961
|
+
you can use `@pypi_base` to set packages required by all
|
962
|
+
steps and use `@pypi` to specify step-specific overrides.
|
1086
963
|
|
1087
964
|
Parameters
|
1088
965
|
----------
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
966
|
+
packages : Dict[str, str], default: {}
|
967
|
+
Packages to use for this step. The key is the name of the package
|
968
|
+
and the value is the version to use.
|
969
|
+
python : str, optional, default: None
|
970
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
971
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1093
972
|
"""
|
1094
973
|
...
|
1095
974
|
|
@@ -1151,108 +1030,188 @@ def conda(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
1151
1030
|
...
|
1152
1031
|
|
1153
1032
|
@typing.overload
|
1154
|
-
def
|
1033
|
+
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]]]:
|
1155
1034
|
"""
|
1156
|
-
|
1157
|
-
|
1158
|
-
This decorator is useful if this step may hang indefinitely.
|
1159
|
-
|
1160
|
-
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
1161
|
-
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
1162
|
-
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
1035
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
1163
1036
|
|
1164
|
-
Note that
|
1165
|
-
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
1037
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
1166
1038
|
|
1167
1039
|
Parameters
|
1168
1040
|
----------
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1041
|
+
type : str, default 'default'
|
1042
|
+
Card type.
|
1043
|
+
id : str, optional, default None
|
1044
|
+
If multiple cards are present, use this id to identify this card.
|
1045
|
+
options : Dict[str, Any], default {}
|
1046
|
+
Options passed to the card. The contents depend on the card type.
|
1047
|
+
timeout : int, default 45
|
1048
|
+
Interrupt reporting if it takes more than this many seconds.
|
1049
|
+
|
1050
|
+
|
1175
1051
|
"""
|
1176
1052
|
...
|
1177
1053
|
|
1178
1054
|
@typing.overload
|
1179
|
-
def
|
1055
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1180
1056
|
...
|
1181
1057
|
|
1182
1058
|
@typing.overload
|
1183
|
-
def
|
1059
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1184
1060
|
...
|
1185
1061
|
|
1186
|
-
def
|
1062
|
+
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):
|
1187
1063
|
"""
|
1188
|
-
|
1189
|
-
|
1190
|
-
This decorator is useful if this step may hang indefinitely.
|
1191
|
-
|
1192
|
-
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
1193
|
-
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
1194
|
-
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
1064
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
1195
1065
|
|
1196
|
-
Note that
|
1197
|
-
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
1066
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
1198
1067
|
|
1199
1068
|
Parameters
|
1200
1069
|
----------
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1070
|
+
type : str, default 'default'
|
1071
|
+
Card type.
|
1072
|
+
id : str, optional, default None
|
1073
|
+
If multiple cards are present, use this id to identify this card.
|
1074
|
+
options : Dict[str, Any], default {}
|
1075
|
+
Options passed to the card. The contents depend on the card type.
|
1076
|
+
timeout : int, default 45
|
1077
|
+
Interrupt reporting if it takes more than this many seconds.
|
1078
|
+
|
1079
|
+
|
1207
1080
|
"""
|
1208
1081
|
...
|
1209
1082
|
|
1210
1083
|
@typing.overload
|
1211
|
-
def
|
1084
|
+
def batch(*, cpu: int = 1, gpu: int = 0, memory: int = 4096, image: typing.Optional[str] = None, queue: str = "METAFLOW_BATCH_JOB_QUEUE", iam_role: str = "METAFLOW_ECS_S3_ACCESS_IAM_ROLE", execution_role: str = "METAFLOW_ECS_FARGATE_EXECUTION_ROLE", shared_memory: typing.Optional[int] = None, max_swap: typing.Optional[int] = None, swappiness: typing.Optional[int] = None, use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = None, inferentia: int = 0, trainium: int = None, efa: int = 0, ephemeral_storage: int = None) -> 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]]]:
|
1212
1085
|
"""
|
1213
|
-
Specifies
|
1214
|
-
|
1215
|
-
Information in this decorator will augment any
|
1216
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
1217
|
-
you can use `@pypi_base` to set packages required by all
|
1218
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1086
|
+
Specifies that this step should execute on [AWS Batch](https://aws.amazon.com/batch/).
|
1219
1087
|
|
1220
1088
|
Parameters
|
1221
1089
|
----------
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1090
|
+
cpu : int, default 1
|
1091
|
+
Number of CPUs required for this step. If `@resources` is
|
1092
|
+
also present, the maximum value from all decorators is used.
|
1093
|
+
gpu : int, default 0
|
1094
|
+
Number of GPUs required for this step. If `@resources` is
|
1095
|
+
also present, the maximum value from all decorators is used.
|
1096
|
+
memory : int, default 4096
|
1097
|
+
Memory size (in MB) required for this step. If
|
1098
|
+
`@resources` is also present, the maximum value from all decorators is
|
1099
|
+
used.
|
1100
|
+
image : str, optional, default None
|
1101
|
+
Docker image to use when launching on AWS Batch. If not specified, and
|
1102
|
+
METAFLOW_BATCH_CONTAINER_IMAGE is specified, that image is used. If
|
1103
|
+
not, a default Docker image mapping to the current version of Python is used.
|
1104
|
+
queue : str, default METAFLOW_BATCH_JOB_QUEUE
|
1105
|
+
AWS Batch Job Queue to submit the job to.
|
1106
|
+
iam_role : str, default METAFLOW_ECS_S3_ACCESS_IAM_ROLE
|
1107
|
+
AWS IAM role that AWS Batch container uses to access AWS cloud resources.
|
1108
|
+
execution_role : str, default METAFLOW_ECS_FARGATE_EXECUTION_ROLE
|
1109
|
+
AWS IAM role that AWS Batch can use [to trigger AWS Fargate tasks]
|
1110
|
+
(https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html).
|
1111
|
+
shared_memory : int, optional, default None
|
1112
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
1113
|
+
This parameter maps to the `--shm-size` option in Docker.
|
1114
|
+
max_swap : int, optional, default None
|
1115
|
+
The total amount of swap memory (in MiB) a container can use for this
|
1116
|
+
step. This parameter is translated to the `--memory-swap` option in
|
1117
|
+
Docker where the value is the sum of the container memory plus the
|
1118
|
+
`max_swap` value.
|
1119
|
+
swappiness : int, optional, default None
|
1120
|
+
This allows you to tune memory swappiness behavior for this step.
|
1121
|
+
A swappiness value of 0 causes swapping not to happen unless absolutely
|
1122
|
+
necessary. A swappiness value of 100 causes pages to be swapped very
|
1123
|
+
aggressively. Accepted values are whole numbers between 0 and 100.
|
1124
|
+
use_tmpfs : bool, default False
|
1125
|
+
This enables an explicit tmpfs mount for this step. Note that tmpfs is
|
1126
|
+
not available on Fargate compute environments
|
1127
|
+
tmpfs_tempdir : bool, default True
|
1128
|
+
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
1129
|
+
tmpfs_size : int, optional, default None
|
1130
|
+
The value for the size (in MiB) of the tmpfs mount for this step.
|
1131
|
+
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
1132
|
+
memory allocated for this step.
|
1133
|
+
tmpfs_path : str, optional, default None
|
1134
|
+
Path to tmpfs mount for this step. Defaults to /metaflow_temp.
|
1135
|
+
inferentia : int, default 0
|
1136
|
+
Number of Inferentia chips required for this step.
|
1137
|
+
trainium : int, default None
|
1138
|
+
Alias for inferentia. Use only one of the two.
|
1139
|
+
efa : int, default 0
|
1140
|
+
Number of elastic fabric adapter network devices to attach to container
|
1141
|
+
ephemeral_storage: int, default None
|
1142
|
+
The total amount, in GiB, of ephemeral storage to set for the task (21-200)
|
1143
|
+
This is only relevant for Fargate compute environments
|
1228
1144
|
"""
|
1229
1145
|
...
|
1230
1146
|
|
1231
1147
|
@typing.overload
|
1232
|
-
def
|
1148
|
+
def batch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1233
1149
|
...
|
1234
1150
|
|
1235
1151
|
@typing.overload
|
1236
|
-
def
|
1152
|
+
def batch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1237
1153
|
...
|
1238
1154
|
|
1239
|
-
def
|
1155
|
+
def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, cpu: int = 1, gpu: int = 0, memory: int = 4096, image: typing.Optional[str] = None, queue: str = "METAFLOW_BATCH_JOB_QUEUE", iam_role: str = "METAFLOW_ECS_S3_ACCESS_IAM_ROLE", execution_role: str = "METAFLOW_ECS_FARGATE_EXECUTION_ROLE", shared_memory: typing.Optional[int] = None, max_swap: typing.Optional[int] = None, swappiness: typing.Optional[int] = None, use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = None, inferentia: int = 0, trainium: int = None, efa: int = 0, ephemeral_storage: int = None):
|
1240
1156
|
"""
|
1241
|
-
Specifies
|
1242
|
-
|
1243
|
-
Information in this decorator will augment any
|
1244
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
1245
|
-
you can use `@pypi_base` to set packages required by all
|
1246
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1157
|
+
Specifies that this step should execute on [AWS Batch](https://aws.amazon.com/batch/).
|
1247
1158
|
|
1248
1159
|
Parameters
|
1249
1160
|
----------
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1161
|
+
cpu : int, default 1
|
1162
|
+
Number of CPUs required for this step. If `@resources` is
|
1163
|
+
also present, the maximum value from all decorators is used.
|
1164
|
+
gpu : int, default 0
|
1165
|
+
Number of GPUs required for this step. If `@resources` is
|
1166
|
+
also present, the maximum value from all decorators is used.
|
1167
|
+
memory : int, default 4096
|
1168
|
+
Memory size (in MB) required for this step. If
|
1169
|
+
`@resources` is also present, the maximum value from all decorators is
|
1170
|
+
used.
|
1171
|
+
image : str, optional, default None
|
1172
|
+
Docker image to use when launching on AWS Batch. If not specified, and
|
1173
|
+
METAFLOW_BATCH_CONTAINER_IMAGE is specified, that image is used. If
|
1174
|
+
not, a default Docker image mapping to the current version of Python is used.
|
1175
|
+
queue : str, default METAFLOW_BATCH_JOB_QUEUE
|
1176
|
+
AWS Batch Job Queue to submit the job to.
|
1177
|
+
iam_role : str, default METAFLOW_ECS_S3_ACCESS_IAM_ROLE
|
1178
|
+
AWS IAM role that AWS Batch container uses to access AWS cloud resources.
|
1179
|
+
execution_role : str, default METAFLOW_ECS_FARGATE_EXECUTION_ROLE
|
1180
|
+
AWS IAM role that AWS Batch can use [to trigger AWS Fargate tasks]
|
1181
|
+
(https://docs.aws.amazon.com/batch/latest/userguide/execution-IAM-role.html).
|
1182
|
+
shared_memory : int, optional, default None
|
1183
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
1184
|
+
This parameter maps to the `--shm-size` option in Docker.
|
1185
|
+
max_swap : int, optional, default None
|
1186
|
+
The total amount of swap memory (in MiB) a container can use for this
|
1187
|
+
step. This parameter is translated to the `--memory-swap` option in
|
1188
|
+
Docker where the value is the sum of the container memory plus the
|
1189
|
+
`max_swap` value.
|
1190
|
+
swappiness : int, optional, default None
|
1191
|
+
This allows you to tune memory swappiness behavior for this step.
|
1192
|
+
A swappiness value of 0 causes swapping not to happen unless absolutely
|
1193
|
+
necessary. A swappiness value of 100 causes pages to be swapped very
|
1194
|
+
aggressively. Accepted values are whole numbers between 0 and 100.
|
1195
|
+
use_tmpfs : bool, default False
|
1196
|
+
This enables an explicit tmpfs mount for this step. Note that tmpfs is
|
1197
|
+
not available on Fargate compute environments
|
1198
|
+
tmpfs_tempdir : bool, default True
|
1199
|
+
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
1200
|
+
tmpfs_size : int, optional, default None
|
1201
|
+
The value for the size (in MiB) of the tmpfs mount for this step.
|
1202
|
+
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
1203
|
+
memory allocated for this step.
|
1204
|
+
tmpfs_path : str, optional, default None
|
1205
|
+
Path to tmpfs mount for this step. Defaults to /metaflow_temp.
|
1206
|
+
inferentia : int, default 0
|
1207
|
+
Number of Inferentia chips required for this step.
|
1208
|
+
trainium : int, default None
|
1209
|
+
Alias for inferentia. Use only one of the two.
|
1210
|
+
efa : int, default 0
|
1211
|
+
Number of elastic fabric adapter network devices to attach to container
|
1212
|
+
ephemeral_storage: int, default None
|
1213
|
+
The total amount, in GiB, of ephemeral storage to set for the task (21-200)
|
1214
|
+
This is only relevant for Fargate compute environments
|
1256
1215
|
"""
|
1257
1216
|
...
|
1258
1217
|
|
@@ -1363,103 +1322,71 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
|
|
1363
1322
|
...
|
1364
1323
|
|
1365
1324
|
@typing.overload
|
1366
|
-
def
|
1325
|
+
def retry(*, times: int = 3, minutes_between_retries: int = 2) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
1367
1326
|
"""
|
1368
|
-
Specifies the
|
1369
|
-
|
1370
|
-
```
|
1371
|
-
@trigger_on_finish(flow='FooFlow')
|
1372
|
-
```
|
1373
|
-
or
|
1374
|
-
```
|
1375
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1376
|
-
```
|
1377
|
-
This decorator respects the @project decorator and triggers the flow
|
1378
|
-
when upstream runs within the same namespace complete successfully
|
1379
|
-
|
1380
|
-
Additionally, you can specify project aware upstream flow dependencies
|
1381
|
-
by specifying the fully qualified project_flow_name.
|
1382
|
-
```
|
1383
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1384
|
-
```
|
1385
|
-
or
|
1386
|
-
```
|
1387
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1388
|
-
```
|
1327
|
+
Specifies the number of times the task corresponding
|
1328
|
+
to a step needs to be retried.
|
1389
1329
|
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1394
|
-
```
|
1330
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
1331
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
1332
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
1395
1333
|
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
- `test.my_experiment`
|
1400
|
-
- `prod.staging`
|
1334
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
1335
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
1336
|
+
ensuring that the flow execution can continue.
|
1401
1337
|
|
1402
1338
|
Parameters
|
1403
1339
|
----------
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
options : Dict[str, Any], default {}
|
1409
|
-
Backend-specific configuration for tuning eventing behavior.
|
1410
|
-
|
1411
|
-
|
1340
|
+
times : int, default 3
|
1341
|
+
Number of times to retry this task.
|
1342
|
+
minutes_between_retries : int, default 2
|
1343
|
+
Number of minutes between retries.
|
1412
1344
|
"""
|
1413
1345
|
...
|
1414
1346
|
|
1415
1347
|
@typing.overload
|
1416
|
-
def
|
1348
|
+
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1417
1349
|
...
|
1418
1350
|
|
1419
|
-
|
1351
|
+
@typing.overload
|
1352
|
+
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1353
|
+
...
|
1354
|
+
|
1355
|
+
def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, times: int = 3, minutes_between_retries: int = 2):
|
1420
1356
|
"""
|
1421
|
-
Specifies the
|
1357
|
+
Specifies the number of times the task corresponding
|
1358
|
+
to a step needs to be retried.
|
1422
1359
|
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
or
|
1427
|
-
```
|
1428
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1429
|
-
```
|
1430
|
-
This decorator respects the @project decorator and triggers the flow
|
1431
|
-
when upstream runs within the same namespace complete successfully
|
1360
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
1361
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
1362
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
1432
1363
|
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1437
|
-
```
|
1438
|
-
or
|
1439
|
-
```
|
1440
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1441
|
-
```
|
1364
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
1365
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
1366
|
+
ensuring that the flow execution can continue.
|
1442
1367
|
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1368
|
+
Parameters
|
1369
|
+
----------
|
1370
|
+
times : int, default 3
|
1371
|
+
Number of times to retry this task.
|
1372
|
+
minutes_between_retries : int, default 2
|
1373
|
+
Number of minutes between retries.
|
1374
|
+
"""
|
1375
|
+
...
|
1376
|
+
|
1377
|
+
def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1378
|
+
"""
|
1379
|
+
Specifies what flows belong to the same project.
|
1448
1380
|
|
1449
|
-
|
1450
|
-
|
1451
|
-
- `user.bob`
|
1452
|
-
- `test.my_experiment`
|
1453
|
-
- `prod.staging`
|
1381
|
+
A project-specific namespace is created for all flows that
|
1382
|
+
use the same `@project(name)`.
|
1454
1383
|
|
1455
1384
|
Parameters
|
1456
1385
|
----------
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
options : Dict[str, Any], default {}
|
1462
|
-
Backend-specific configuration for tuning eventing behavior.
|
1386
|
+
name : str
|
1387
|
+
Project name. Make sure that the name is unique amongst all
|
1388
|
+
projects that use the same production scheduler. The name may
|
1389
|
+
contain only lowercase alphanumeric characters and underscores.
|
1463
1390
|
|
1464
1391
|
|
1465
1392
|
"""
|
@@ -1556,87 +1483,6 @@ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packa
|
|
1556
1483
|
"""
|
1557
1484
|
...
|
1558
1485
|
|
1559
|
-
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]]:
|
1560
|
-
"""
|
1561
|
-
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)
|
1562
|
-
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
1563
|
-
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1564
|
-
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1565
|
-
starts only after all sensors finish.
|
1566
|
-
|
1567
|
-
Parameters
|
1568
|
-
----------
|
1569
|
-
timeout : int
|
1570
|
-
Time, in seconds before the task times out and fails. (Default: 3600)
|
1571
|
-
poke_interval : int
|
1572
|
-
Time in seconds that the job should wait in between each try. (Default: 60)
|
1573
|
-
mode : str
|
1574
|
-
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1575
|
-
exponential_backoff : bool
|
1576
|
-
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1577
|
-
pool : str
|
1578
|
-
the slot pool this task should run in,
|
1579
|
-
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1580
|
-
soft_fail : bool
|
1581
|
-
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1582
|
-
name : str
|
1583
|
-
Name of the sensor on Airflow
|
1584
|
-
description : str
|
1585
|
-
Description of sensor in the Airflow UI
|
1586
|
-
bucket_key : Union[str, List[str]]
|
1587
|
-
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
1588
|
-
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
1589
|
-
bucket_name : str
|
1590
|
-
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
1591
|
-
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
1592
|
-
wildcard_match : bool
|
1593
|
-
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
1594
|
-
aws_conn_id : str
|
1595
|
-
a reference to the s3 connection on Airflow. (Default: None)
|
1596
|
-
verify : bool
|
1597
|
-
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
1598
|
-
"""
|
1599
|
-
...
|
1600
|
-
|
1601
|
-
@typing.overload
|
1602
|
-
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1603
|
-
"""
|
1604
|
-
Specifies the PyPI packages for all steps of the flow.
|
1605
|
-
|
1606
|
-
Use `@pypi_base` to set common packages required by all
|
1607
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1608
|
-
Parameters
|
1609
|
-
----------
|
1610
|
-
packages : Dict[str, str], default: {}
|
1611
|
-
Packages to use for this flow. The key is the name of the package
|
1612
|
-
and the value is the version to use.
|
1613
|
-
python : str, optional, default: None
|
1614
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1615
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1616
|
-
"""
|
1617
|
-
...
|
1618
|
-
|
1619
|
-
@typing.overload
|
1620
|
-
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1621
|
-
...
|
1622
|
-
|
1623
|
-
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
1624
|
-
"""
|
1625
|
-
Specifies the PyPI packages for all steps of the flow.
|
1626
|
-
|
1627
|
-
Use `@pypi_base` to set common packages required by all
|
1628
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1629
|
-
Parameters
|
1630
|
-
----------
|
1631
|
-
packages : Dict[str, str], default: {}
|
1632
|
-
Packages to use for this flow. The key is the name of the package
|
1633
|
-
and the value is the version to use.
|
1634
|
-
python : str, optional, default: None
|
1635
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1636
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1637
|
-
"""
|
1638
|
-
...
|
1639
|
-
|
1640
1486
|
@typing.overload
|
1641
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]]:
|
1642
1488
|
"""
|
@@ -1686,24 +1532,6 @@ def schedule(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, hourly:
|
|
1686
1532
|
"""
|
1687
1533
|
...
|
1688
1534
|
|
1689
|
-
def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1690
|
-
"""
|
1691
|
-
Specifies what flows belong to the same project.
|
1692
|
-
|
1693
|
-
A project-specific namespace is created for all flows that
|
1694
|
-
use the same `@project(name)`.
|
1695
|
-
|
1696
|
-
Parameters
|
1697
|
-
----------
|
1698
|
-
name : str
|
1699
|
-
Project name. Make sure that the name is unique amongst all
|
1700
|
-
projects that use the same production scheduler. The name may
|
1701
|
-
contain only lowercase alphanumeric characters and underscores.
|
1702
|
-
|
1703
|
-
|
1704
|
-
"""
|
1705
|
-
...
|
1706
|
-
|
1707
1535
|
@typing.overload
|
1708
1536
|
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]]:
|
1709
1537
|
"""
|
@@ -1799,6 +1627,190 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
1799
1627
|
"""
|
1800
1628
|
...
|
1801
1629
|
|
1630
|
+
@typing.overload
|
1631
|
+
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1632
|
+
"""
|
1633
|
+
Specifies the PyPI packages for all steps of the flow.
|
1634
|
+
|
1635
|
+
Use `@pypi_base` to set common packages required by all
|
1636
|
+
steps and use `@pypi` to specify step-specific overrides.
|
1637
|
+
Parameters
|
1638
|
+
----------
|
1639
|
+
packages : Dict[str, str], default: {}
|
1640
|
+
Packages to use for this flow. The key is the name of the package
|
1641
|
+
and the value is the version to use.
|
1642
|
+
python : str, optional, default: None
|
1643
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1644
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1645
|
+
"""
|
1646
|
+
...
|
1647
|
+
|
1648
|
+
@typing.overload
|
1649
|
+
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1650
|
+
...
|
1651
|
+
|
1652
|
+
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
1653
|
+
"""
|
1654
|
+
Specifies the PyPI packages for all steps of the flow.
|
1655
|
+
|
1656
|
+
Use `@pypi_base` to set common packages required by all
|
1657
|
+
steps and use `@pypi` to specify step-specific overrides.
|
1658
|
+
Parameters
|
1659
|
+
----------
|
1660
|
+
packages : Dict[str, str], default: {}
|
1661
|
+
Packages to use for this flow. The key is the name of the package
|
1662
|
+
and the value is the version to use.
|
1663
|
+
python : str, optional, default: None
|
1664
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1665
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1666
|
+
"""
|
1667
|
+
...
|
1668
|
+
|
1669
|
+
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]]:
|
1670
|
+
"""
|
1671
|
+
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)
|
1672
|
+
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
1673
|
+
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1674
|
+
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1675
|
+
starts only after all sensors finish.
|
1676
|
+
|
1677
|
+
Parameters
|
1678
|
+
----------
|
1679
|
+
timeout : int
|
1680
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
1681
|
+
poke_interval : int
|
1682
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
1683
|
+
mode : str
|
1684
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1685
|
+
exponential_backoff : bool
|
1686
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1687
|
+
pool : str
|
1688
|
+
the slot pool this task should run in,
|
1689
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1690
|
+
soft_fail : bool
|
1691
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1692
|
+
name : str
|
1693
|
+
Name of the sensor on Airflow
|
1694
|
+
description : str
|
1695
|
+
Description of sensor in the Airflow UI
|
1696
|
+
bucket_key : Union[str, List[str]]
|
1697
|
+
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
1698
|
+
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
1699
|
+
bucket_name : str
|
1700
|
+
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
1701
|
+
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
1702
|
+
wildcard_match : bool
|
1703
|
+
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
1704
|
+
aws_conn_id : str
|
1705
|
+
a reference to the s3 connection on Airflow. (Default: None)
|
1706
|
+
verify : bool
|
1707
|
+
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
1708
|
+
"""
|
1709
|
+
...
|
1710
|
+
|
1711
|
+
@typing.overload
|
1712
|
+
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]]:
|
1713
|
+
"""
|
1714
|
+
Specifies the flow(s) that this flow depends on.
|
1715
|
+
|
1716
|
+
```
|
1717
|
+
@trigger_on_finish(flow='FooFlow')
|
1718
|
+
```
|
1719
|
+
or
|
1720
|
+
```
|
1721
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1722
|
+
```
|
1723
|
+
This decorator respects the @project decorator and triggers the flow
|
1724
|
+
when upstream runs within the same namespace complete successfully
|
1725
|
+
|
1726
|
+
Additionally, you can specify project aware upstream flow dependencies
|
1727
|
+
by specifying the fully qualified project_flow_name.
|
1728
|
+
```
|
1729
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1730
|
+
```
|
1731
|
+
or
|
1732
|
+
```
|
1733
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1734
|
+
```
|
1735
|
+
|
1736
|
+
You can also specify just the project or project branch (other values will be
|
1737
|
+
inferred from the current project or project branch):
|
1738
|
+
```
|
1739
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1740
|
+
```
|
1741
|
+
|
1742
|
+
Note that `branch` is typically one of:
|
1743
|
+
- `prod`
|
1744
|
+
- `user.bob`
|
1745
|
+
- `test.my_experiment`
|
1746
|
+
- `prod.staging`
|
1747
|
+
|
1748
|
+
Parameters
|
1749
|
+
----------
|
1750
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
1751
|
+
Upstream flow dependency for this flow.
|
1752
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
1753
|
+
Upstream flow dependencies for this flow.
|
1754
|
+
options : Dict[str, Any], default {}
|
1755
|
+
Backend-specific configuration for tuning eventing behavior.
|
1756
|
+
|
1757
|
+
|
1758
|
+
"""
|
1759
|
+
...
|
1760
|
+
|
1761
|
+
@typing.overload
|
1762
|
+
def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1763
|
+
...
|
1764
|
+
|
1765
|
+
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] = {}):
|
1766
|
+
"""
|
1767
|
+
Specifies the flow(s) that this flow depends on.
|
1768
|
+
|
1769
|
+
```
|
1770
|
+
@trigger_on_finish(flow='FooFlow')
|
1771
|
+
```
|
1772
|
+
or
|
1773
|
+
```
|
1774
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1775
|
+
```
|
1776
|
+
This decorator respects the @project decorator and triggers the flow
|
1777
|
+
when upstream runs within the same namespace complete successfully
|
1778
|
+
|
1779
|
+
Additionally, you can specify project aware upstream flow dependencies
|
1780
|
+
by specifying the fully qualified project_flow_name.
|
1781
|
+
```
|
1782
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1783
|
+
```
|
1784
|
+
or
|
1785
|
+
```
|
1786
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1787
|
+
```
|
1788
|
+
|
1789
|
+
You can also specify just the project or project branch (other values will be
|
1790
|
+
inferred from the current project or project branch):
|
1791
|
+
```
|
1792
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1793
|
+
```
|
1794
|
+
|
1795
|
+
Note that `branch` is typically one of:
|
1796
|
+
- `prod`
|
1797
|
+
- `user.bob`
|
1798
|
+
- `test.my_experiment`
|
1799
|
+
- `prod.staging`
|
1800
|
+
|
1801
|
+
Parameters
|
1802
|
+
----------
|
1803
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
1804
|
+
Upstream flow dependency for this flow.
|
1805
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
1806
|
+
Upstream flow dependencies for this flow.
|
1807
|
+
options : Dict[str, Any], default {}
|
1808
|
+
Backend-specific configuration for tuning eventing behavior.
|
1809
|
+
|
1810
|
+
|
1811
|
+
"""
|
1812
|
+
...
|
1813
|
+
|
1802
1814
|
def namespace(ns: typing.Optional[str]) -> typing.Optional[str]:
|
1803
1815
|
"""
|
1804
1816
|
Switch namespace to the one provided.
|