metaflow-stubs 2.11.6__py2.py3-none-any.whl → 2.11.8__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- metaflow-stubs/__init__.pyi +434 -434
- metaflow-stubs/cards.pyi +4 -4
- metaflow-stubs/cli.pyi +2 -2
- metaflow-stubs/client/__init__.pyi +3 -3
- metaflow-stubs/client/core.pyi +7 -7
- metaflow-stubs/client/filecache.pyi +3 -3
- metaflow-stubs/clone_util.pyi +2 -2
- 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 +4 -4
- metaflow-stubs/metadata/metadata.pyi +3 -3
- metaflow-stubs/metadata/util.pyi +2 -2
- metaflow-stubs/metaflow_config.pyi +2 -2
- metaflow-stubs/metaflow_current.pyi +6 -6
- 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 +2 -2
- 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 +4 -4
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +4 -4
- 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 +2 -2
- metaflow-stubs/plugins/aws/batch/batch_cli.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
- 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 +3 -3
- 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 +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +4 -4
- 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 +4 -4
- 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 +4 -4
- 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 +3 -3
- 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 +3 -3
- 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 +2 -2
- metaflow-stubs/plugins/datatools/__init__.pyi +3 -3
- metaflow-stubs/plugins/datatools/local.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +3 -3
- 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 +4 -4
- 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 +4 -4
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +3 -3
- 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.6.dist-info → metaflow_stubs-2.11.8.dist-info}/METADATA +2 -2
- metaflow_stubs-2.11.8.dist-info/RECORD +132 -0
- metaflow_stubs-2.11.6.dist-info/RECORD +0 -132
- {metaflow_stubs-2.11.6.dist-info → metaflow_stubs-2.11.8.dist-info}/WHEEL +0 -0
- {metaflow_stubs-2.11.6.dist-info → metaflow_stubs-2.11.8.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-03-
|
3
|
+
# MF version: 2.11.8 #
|
4
|
+
# Generated on 2024-03-29T12:37:59.184463 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
-
import metaflow.metaflow_current
|
12
|
-
import datetime
|
13
11
|
import metaflow.events
|
14
|
-
import metaflow.parameters
|
15
|
-
import typing
|
16
12
|
import metaflow.plugins.datatools.s3.s3
|
17
|
-
import io
|
18
13
|
import metaflow._vendor.click.types
|
19
|
-
import metaflow.datastore.inputs
|
20
14
|
import metaflow.client.core
|
15
|
+
import metaflow.datastore.inputs
|
16
|
+
import typing
|
17
|
+
import metaflow.parameters
|
18
|
+
import datetime
|
19
|
+
import io
|
20
|
+
import metaflow.metaflow_current
|
21
21
|
FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
|
22
22
|
StepFlag = typing.NewType("StepFlag", bool)
|
23
23
|
|
@@ -725,6 +725,90 @@ 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
|
+
@typing.overload
|
760
|
+
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]]]:
|
761
|
+
"""
|
762
|
+
Specifies the number of times the task corresponding
|
763
|
+
to a step needs to be retried.
|
764
|
+
|
765
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
766
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
767
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
768
|
+
|
769
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
770
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
771
|
+
ensuring that the flow execution can continue.
|
772
|
+
|
773
|
+
Parameters
|
774
|
+
----------
|
775
|
+
times : int, default 3
|
776
|
+
Number of times to retry this task.
|
777
|
+
minutes_between_retries : int, default 2
|
778
|
+
Number of minutes between retries.
|
779
|
+
"""
|
780
|
+
...
|
781
|
+
|
782
|
+
@typing.overload
|
783
|
+
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
784
|
+
...
|
785
|
+
|
786
|
+
@typing.overload
|
787
|
+
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
788
|
+
...
|
789
|
+
|
790
|
+
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):
|
791
|
+
"""
|
792
|
+
Specifies the number of times the task corresponding
|
793
|
+
to a step needs to be retried.
|
794
|
+
|
795
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
796
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
797
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
798
|
+
|
799
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
800
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
801
|
+
ensuring that the flow execution can continue.
|
802
|
+
|
803
|
+
Parameters
|
804
|
+
----------
|
805
|
+
times : int, default 3
|
806
|
+
Number of times to retry this task.
|
807
|
+
minutes_between_retries : int, default 2
|
808
|
+
Number of minutes between retries.
|
809
|
+
"""
|
810
|
+
...
|
811
|
+
|
728
812
|
@typing.overload
|
729
813
|
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]]]:
|
730
814
|
"""
|
@@ -851,37 +935,6 @@ def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
851
935
|
"""
|
852
936
|
...
|
853
937
|
|
854
|
-
@typing.overload
|
855
|
-
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]]]:
|
856
|
-
"""
|
857
|
-
Specifies environment variables to be set prior to the execution of a step.
|
858
|
-
|
859
|
-
Parameters
|
860
|
-
----------
|
861
|
-
vars : Dict[str, str], default {}
|
862
|
-
Dictionary of environment variables to set.
|
863
|
-
"""
|
864
|
-
...
|
865
|
-
|
866
|
-
@typing.overload
|
867
|
-
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
868
|
-
...
|
869
|
-
|
870
|
-
@typing.overload
|
871
|
-
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
872
|
-
...
|
873
|
-
|
874
|
-
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
875
|
-
"""
|
876
|
-
Specifies environment variables to be set prior to the execution of a step.
|
877
|
-
|
878
|
-
Parameters
|
879
|
-
----------
|
880
|
-
vars : Dict[str, str], default {}
|
881
|
-
Dictionary of environment variables to set.
|
882
|
-
"""
|
883
|
-
...
|
884
|
-
|
885
938
|
@typing.overload
|
886
939
|
def batch(*, cpu: int = 1, gpu: int = 0, memory: int = 4096, image: typing.Optional[str] = None, queue: str = "METAFLOW_BATCH_JOB_QUEUE", iam_role: str = "METAFLOW_ECS_S3_ACCESS_IAM_ROLE", execution_role: str = "METAFLOW_ECS_FARGATE_EXECUTION_ROLE", shared_memory: typing.Optional[int] = None, max_swap: typing.Optional[int] = None, swappiness: typing.Optional[int] = None, use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = None, inferentia: int = 0, trainium: int = None, efa: int = 0, ephemeral_storage: int = None, log_driver: typing.Optional[str] = None, log_options: typing.Optional[typing.List[str]] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
887
940
|
"""
|
@@ -1029,63 +1082,6 @@ def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
1029
1082
|
"""
|
1030
1083
|
...
|
1031
1084
|
|
1032
|
-
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) -> 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]]]:
|
1033
|
-
"""
|
1034
|
-
Specifies that this step should execute on Kubernetes.
|
1035
|
-
|
1036
|
-
Parameters
|
1037
|
-
----------
|
1038
|
-
cpu : int, default 1
|
1039
|
-
Number of CPUs required for this step. If `@resources` is
|
1040
|
-
also present, the maximum value from all decorators is used.
|
1041
|
-
memory : int, default 4096
|
1042
|
-
Memory size (in MB) required for this step. If
|
1043
|
-
`@resources` is also present, the maximum value from all decorators is
|
1044
|
-
used.
|
1045
|
-
disk : int, default 10240
|
1046
|
-
Disk size (in MB) required for this step. If
|
1047
|
-
`@resources` is also present, the maximum value from all decorators is
|
1048
|
-
used.
|
1049
|
-
image : str, optional, default None
|
1050
|
-
Docker image to use when launching on Kubernetes. If not specified, and
|
1051
|
-
METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
|
1052
|
-
not, a default Docker image mapping to the current version of Python is used.
|
1053
|
-
image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
|
1054
|
-
If given, the imagePullPolicy to be applied to the Docker image of the step.
|
1055
|
-
service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
|
1056
|
-
Kubernetes service account to use when launching pod in Kubernetes.
|
1057
|
-
secrets : List[str], optional, default None
|
1058
|
-
Kubernetes secrets to use when launching pod in Kubernetes. These
|
1059
|
-
secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
|
1060
|
-
in Metaflow configuration.
|
1061
|
-
namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
|
1062
|
-
Kubernetes namespace to use when launching pod in Kubernetes.
|
1063
|
-
gpu : int, optional, default None
|
1064
|
-
Number of GPUs required for this step. A value of zero implies that
|
1065
|
-
the scheduled node should not have GPUs.
|
1066
|
-
gpu_vendor : str, default KUBERNETES_GPU_VENDOR
|
1067
|
-
The vendor of the GPUs to be used for this step.
|
1068
|
-
tolerations : List[str], default []
|
1069
|
-
The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
|
1070
|
-
Kubernetes tolerations to use when launching pod in Kubernetes.
|
1071
|
-
use_tmpfs : bool, default False
|
1072
|
-
This enables an explicit tmpfs mount for this step.
|
1073
|
-
tmpfs_tempdir : bool, default True
|
1074
|
-
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
1075
|
-
tmpfs_size : int, optional, default: None
|
1076
|
-
The value for the size (in MiB) of the tmpfs mount for this step.
|
1077
|
-
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
1078
|
-
memory allocated for this step.
|
1079
|
-
tmpfs_path : str, optional, default /metaflow_temp
|
1080
|
-
Path to tmpfs mount for this step.
|
1081
|
-
persistent_volume_claims : Dict[str, str], optional, default None
|
1082
|
-
A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
|
1083
|
-
volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
|
1084
|
-
shared_memory: int, optional
|
1085
|
-
Shared memory size (in MiB) required for this step
|
1086
|
-
"""
|
1087
|
-
...
|
1088
|
-
|
1089
1085
|
@typing.overload
|
1090
1086
|
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]]]:
|
1091
1087
|
"""
|
@@ -1138,112 +1134,92 @@ def card(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typ
|
|
1138
1134
|
...
|
1139
1135
|
|
1140
1136
|
@typing.overload
|
1141
|
-
def
|
1137
|
+
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]]]:
|
1142
1138
|
"""
|
1143
|
-
Specifies
|
1144
|
-
|
1145
|
-
Information in this decorator will augment any
|
1146
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
1147
|
-
you can use `@conda_base` to set packages required by all
|
1148
|
-
steps and use `@conda` to specify step-specific overrides.
|
1139
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
1140
|
+
the execution of a step.
|
1149
1141
|
|
1150
1142
|
Parameters
|
1151
1143
|
----------
|
1152
|
-
|
1153
|
-
|
1154
|
-
and the value is the version to use.
|
1155
|
-
libraries : Dict[str, str], default {}
|
1156
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1157
|
-
python : str, optional, default None
|
1158
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1159
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1160
|
-
disabled : bool, default False
|
1161
|
-
If set to True, disables @conda.
|
1144
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
1145
|
+
List of secret specs, defining how the secrets are to be retrieved
|
1162
1146
|
"""
|
1163
1147
|
...
|
1164
1148
|
|
1165
1149
|
@typing.overload
|
1166
|
-
def
|
1150
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1167
1151
|
...
|
1168
1152
|
|
1169
1153
|
@typing.overload
|
1170
|
-
def
|
1154
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1171
1155
|
...
|
1172
1156
|
|
1173
|
-
def
|
1157
|
+
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]]] = []):
|
1174
1158
|
"""
|
1175
|
-
Specifies
|
1176
|
-
|
1177
|
-
Information in this decorator will augment any
|
1178
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
1179
|
-
you can use `@conda_base` to set packages required by all
|
1180
|
-
steps and use `@conda` to specify step-specific overrides.
|
1159
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
1160
|
+
the execution of a step.
|
1181
1161
|
|
1182
1162
|
Parameters
|
1183
1163
|
----------
|
1184
|
-
|
1185
|
-
|
1186
|
-
and the value is the version to use.
|
1187
|
-
libraries : Dict[str, str], default {}
|
1188
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1189
|
-
python : str, optional, default None
|
1190
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1191
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1192
|
-
disabled : bool, default False
|
1193
|
-
If set to True, disables @conda.
|
1164
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
1165
|
+
List of secret specs, defining how the secrets are to be retrieved
|
1194
1166
|
"""
|
1195
1167
|
...
|
1196
1168
|
|
1197
1169
|
@typing.overload
|
1198
|
-
def
|
1170
|
+
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]]]:
|
1199
1171
|
"""
|
1200
|
-
Specifies
|
1201
|
-
to a step needs to be retried.
|
1172
|
+
Specifies a timeout for your step.
|
1202
1173
|
|
1203
|
-
This decorator is useful
|
1204
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
1205
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
1174
|
+
This decorator is useful if this step may hang indefinitely.
|
1206
1175
|
|
1207
|
-
This can be used in conjunction with the `@
|
1208
|
-
|
1209
|
-
|
1176
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
1177
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
1178
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
1179
|
+
|
1180
|
+
Note that all the values specified in parameters are added together so if you specify
|
1181
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
1210
1182
|
|
1211
1183
|
Parameters
|
1212
1184
|
----------
|
1213
|
-
|
1214
|
-
Number of
|
1215
|
-
|
1216
|
-
Number of minutes
|
1217
|
-
|
1218
|
-
|
1185
|
+
seconds : int, default 0
|
1186
|
+
Number of seconds to wait prior to timing out.
|
1187
|
+
minutes : int, default 0
|
1188
|
+
Number of minutes to wait prior to timing out.
|
1189
|
+
hours : int, default 0
|
1190
|
+
Number of hours to wait prior to timing out.
|
1191
|
+
"""
|
1192
|
+
...
|
1219
1193
|
|
1220
1194
|
@typing.overload
|
1221
|
-
def
|
1195
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1222
1196
|
...
|
1223
1197
|
|
1224
1198
|
@typing.overload
|
1225
|
-
def
|
1199
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1226
1200
|
...
|
1227
1201
|
|
1228
|
-
def
|
1202
|
+
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):
|
1229
1203
|
"""
|
1230
|
-
Specifies
|
1231
|
-
to a step needs to be retried.
|
1204
|
+
Specifies a timeout for your step.
|
1232
1205
|
|
1233
|
-
This decorator is useful
|
1234
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
1235
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
1206
|
+
This decorator is useful if this step may hang indefinitely.
|
1236
1207
|
|
1237
|
-
This can be used in conjunction with the `@
|
1238
|
-
|
1239
|
-
|
1208
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
1209
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
1210
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
1211
|
+
|
1212
|
+
Note that all the values specified in parameters are added together so if you specify
|
1213
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
1240
1214
|
|
1241
1215
|
Parameters
|
1242
1216
|
----------
|
1243
|
-
|
1244
|
-
Number of
|
1245
|
-
|
1246
|
-
Number of minutes
|
1217
|
+
seconds : int, default 0
|
1218
|
+
Number of seconds to wait prior to timing out.
|
1219
|
+
minutes : int, default 0
|
1220
|
+
Number of minutes to wait prior to timing out.
|
1221
|
+
hours : int, default 0
|
1222
|
+
Number of hours to wait prior to timing out.
|
1247
1223
|
"""
|
1248
1224
|
...
|
1249
1225
|
|
@@ -1296,223 +1272,220 @@ def pypi(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typ
|
|
1296
1272
|
"""
|
1297
1273
|
...
|
1298
1274
|
|
1299
|
-
|
1300
|
-
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]]]:
|
1275
|
+
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) -> 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]]]:
|
1301
1276
|
"""
|
1302
|
-
Specifies
|
1303
|
-
|
1304
|
-
This decorator is useful if this step may hang indefinitely.
|
1305
|
-
|
1306
|
-
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
1307
|
-
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
1308
|
-
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
1309
|
-
|
1310
|
-
Note that all the values specified in parameters are added together so if you specify
|
1311
|
-
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
1277
|
+
Specifies that this step should execute on Kubernetes.
|
1312
1278
|
|
1313
1279
|
Parameters
|
1314
1280
|
----------
|
1315
|
-
|
1316
|
-
Number of
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1281
|
+
cpu : int, default 1
|
1282
|
+
Number of CPUs required for this step. If `@resources` is
|
1283
|
+
also present, the maximum value from all decorators is used.
|
1284
|
+
memory : int, default 4096
|
1285
|
+
Memory size (in MB) required for this step. If
|
1286
|
+
`@resources` is also present, the maximum value from all decorators is
|
1287
|
+
used.
|
1288
|
+
disk : int, default 10240
|
1289
|
+
Disk size (in MB) required for this step. If
|
1290
|
+
`@resources` is also present, the maximum value from all decorators is
|
1291
|
+
used.
|
1292
|
+
image : str, optional, default None
|
1293
|
+
Docker image to use when launching on Kubernetes. If not specified, and
|
1294
|
+
METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
|
1295
|
+
not, a default Docker image mapping to the current version of Python is used.
|
1296
|
+
image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
|
1297
|
+
If given, the imagePullPolicy to be applied to the Docker image of the step.
|
1298
|
+
service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
|
1299
|
+
Kubernetes service account to use when launching pod in Kubernetes.
|
1300
|
+
secrets : List[str], optional, default None
|
1301
|
+
Kubernetes secrets to use when launching pod in Kubernetes. These
|
1302
|
+
secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
|
1303
|
+
in Metaflow configuration.
|
1304
|
+
namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
|
1305
|
+
Kubernetes namespace to use when launching pod in Kubernetes.
|
1306
|
+
gpu : int, optional, default None
|
1307
|
+
Number of GPUs required for this step. A value of zero implies that
|
1308
|
+
the scheduled node should not have GPUs.
|
1309
|
+
gpu_vendor : str, default KUBERNETES_GPU_VENDOR
|
1310
|
+
The vendor of the GPUs to be used for this step.
|
1311
|
+
tolerations : List[str], default []
|
1312
|
+
The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
|
1313
|
+
Kubernetes tolerations to use when launching pod in Kubernetes.
|
1314
|
+
use_tmpfs : bool, default False
|
1315
|
+
This enables an explicit tmpfs mount for this step.
|
1316
|
+
tmpfs_tempdir : bool, default True
|
1317
|
+
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
1318
|
+
tmpfs_size : int, optional, default: None
|
1319
|
+
The value for the size (in MiB) of the tmpfs mount for this step.
|
1320
|
+
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
1321
|
+
memory allocated for this step.
|
1322
|
+
tmpfs_path : str, optional, default /metaflow_temp
|
1323
|
+
Path to tmpfs mount for this step.
|
1324
|
+
persistent_volume_claims : Dict[str, str], optional, default None
|
1325
|
+
A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
|
1326
|
+
volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
|
1327
|
+
shared_memory: int, optional
|
1328
|
+
Shared memory size (in MiB) required for this step
|
1321
1329
|
"""
|
1322
1330
|
...
|
1323
1331
|
|
1324
1332
|
@typing.overload
|
1325
|
-
def
|
1326
|
-
...
|
1327
|
-
|
1328
|
-
@typing.overload
|
1329
|
-
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1330
|
-
...
|
1331
|
-
|
1332
|
-
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):
|
1333
|
+
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]]]:
|
1333
1334
|
"""
|
1334
|
-
Specifies
|
1335
|
-
|
1336
|
-
This decorator is useful if this step may hang indefinitely.
|
1337
|
-
|
1338
|
-
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
1339
|
-
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
1340
|
-
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
1341
|
-
|
1342
|
-
Note that all the values specified in parameters are added together so if you specify
|
1343
|
-
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
1335
|
+
Specifies the Conda environment for the step.
|
1344
1336
|
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
minutes : int, default 0
|
1350
|
-
Number of minutes to wait prior to timing out.
|
1351
|
-
hours : int, default 0
|
1352
|
-
Number of hours to wait prior to timing out.
|
1353
|
-
"""
|
1354
|
-
...
|
1355
|
-
|
1356
|
-
@typing.overload
|
1357
|
-
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]]]:
|
1358
|
-
"""
|
1359
|
-
Specifies secrets to be retrieved and injected as environment variables prior to
|
1360
|
-
the execution of a step.
|
1337
|
+
Information in this decorator will augment any
|
1338
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
1339
|
+
you can use `@conda_base` to set packages required by all
|
1340
|
+
steps and use `@conda` to specify step-specific overrides.
|
1361
1341
|
|
1362
1342
|
Parameters
|
1363
1343
|
----------
|
1364
|
-
|
1365
|
-
|
1344
|
+
packages : Dict[str, str], default {}
|
1345
|
+
Packages to use for this step. The key is the name of the package
|
1346
|
+
and the value is the version to use.
|
1347
|
+
libraries : Dict[str, str], default {}
|
1348
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1349
|
+
python : str, optional, default None
|
1350
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1351
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1352
|
+
disabled : bool, default False
|
1353
|
+
If set to True, disables @conda.
|
1366
1354
|
"""
|
1367
1355
|
...
|
1368
1356
|
|
1369
1357
|
@typing.overload
|
1370
|
-
def
|
1358
|
+
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1371
1359
|
...
|
1372
1360
|
|
1373
1361
|
@typing.overload
|
1374
|
-
def
|
1362
|
+
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1375
1363
|
...
|
1376
1364
|
|
1377
|
-
def
|
1365
|
+
def conda(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
|
1378
1366
|
"""
|
1379
|
-
Specifies
|
1380
|
-
the execution of a step.
|
1367
|
+
Specifies the Conda environment for the step.
|
1381
1368
|
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
"""
|
1387
|
-
...
|
1388
|
-
|
1389
|
-
@typing.overload
|
1390
|
-
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1391
|
-
"""
|
1392
|
-
Specifies the PyPI packages for all steps of the flow.
|
1369
|
+
Information in this decorator will augment any
|
1370
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
1371
|
+
you can use `@conda_base` to set packages required by all
|
1372
|
+
steps and use `@conda` to specify step-specific overrides.
|
1393
1373
|
|
1394
|
-
Use `@pypi_base` to set common packages required by all
|
1395
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1396
1374
|
Parameters
|
1397
1375
|
----------
|
1398
|
-
packages : Dict[str, str], default
|
1399
|
-
Packages to use for this
|
1376
|
+
packages : Dict[str, str], default {}
|
1377
|
+
Packages to use for this step. The key is the name of the package
|
1400
1378
|
and the value is the version to use.
|
1401
|
-
|
1379
|
+
libraries : Dict[str, str], default {}
|
1380
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1381
|
+
python : str, optional, default None
|
1402
1382
|
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1403
1383
|
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1384
|
+
disabled : bool, default False
|
1385
|
+
If set to True, disables @conda.
|
1404
1386
|
"""
|
1405
1387
|
...
|
1406
1388
|
|
1407
1389
|
@typing.overload
|
1408
|
-
def
|
1409
|
-
...
|
1410
|
-
|
1411
|
-
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
1390
|
+
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]]:
|
1412
1391
|
"""
|
1413
|
-
Specifies the
|
1392
|
+
Specifies the flow(s) that this flow depends on.
|
1414
1393
|
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
@
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1394
|
+
```
|
1395
|
+
@trigger_on_finish(flow='FooFlow')
|
1396
|
+
```
|
1397
|
+
or
|
1398
|
+
```
|
1399
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1400
|
+
```
|
1401
|
+
This decorator respects the @project decorator and triggers the flow
|
1402
|
+
when upstream runs within the same namespace complete successfully
|
1403
|
+
|
1404
|
+
Additionally, you can specify project aware upstream flow dependencies
|
1405
|
+
by specifying the fully qualified project_flow_name.
|
1406
|
+
```
|
1407
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1408
|
+
```
|
1409
|
+
or
|
1410
|
+
```
|
1411
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1412
|
+
```
|
1413
|
+
|
1414
|
+
You can also specify just the project or project branch (other values will be
|
1415
|
+
inferred from the current project or project branch):
|
1416
|
+
```
|
1417
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1418
|
+
```
|
1419
|
+
|
1420
|
+
Note that `branch` is typically one of:
|
1421
|
+
- `prod`
|
1422
|
+
- `user.bob`
|
1423
|
+
- `test.my_experiment`
|
1424
|
+
- `prod.staging`
|
1433
1425
|
|
1434
1426
|
Parameters
|
1435
1427
|
----------
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
specified by this expression.
|
1445
|
-
timezone : str, optional, default None
|
1446
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1447
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1428
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
1429
|
+
Upstream flow dependency for this flow.
|
1430
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
1431
|
+
Upstream flow dependencies for this flow.
|
1432
|
+
options : Dict[str, Any], default {}
|
1433
|
+
Backend-specific configuration for tuning eventing behavior.
|
1434
|
+
|
1435
|
+
|
1448
1436
|
"""
|
1449
1437
|
...
|
1450
1438
|
|
1451
1439
|
@typing.overload
|
1452
|
-
def
|
1440
|
+
def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1453
1441
|
...
|
1454
1442
|
|
1455
|
-
def
|
1443
|
+
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] = {}):
|
1456
1444
|
"""
|
1457
|
-
Specifies the
|
1458
|
-
|
1445
|
+
Specifies the flow(s) that this flow depends on.
|
1446
|
+
|
1447
|
+
```
|
1448
|
+
@trigger_on_finish(flow='FooFlow')
|
1449
|
+
```
|
1450
|
+
or
|
1451
|
+
```
|
1452
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1453
|
+
```
|
1454
|
+
This decorator respects the @project decorator and triggers the flow
|
1455
|
+
when upstream runs within the same namespace complete successfully
|
1456
|
+
|
1457
|
+
Additionally, you can specify project aware upstream flow dependencies
|
1458
|
+
by specifying the fully qualified project_flow_name.
|
1459
|
+
```
|
1460
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1461
|
+
```
|
1462
|
+
or
|
1463
|
+
```
|
1464
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1465
|
+
```
|
1466
|
+
|
1467
|
+
You can also specify just the project or project branch (other values will be
|
1468
|
+
inferred from the current project or project branch):
|
1469
|
+
```
|
1470
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1471
|
+
```
|
1472
|
+
|
1473
|
+
Note that `branch` is typically one of:
|
1474
|
+
- `prod`
|
1475
|
+
- `user.bob`
|
1476
|
+
- `test.my_experiment`
|
1477
|
+
- `prod.staging`
|
1478
|
+
|
1479
|
+
Parameters
|
1480
|
+
----------
|
1481
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
1482
|
+
Upstream flow dependency for this flow.
|
1483
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
1484
|
+
Upstream flow dependencies for this flow.
|
1485
|
+
options : Dict[str, Any], default {}
|
1486
|
+
Backend-specific configuration for tuning eventing behavior.
|
1459
1487
|
|
1460
|
-
Parameters
|
1461
|
-
----------
|
1462
|
-
hourly : bool, default False
|
1463
|
-
Run the workflow hourly.
|
1464
|
-
daily : bool, default True
|
1465
|
-
Run the workflow daily.
|
1466
|
-
weekly : bool, default False
|
1467
|
-
Run the workflow weekly.
|
1468
|
-
cron : str, optional, default None
|
1469
|
-
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1470
|
-
specified by this expression.
|
1471
|
-
timezone : str, optional, default None
|
1472
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1473
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1474
|
-
"""
|
1475
|
-
...
|
1476
|
-
|
1477
|
-
def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, external_dag_id: str, external_task_ids: typing.List[str], allowed_states: typing.List[str], failed_states: typing.List[str], execution_delta: "datetime.timedelta", check_existence: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1478
|
-
"""
|
1479
|
-
The `@airflow_external_task_sensor` decorator attaches a Airflow [ExternalTaskSensor](https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/sensors/external_task/index.html#airflow.sensors.external_task.ExternalTaskSensor) before the start step of the flow.
|
1480
|
-
This decorator only works when a flow is scheduled on Airflow and is compiled using `airflow create`. More than one `@airflow_external_task_sensor` can be added as a flow decorators. Adding more than one decorator will ensure that `start` step starts only after all sensors finish.
|
1481
1488
|
|
1482
|
-
Parameters
|
1483
|
-
----------
|
1484
|
-
timeout : int
|
1485
|
-
Time, in seconds before the task times out and fails. (Default: 3600)
|
1486
|
-
poke_interval : int
|
1487
|
-
Time in seconds that the job should wait in between each try. (Default: 60)
|
1488
|
-
mode : str
|
1489
|
-
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1490
|
-
exponential_backoff : bool
|
1491
|
-
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1492
|
-
pool : str
|
1493
|
-
the slot pool this task should run in,
|
1494
|
-
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1495
|
-
soft_fail : bool
|
1496
|
-
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1497
|
-
name : str
|
1498
|
-
Name of the sensor on Airflow
|
1499
|
-
description : str
|
1500
|
-
Description of sensor in the Airflow UI
|
1501
|
-
external_dag_id : str
|
1502
|
-
The dag_id that contains the task you want to wait for.
|
1503
|
-
external_task_ids : List[str]
|
1504
|
-
The list of task_ids that you want to wait for.
|
1505
|
-
If None (default value) the sensor waits for the DAG. (Default: None)
|
1506
|
-
allowed_states : List[str]
|
1507
|
-
Iterable of allowed states, (Default: ['success'])
|
1508
|
-
failed_states : List[str]
|
1509
|
-
Iterable of failed or dis-allowed states. (Default: None)
|
1510
|
-
execution_delta : datetime.timedelta
|
1511
|
-
time difference with the previous execution to look at,
|
1512
|
-
the default is the same logical date as the current task or DAG. (Default: None)
|
1513
|
-
check_existence: bool
|
1514
|
-
Set to True to check if the external task exists or check if
|
1515
|
-
the DAG to wait for exists. (Default: True)
|
1516
1489
|
"""
|
1517
1490
|
...
|
1518
1491
|
|
@@ -1611,6 +1584,94 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
1611
1584
|
"""
|
1612
1585
|
...
|
1613
1586
|
|
1587
|
+
@typing.overload
|
1588
|
+
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1589
|
+
"""
|
1590
|
+
Specifies the PyPI packages for all steps of the flow.
|
1591
|
+
|
1592
|
+
Use `@pypi_base` to set common packages required by all
|
1593
|
+
steps and use `@pypi` to specify step-specific overrides.
|
1594
|
+
Parameters
|
1595
|
+
----------
|
1596
|
+
packages : Dict[str, str], default: {}
|
1597
|
+
Packages to use for this flow. The key is the name of the package
|
1598
|
+
and the value is the version to use.
|
1599
|
+
python : str, optional, default: None
|
1600
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1601
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1602
|
+
"""
|
1603
|
+
...
|
1604
|
+
|
1605
|
+
@typing.overload
|
1606
|
+
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1607
|
+
...
|
1608
|
+
|
1609
|
+
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
1610
|
+
"""
|
1611
|
+
Specifies the PyPI packages for all steps of the flow.
|
1612
|
+
|
1613
|
+
Use `@pypi_base` to set common packages required by all
|
1614
|
+
steps and use `@pypi` to specify step-specific overrides.
|
1615
|
+
Parameters
|
1616
|
+
----------
|
1617
|
+
packages : Dict[str, str], default: {}
|
1618
|
+
Packages to use for this flow. The key is the name of the package
|
1619
|
+
and the value is the version to use.
|
1620
|
+
python : str, optional, default: None
|
1621
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1622
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1623
|
+
"""
|
1624
|
+
...
|
1625
|
+
|
1626
|
+
@typing.overload
|
1627
|
+
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]]:
|
1628
|
+
"""
|
1629
|
+
Specifies the times when the flow should be run when running on a
|
1630
|
+
production scheduler.
|
1631
|
+
|
1632
|
+
Parameters
|
1633
|
+
----------
|
1634
|
+
hourly : bool, default False
|
1635
|
+
Run the workflow hourly.
|
1636
|
+
daily : bool, default True
|
1637
|
+
Run the workflow daily.
|
1638
|
+
weekly : bool, default False
|
1639
|
+
Run the workflow weekly.
|
1640
|
+
cron : str, optional, default None
|
1641
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1642
|
+
specified by this expression.
|
1643
|
+
timezone : str, optional, default None
|
1644
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1645
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1646
|
+
"""
|
1647
|
+
...
|
1648
|
+
|
1649
|
+
@typing.overload
|
1650
|
+
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1651
|
+
...
|
1652
|
+
|
1653
|
+
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):
|
1654
|
+
"""
|
1655
|
+
Specifies the times when the flow should be run when running on a
|
1656
|
+
production scheduler.
|
1657
|
+
|
1658
|
+
Parameters
|
1659
|
+
----------
|
1660
|
+
hourly : bool, default False
|
1661
|
+
Run the workflow hourly.
|
1662
|
+
daily : bool, default True
|
1663
|
+
Run the workflow daily.
|
1664
|
+
weekly : bool, default False
|
1665
|
+
Run the workflow weekly.
|
1666
|
+
cron : str, optional, default None
|
1667
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1668
|
+
specified by this expression.
|
1669
|
+
timezone : str, optional, default None
|
1670
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1671
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1672
|
+
"""
|
1673
|
+
...
|
1674
|
+
|
1614
1675
|
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]]:
|
1615
1676
|
"""
|
1616
1677
|
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)
|
@@ -1653,21 +1714,45 @@ def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, expone
|
|
1653
1714
|
"""
|
1654
1715
|
...
|
1655
1716
|
|
1656
|
-
def
|
1717
|
+
def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, external_dag_id: str, external_task_ids: typing.List[str], allowed_states: typing.List[str], failed_states: typing.List[str], execution_delta: "datetime.timedelta", check_existence: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1657
1718
|
"""
|
1658
|
-
|
1659
|
-
|
1660
|
-
A project-specific namespace is created for all flows that
|
1661
|
-
use the same `@project(name)`.
|
1719
|
+
The `@airflow_external_task_sensor` decorator attaches a Airflow [ExternalTaskSensor](https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/sensors/external_task/index.html#airflow.sensors.external_task.ExternalTaskSensor) before the start step of the flow.
|
1720
|
+
This decorator only works when a flow is scheduled on Airflow and is compiled using `airflow create`. More than one `@airflow_external_task_sensor` can be added as a flow decorators. Adding more than one decorator will ensure that `start` step starts only after all sensors finish.
|
1662
1721
|
|
1663
1722
|
Parameters
|
1664
1723
|
----------
|
1724
|
+
timeout : int
|
1725
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
1726
|
+
poke_interval : int
|
1727
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
1728
|
+
mode : str
|
1729
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1730
|
+
exponential_backoff : bool
|
1731
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1732
|
+
pool : str
|
1733
|
+
the slot pool this task should run in,
|
1734
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1735
|
+
soft_fail : bool
|
1736
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1665
1737
|
name : str
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1738
|
+
Name of the sensor on Airflow
|
1739
|
+
description : str
|
1740
|
+
Description of sensor in the Airflow UI
|
1741
|
+
external_dag_id : str
|
1742
|
+
The dag_id that contains the task you want to wait for.
|
1743
|
+
external_task_ids : List[str]
|
1744
|
+
The list of task_ids that you want to wait for.
|
1745
|
+
If None (default value) the sensor waits for the DAG. (Default: None)
|
1746
|
+
allowed_states : List[str]
|
1747
|
+
Iterable of allowed states, (Default: ['success'])
|
1748
|
+
failed_states : List[str]
|
1749
|
+
Iterable of failed or dis-allowed states. (Default: None)
|
1750
|
+
execution_delta : datetime.timedelta
|
1751
|
+
time difference with the previous execution to look at,
|
1752
|
+
the default is the same logical date as the current task or DAG. (Default: None)
|
1753
|
+
check_existence: bool
|
1754
|
+
Set to True to check if the external task exists or check if
|
1755
|
+
the DAG to wait for exists. (Default: True)
|
1671
1756
|
"""
|
1672
1757
|
...
|
1673
1758
|
|
@@ -1720,104 +1805,19 @@ def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packa
|
|
1720
1805
|
"""
|
1721
1806
|
...
|
1722
1807
|
|
1723
|
-
|
1724
|
-
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]]:
|
1725
|
-
"""
|
1726
|
-
Specifies the flow(s) that this flow depends on.
|
1727
|
-
|
1728
|
-
```
|
1729
|
-
@trigger_on_finish(flow='FooFlow')
|
1730
|
-
```
|
1731
|
-
or
|
1732
|
-
```
|
1733
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1734
|
-
```
|
1735
|
-
This decorator respects the @project decorator and triggers the flow
|
1736
|
-
when upstream runs within the same namespace complete successfully
|
1737
|
-
|
1738
|
-
Additionally, you can specify project aware upstream flow dependencies
|
1739
|
-
by specifying the fully qualified project_flow_name.
|
1740
|
-
```
|
1741
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1742
|
-
```
|
1743
|
-
or
|
1744
|
-
```
|
1745
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1746
|
-
```
|
1747
|
-
|
1748
|
-
You can also specify just the project or project branch (other values will be
|
1749
|
-
inferred from the current project or project branch):
|
1750
|
-
```
|
1751
|
-
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1752
|
-
```
|
1753
|
-
|
1754
|
-
Note that `branch` is typically one of:
|
1755
|
-
- `prod`
|
1756
|
-
- `user.bob`
|
1757
|
-
- `test.my_experiment`
|
1758
|
-
- `prod.staging`
|
1759
|
-
|
1760
|
-
Parameters
|
1761
|
-
----------
|
1762
|
-
flow : Union[str, Dict[str, str]], optional, default None
|
1763
|
-
Upstream flow dependency for this flow.
|
1764
|
-
flows : List[Union[str, Dict[str, str]]], default []
|
1765
|
-
Upstream flow dependencies for this flow.
|
1766
|
-
options : Dict[str, Any], default {}
|
1767
|
-
Backend-specific configuration for tuning eventing behavior.
|
1768
|
-
|
1769
|
-
|
1770
|
-
"""
|
1771
|
-
...
|
1772
|
-
|
1773
|
-
@typing.overload
|
1774
|
-
def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1775
|
-
...
|
1776
|
-
|
1777
|
-
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] = {}):
|
1808
|
+
def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1778
1809
|
"""
|
1779
|
-
Specifies
|
1780
|
-
|
1781
|
-
```
|
1782
|
-
@trigger_on_finish(flow='FooFlow')
|
1783
|
-
```
|
1784
|
-
or
|
1785
|
-
```
|
1786
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1787
|
-
```
|
1788
|
-
This decorator respects the @project decorator and triggers the flow
|
1789
|
-
when upstream runs within the same namespace complete successfully
|
1790
|
-
|
1791
|
-
Additionally, you can specify project aware upstream flow dependencies
|
1792
|
-
by specifying the fully qualified project_flow_name.
|
1793
|
-
```
|
1794
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1795
|
-
```
|
1796
|
-
or
|
1797
|
-
```
|
1798
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1799
|
-
```
|
1800
|
-
|
1801
|
-
You can also specify just the project or project branch (other values will be
|
1802
|
-
inferred from the current project or project branch):
|
1803
|
-
```
|
1804
|
-
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1805
|
-
```
|
1810
|
+
Specifies what flows belong to the same project.
|
1806
1811
|
|
1807
|
-
|
1808
|
-
|
1809
|
-
- `user.bob`
|
1810
|
-
- `test.my_experiment`
|
1811
|
-
- `prod.staging`
|
1812
|
+
A project-specific namespace is created for all flows that
|
1813
|
+
use the same `@project(name)`.
|
1812
1814
|
|
1813
1815
|
Parameters
|
1814
1816
|
----------
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
options : Dict[str, Any], default {}
|
1820
|
-
Backend-specific configuration for tuning eventing behavior.
|
1817
|
+
name : str
|
1818
|
+
Project name. Make sure that the name is unique amongst all
|
1819
|
+
projects that use the same production scheduler. The name may
|
1820
|
+
contain only lowercase alphanumeric characters and underscores.
|
1821
1821
|
|
1822
1822
|
|
1823
1823
|
"""
|