ob-metaflow-stubs 3.8__py2.py3-none-any.whl → 4.0__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 +462 -461
- metaflow-stubs/cards.pyi +10 -4
- metaflow-stubs/cli.pyi +2 -22
- metaflow-stubs/client/__init__.pyi +4 -4
- metaflow-stubs/client/core.pyi +7 -7
- metaflow-stubs/client/filecache.pyi +2 -2
- metaflow-stubs/clone_util.pyi +2 -2
- metaflow-stubs/events.pyi +3 -3
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +6 -5
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +4 -4
- metaflow-stubs/metadata/metadata.pyi +2 -2
- metaflow-stubs/metadata/util.pyi +2 -2
- metaflow-stubs/metaflow_config.pyi +4 -4
- 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 +9 -3
- metaflow-stubs/plugins/__init__.pyi +8 -2
- metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow.pyi +2 -2
- 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 +4 -4
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +3 -3
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +4 -4
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +4 -4
- 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 +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +3 -3
- 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 +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 +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_cli.pyi +3 -3
- 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_credential.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.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 +2 -2
- 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 +8 -2
- 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 +2 -2
- metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
- metaflow-stubs/plugins/cards/component_serializer.pyi +3 -3
- metaflow-stubs/plugins/cards/exception.pyi +2 -2
- metaflow-stubs/plugins/catch_decorator.pyi +2 -2
- metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/local.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +4 -4
- metaflow-stubs/plugins/datatools/s3/s3.pyi +6 -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 +3 -3
- metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
- metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.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_jobsets.pyi +2 -2
- metaflow-stubs/plugins/logs_cli.pyi +3 -3
- metaflow-stubs/plugins/package_cli.pyi +2 -2
- metaflow-stubs/plugins/parallel_decorator.pyi +2 -2
- metaflow-stubs/plugins/perimeters.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 +5 -5
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +4 -4
- 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 +3 -3
- metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
- metaflow-stubs/procpoll.pyi +2 -2
- metaflow-stubs/profilers/__init__.pyi +2 -2
- metaflow-stubs/pylint_wrapper.pyi +2 -2
- metaflow-stubs/runner/__init__.pyi +2 -2
- metaflow-stubs/runner/metaflow_runner.pyi +5 -5
- metaflow-stubs/runner/nbrun.pyi +2 -2
- metaflow-stubs/runner/subprocess_manager.pyi +2 -2
- metaflow-stubs/tagging_util.pyi +2 -2
- metaflow-stubs/tuple_util.pyi +2 -2
- {ob_metaflow_stubs-3.8.dist-info → ob_metaflow_stubs-4.0.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-4.0.dist-info/RECORD +142 -0
- ob_metaflow_stubs-3.8.dist-info/RECORD +0 -142
- {ob_metaflow_stubs-3.8.dist-info → ob_metaflow_stubs-4.0.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-3.8.dist-info → ob_metaflow_stubs-4.0.dist-info}/top_level.txt +0 -0
metaflow-stubs/__init__.pyi
CHANGED
@@ -1,24 +1,25 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.
|
4
|
-
# Generated on 2024-
|
3
|
+
# MF version: 2.12.5.2+ob(v1) #
|
4
|
+
# Generated on 2024-06-24T23:02:43.033000 #
|
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._vendor.click.types
|
12
|
-
import metaflow.parameters
|
13
11
|
import io
|
14
|
-
import metaflow.datastore.inputs
|
15
|
-
import metaflow.runner.metaflow_runner
|
16
|
-
import metaflow.events
|
17
12
|
import metaflow.client.core
|
18
|
-
import
|
13
|
+
import metaflow.parameters
|
14
|
+
import metaflow.metaflow_current
|
15
|
+
import metaflow.flowspec
|
16
|
+
import metaflow.runner.metaflow_runner
|
19
17
|
import typing
|
18
|
+
import datetime
|
20
19
|
import metaflow.plugins.datatools.s3.s3
|
21
|
-
import metaflow.
|
20
|
+
import metaflow.datastore.inputs
|
21
|
+
import metaflow.events
|
22
|
+
import metaflow._vendor.click.types
|
22
23
|
FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
|
23
24
|
StepFlag = typing.NewType("StepFlag", bool)
|
24
25
|
|
@@ -105,7 +106,7 @@ def metadata(ms: str) -> str:
|
|
105
106
|
"""
|
106
107
|
...
|
107
108
|
|
108
|
-
class FlowSpec(object, metaclass=
|
109
|
+
class FlowSpec(object, metaclass=metaflow.flowspec._FlowSpecMeta):
|
109
110
|
def __init__(self, use_cli = True):
|
110
111
|
"""
|
111
112
|
Construct a FlowSpec
|
@@ -726,6 +727,212 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
726
727
|
"""
|
727
728
|
...
|
728
729
|
|
730
|
+
@typing.overload
|
731
|
+
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]]]:
|
732
|
+
"""
|
733
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
734
|
+
|
735
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
736
|
+
|
737
|
+
Parameters
|
738
|
+
----------
|
739
|
+
type : str, default 'default'
|
740
|
+
Card type.
|
741
|
+
id : str, optional, default None
|
742
|
+
If multiple cards are present, use this id to identify this card.
|
743
|
+
options : Dict[str, Any], default {}
|
744
|
+
Options passed to the card. The contents depend on the card type.
|
745
|
+
timeout : int, default 45
|
746
|
+
Interrupt reporting if it takes more than this many seconds.
|
747
|
+
|
748
|
+
|
749
|
+
"""
|
750
|
+
...
|
751
|
+
|
752
|
+
@typing.overload
|
753
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
754
|
+
...
|
755
|
+
|
756
|
+
@typing.overload
|
757
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
758
|
+
...
|
759
|
+
|
760
|
+
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):
|
761
|
+
"""
|
762
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
763
|
+
|
764
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
765
|
+
|
766
|
+
Parameters
|
767
|
+
----------
|
768
|
+
type : str, default 'default'
|
769
|
+
Card type.
|
770
|
+
id : str, optional, default None
|
771
|
+
If multiple cards are present, use this id to identify this card.
|
772
|
+
options : Dict[str, Any], default {}
|
773
|
+
Options passed to the card. The contents depend on the card type.
|
774
|
+
timeout : int, default 45
|
775
|
+
Interrupt reporting if it takes more than this many seconds.
|
776
|
+
|
777
|
+
|
778
|
+
"""
|
779
|
+
...
|
780
|
+
|
781
|
+
@typing.overload
|
782
|
+
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]]]:
|
783
|
+
"""
|
784
|
+
Specifies the PyPI packages for the step.
|
785
|
+
|
786
|
+
Information in this decorator will augment any
|
787
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
788
|
+
you can use `@pypi_base` to set packages required by all
|
789
|
+
steps and use `@pypi` to specify step-specific overrides.
|
790
|
+
|
791
|
+
Parameters
|
792
|
+
----------
|
793
|
+
packages : Dict[str, str], default: {}
|
794
|
+
Packages to use for this step. The key is the name of the package
|
795
|
+
and the value is the version to use.
|
796
|
+
python : str, optional, default: None
|
797
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
798
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
799
|
+
"""
|
800
|
+
...
|
801
|
+
|
802
|
+
@typing.overload
|
803
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
804
|
+
...
|
805
|
+
|
806
|
+
@typing.overload
|
807
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
808
|
+
...
|
809
|
+
|
810
|
+
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):
|
811
|
+
"""
|
812
|
+
Specifies the PyPI packages for the step.
|
813
|
+
|
814
|
+
Information in this decorator will augment any
|
815
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
816
|
+
you can use `@pypi_base` to set packages required by all
|
817
|
+
steps and use `@pypi` to specify step-specific overrides.
|
818
|
+
|
819
|
+
Parameters
|
820
|
+
----------
|
821
|
+
packages : Dict[str, str], default: {}
|
822
|
+
Packages to use for this step. The key is the name of the package
|
823
|
+
and the value is the version to use.
|
824
|
+
python : str, optional, default: None
|
825
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
826
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
827
|
+
"""
|
828
|
+
...
|
829
|
+
|
830
|
+
@typing.overload
|
831
|
+
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]]]:
|
832
|
+
"""
|
833
|
+
Specifies a timeout for your step.
|
834
|
+
|
835
|
+
This decorator is useful if this step may hang indefinitely.
|
836
|
+
|
837
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
838
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
839
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
840
|
+
|
841
|
+
Note that all the values specified in parameters are added together so if you specify
|
842
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
843
|
+
|
844
|
+
Parameters
|
845
|
+
----------
|
846
|
+
seconds : int, default 0
|
847
|
+
Number of seconds to wait prior to timing out.
|
848
|
+
minutes : int, default 0
|
849
|
+
Number of minutes to wait prior to timing out.
|
850
|
+
hours : int, default 0
|
851
|
+
Number of hours to wait prior to timing out.
|
852
|
+
"""
|
853
|
+
...
|
854
|
+
|
855
|
+
@typing.overload
|
856
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
857
|
+
...
|
858
|
+
|
859
|
+
@typing.overload
|
860
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
861
|
+
...
|
862
|
+
|
863
|
+
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):
|
864
|
+
"""
|
865
|
+
Specifies a timeout for your step.
|
866
|
+
|
867
|
+
This decorator is useful if this step may hang indefinitely.
|
868
|
+
|
869
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
870
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
871
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
872
|
+
|
873
|
+
Note that all the values specified in parameters are added together so if you specify
|
874
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
875
|
+
|
876
|
+
Parameters
|
877
|
+
----------
|
878
|
+
seconds : int, default 0
|
879
|
+
Number of seconds to wait prior to timing out.
|
880
|
+
minutes : int, default 0
|
881
|
+
Number of minutes to wait prior to timing out.
|
882
|
+
hours : int, default 0
|
883
|
+
Number of hours to wait prior to timing out.
|
884
|
+
"""
|
885
|
+
...
|
886
|
+
|
887
|
+
@typing.overload
|
888
|
+
def catch(*, var: typing.Optional[str] = None, print_exception: bool = True) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
889
|
+
"""
|
890
|
+
Specifies that the step will success under all circumstances.
|
891
|
+
|
892
|
+
The decorator will create an optional artifact, specified by `var`, which
|
893
|
+
contains the exception raised. You can use it to detect the presence
|
894
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
895
|
+
are missing.
|
896
|
+
|
897
|
+
Parameters
|
898
|
+
----------
|
899
|
+
var : str, optional, default None
|
900
|
+
Name of the artifact in which to store the caught exception.
|
901
|
+
If not specified, the exception is not stored.
|
902
|
+
print_exception : bool, default True
|
903
|
+
Determines whether or not the exception is printed to
|
904
|
+
stdout when caught.
|
905
|
+
"""
|
906
|
+
...
|
907
|
+
|
908
|
+
@typing.overload
|
909
|
+
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
910
|
+
...
|
911
|
+
|
912
|
+
@typing.overload
|
913
|
+
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
914
|
+
...
|
915
|
+
|
916
|
+
def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, var: typing.Optional[str] = None, print_exception: bool = True):
|
917
|
+
"""
|
918
|
+
Specifies that the step will success under all circumstances.
|
919
|
+
|
920
|
+
The decorator will create an optional artifact, specified by `var`, which
|
921
|
+
contains the exception raised. You can use it to detect the presence
|
922
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
923
|
+
are missing.
|
924
|
+
|
925
|
+
Parameters
|
926
|
+
----------
|
927
|
+
var : str, optional, default None
|
928
|
+
Name of the artifact in which to store the caught exception.
|
929
|
+
If not specified, the exception is not stored.
|
930
|
+
print_exception : bool, default True
|
931
|
+
Determines whether or not the exception is printed to
|
932
|
+
stdout when caught.
|
933
|
+
"""
|
934
|
+
...
|
935
|
+
|
729
936
|
@typing.overload
|
730
937
|
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]]]:
|
731
938
|
"""
|
@@ -873,6 +1080,37 @@ def batch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
873
1080
|
"""
|
874
1081
|
...
|
875
1082
|
|
1083
|
+
@typing.overload
|
1084
|
+
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]]]:
|
1085
|
+
"""
|
1086
|
+
Specifies environment variables to be set prior to the execution of a step.
|
1087
|
+
|
1088
|
+
Parameters
|
1089
|
+
----------
|
1090
|
+
vars : Dict[str, str], default {}
|
1091
|
+
Dictionary of environment variables to set.
|
1092
|
+
"""
|
1093
|
+
...
|
1094
|
+
|
1095
|
+
@typing.overload
|
1096
|
+
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1097
|
+
...
|
1098
|
+
|
1099
|
+
@typing.overload
|
1100
|
+
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1101
|
+
...
|
1102
|
+
|
1103
|
+
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
1104
|
+
"""
|
1105
|
+
Specifies environment variables to be set prior to the execution of a step.
|
1106
|
+
|
1107
|
+
Parameters
|
1108
|
+
----------
|
1109
|
+
vars : Dict[str, str], default {}
|
1110
|
+
Dictionary of environment variables to set.
|
1111
|
+
"""
|
1112
|
+
...
|
1113
|
+
|
876
1114
|
@typing.overload
|
877
1115
|
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]]]:
|
878
1116
|
"""
|
@@ -926,60 +1164,62 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
926
1164
|
"""
|
927
1165
|
...
|
928
1166
|
|
929
|
-
|
930
|
-
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]]]:
|
1167
|
+
def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: typing.Optional[str] = None, image_pull_policy: str = "KUBERNETES_IMAGE_PULL_POLICY", service_account: str = "METAFLOW_KUBERNETES_SERVICE_ACCOUNT", secrets: typing.Optional[typing.List[str]] = None, namespace: str = "METAFLOW_KUBERNETES_NAMESPACE", gpu: typing.Optional[int] = None, gpu_vendor: str = "KUBERNETES_GPU_VENDOR", tolerations: typing.List[str] = [], use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = "/metaflow_temp", persistent_volume_claims: typing.Optional[typing.Dict[str, str]] = None, shared_memory: typing.Optional[int] = None, port: typing.Optional[int] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
931
1168
|
"""
|
932
|
-
Specifies
|
933
|
-
|
934
|
-
This decorator is useful if this step may hang indefinitely.
|
935
|
-
|
936
|
-
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
937
|
-
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
938
|
-
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
939
|
-
|
940
|
-
Note that all the values specified in parameters are added together so if you specify
|
941
|
-
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
1169
|
+
Specifies that this step should execute on Kubernetes.
|
942
1170
|
|
943
1171
|
Parameters
|
944
1172
|
----------
|
945
|
-
|
946
|
-
Number of
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
1173
|
+
cpu : int, default 1
|
1174
|
+
Number of CPUs required for this step. If `@resources` is
|
1175
|
+
also present, the maximum value from all decorators is used.
|
1176
|
+
memory : int, default 4096
|
1177
|
+
Memory size (in MB) required for this step. If
|
1178
|
+
`@resources` is also present, the maximum value from all decorators is
|
1179
|
+
used.
|
1180
|
+
disk : int, default 10240
|
1181
|
+
Disk size (in MB) required for this step. If
|
1182
|
+
`@resources` is also present, the maximum value from all decorators is
|
1183
|
+
used.
|
1184
|
+
image : str, optional, default None
|
1185
|
+
Docker image to use when launching on Kubernetes. If not specified, and
|
1186
|
+
METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
|
1187
|
+
not, a default Docker image mapping to the current version of Python is used.
|
1188
|
+
image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
|
1189
|
+
If given, the imagePullPolicy to be applied to the Docker image of the step.
|
1190
|
+
service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
|
1191
|
+
Kubernetes service account to use when launching pod in Kubernetes.
|
1192
|
+
secrets : List[str], optional, default None
|
1193
|
+
Kubernetes secrets to use when launching pod in Kubernetes. These
|
1194
|
+
secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
|
1195
|
+
in Metaflow configuration.
|
1196
|
+
namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
|
1197
|
+
Kubernetes namespace to use when launching pod in Kubernetes.
|
1198
|
+
gpu : int, optional, default None
|
1199
|
+
Number of GPUs required for this step. A value of zero implies that
|
1200
|
+
the scheduled node should not have GPUs.
|
1201
|
+
gpu_vendor : str, default KUBERNETES_GPU_VENDOR
|
1202
|
+
The vendor of the GPUs to be used for this step.
|
1203
|
+
tolerations : List[str], default []
|
1204
|
+
The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
|
1205
|
+
Kubernetes tolerations to use when launching pod in Kubernetes.
|
1206
|
+
use_tmpfs : bool, default False
|
1207
|
+
This enables an explicit tmpfs mount for this step.
|
1208
|
+
tmpfs_tempdir : bool, default True
|
1209
|
+
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
1210
|
+
tmpfs_size : int, optional, default: None
|
1211
|
+
The value for the size (in MiB) of the tmpfs mount for this step.
|
1212
|
+
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
1213
|
+
memory allocated for this step.
|
1214
|
+
tmpfs_path : str, optional, default /metaflow_temp
|
1215
|
+
Path to tmpfs mount for this step.
|
1216
|
+
persistent_volume_claims : Dict[str, str], optional, default None
|
1217
|
+
A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
|
1218
|
+
volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
|
1219
|
+
shared_memory: int, optional
|
1220
|
+
Shared memory size (in MiB) required for this step
|
1221
|
+
port: int, optional
|
1222
|
+
Port number to specify in the Kubernetes job object
|
983
1223
|
"""
|
984
1224
|
...
|
985
1225
|
|
@@ -1040,6 +1280,39 @@ def conda(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
1040
1280
|
"""
|
1041
1281
|
...
|
1042
1282
|
|
1283
|
+
@typing.overload
|
1284
|
+
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]]]:
|
1285
|
+
"""
|
1286
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
1287
|
+
the execution of a step.
|
1288
|
+
|
1289
|
+
Parameters
|
1290
|
+
----------
|
1291
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
1292
|
+
List of secret specs, defining how the secrets are to be retrieved
|
1293
|
+
"""
|
1294
|
+
...
|
1295
|
+
|
1296
|
+
@typing.overload
|
1297
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1298
|
+
...
|
1299
|
+
|
1300
|
+
@typing.overload
|
1301
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1302
|
+
...
|
1303
|
+
|
1304
|
+
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]]] = []):
|
1305
|
+
"""
|
1306
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
1307
|
+
the execution of a step.
|
1308
|
+
|
1309
|
+
Parameters
|
1310
|
+
----------
|
1311
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
1312
|
+
List of secret specs, defining how the secrets are to be retrieved
|
1313
|
+
"""
|
1314
|
+
...
|
1315
|
+
|
1043
1316
|
@typing.overload
|
1044
1317
|
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]]]:
|
1045
1318
|
"""
|
@@ -1118,211 +1391,16 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
|
|
1118
1391
|
...
|
1119
1392
|
|
1120
1393
|
@typing.overload
|
1121
|
-
def
|
1122
|
-
"""
|
1123
|
-
Specifies secrets to be retrieved and injected as environment variables prior to
|
1124
|
-
the execution of a step.
|
1125
|
-
|
1126
|
-
Parameters
|
1127
|
-
----------
|
1128
|
-
sources : List[Union[str, Dict[str, Any]]], default: []
|
1129
|
-
List of secret specs, defining how the secrets are to be retrieved
|
1130
|
-
"""
|
1131
|
-
...
|
1132
|
-
|
1133
|
-
@typing.overload
|
1134
|
-
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1135
|
-
...
|
1136
|
-
|
1137
|
-
@typing.overload
|
1138
|
-
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1139
|
-
...
|
1140
|
-
|
1141
|
-
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]]] = []):
|
1142
|
-
"""
|
1143
|
-
Specifies secrets to be retrieved and injected as environment variables prior to
|
1144
|
-
the execution of a step.
|
1145
|
-
|
1146
|
-
Parameters
|
1147
|
-
----------
|
1148
|
-
sources : List[Union[str, Dict[str, Any]]], default: []
|
1149
|
-
List of secret specs, defining how the secrets are to be retrieved
|
1150
|
-
"""
|
1151
|
-
...
|
1152
|
-
|
1153
|
-
@typing.overload
|
1154
|
-
def catch(*, var: typing.Optional[str] = None, print_exception: bool = True) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
1155
|
-
"""
|
1156
|
-
Specifies that the step will success under all circumstances.
|
1157
|
-
|
1158
|
-
The decorator will create an optional artifact, specified by `var`, which
|
1159
|
-
contains the exception raised. You can use it to detect the presence
|
1160
|
-
of errors, indicating that all happy-path artifacts produced by the step
|
1161
|
-
are missing.
|
1162
|
-
|
1163
|
-
Parameters
|
1164
|
-
----------
|
1165
|
-
var : str, optional, default None
|
1166
|
-
Name of the artifact in which to store the caught exception.
|
1167
|
-
If not specified, the exception is not stored.
|
1168
|
-
print_exception : bool, default True
|
1169
|
-
Determines whether or not the exception is printed to
|
1170
|
-
stdout when caught.
|
1171
|
-
"""
|
1172
|
-
...
|
1173
|
-
|
1174
|
-
@typing.overload
|
1175
|
-
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1176
|
-
...
|
1177
|
-
|
1178
|
-
@typing.overload
|
1179
|
-
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1180
|
-
...
|
1181
|
-
|
1182
|
-
def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, var: typing.Optional[str] = None, print_exception: bool = True):
|
1183
|
-
"""
|
1184
|
-
Specifies that the step will success under all circumstances.
|
1185
|
-
|
1186
|
-
The decorator will create an optional artifact, specified by `var`, which
|
1187
|
-
contains the exception raised. You can use it to detect the presence
|
1188
|
-
of errors, indicating that all happy-path artifacts produced by the step
|
1189
|
-
are missing.
|
1190
|
-
|
1191
|
-
Parameters
|
1192
|
-
----------
|
1193
|
-
var : str, optional, default None
|
1194
|
-
Name of the artifact in which to store the caught exception.
|
1195
|
-
If not specified, the exception is not stored.
|
1196
|
-
print_exception : bool, default True
|
1197
|
-
Determines whether or not the exception is printed to
|
1198
|
-
stdout when caught.
|
1199
|
-
"""
|
1200
|
-
...
|
1201
|
-
|
1202
|
-
def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: typing.Optional[str] = None, image_pull_policy: str = "KUBERNETES_IMAGE_PULL_POLICY", service_account: str = "METAFLOW_KUBERNETES_SERVICE_ACCOUNT", secrets: typing.Optional[typing.List[str]] = None, namespace: str = "METAFLOW_KUBERNETES_NAMESPACE", gpu: typing.Optional[int] = None, gpu_vendor: str = "KUBERNETES_GPU_VENDOR", tolerations: typing.List[str] = [], use_tmpfs: bool = False, tmpfs_tempdir: bool = True, tmpfs_size: typing.Optional[int] = None, tmpfs_path: typing.Optional[str] = "/metaflow_temp", persistent_volume_claims: typing.Optional[typing.Dict[str, str]] = None, shared_memory: typing.Optional[int] = None, port: typing.Optional[int] = None) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
1203
|
-
"""
|
1204
|
-
Specifies that this step should execute on Kubernetes.
|
1205
|
-
|
1206
|
-
Parameters
|
1207
|
-
----------
|
1208
|
-
cpu : int, default 1
|
1209
|
-
Number of CPUs required for this step. If `@resources` is
|
1210
|
-
also present, the maximum value from all decorators is used.
|
1211
|
-
memory : int, default 4096
|
1212
|
-
Memory size (in MB) required for this step. If
|
1213
|
-
`@resources` is also present, the maximum value from all decorators is
|
1214
|
-
used.
|
1215
|
-
disk : int, default 10240
|
1216
|
-
Disk size (in MB) required for this step. If
|
1217
|
-
`@resources` is also present, the maximum value from all decorators is
|
1218
|
-
used.
|
1219
|
-
image : str, optional, default None
|
1220
|
-
Docker image to use when launching on Kubernetes. If not specified, and
|
1221
|
-
METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
|
1222
|
-
not, a default Docker image mapping to the current version of Python is used.
|
1223
|
-
image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
|
1224
|
-
If given, the imagePullPolicy to be applied to the Docker image of the step.
|
1225
|
-
service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
|
1226
|
-
Kubernetes service account to use when launching pod in Kubernetes.
|
1227
|
-
secrets : List[str], optional, default None
|
1228
|
-
Kubernetes secrets to use when launching pod in Kubernetes. These
|
1229
|
-
secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
|
1230
|
-
in Metaflow configuration.
|
1231
|
-
namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
|
1232
|
-
Kubernetes namespace to use when launching pod in Kubernetes.
|
1233
|
-
gpu : int, optional, default None
|
1234
|
-
Number of GPUs required for this step. A value of zero implies that
|
1235
|
-
the scheduled node should not have GPUs.
|
1236
|
-
gpu_vendor : str, default KUBERNETES_GPU_VENDOR
|
1237
|
-
The vendor of the GPUs to be used for this step.
|
1238
|
-
tolerations : List[str], default []
|
1239
|
-
The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
|
1240
|
-
Kubernetes tolerations to use when launching pod in Kubernetes.
|
1241
|
-
use_tmpfs : bool, default False
|
1242
|
-
This enables an explicit tmpfs mount for this step.
|
1243
|
-
tmpfs_tempdir : bool, default True
|
1244
|
-
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
1245
|
-
tmpfs_size : int, optional, default: None
|
1246
|
-
The value for the size (in MiB) of the tmpfs mount for this step.
|
1247
|
-
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
1248
|
-
memory allocated for this step.
|
1249
|
-
tmpfs_path : str, optional, default /metaflow_temp
|
1250
|
-
Path to tmpfs mount for this step.
|
1251
|
-
persistent_volume_claims : Dict[str, str], optional, default None
|
1252
|
-
A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
|
1253
|
-
volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
|
1254
|
-
shared_memory: int, optional
|
1255
|
-
Shared memory size (in MiB) required for this step
|
1256
|
-
port: int, optional
|
1257
|
-
Port number to specify in the Kubernetes job object
|
1258
|
-
"""
|
1259
|
-
...
|
1260
|
-
|
1261
|
-
@typing.overload
|
1262
|
-
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]]]:
|
1263
|
-
"""
|
1264
|
-
Creates a human-readable report, a Metaflow Card, after this step completes.
|
1265
|
-
|
1266
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
1267
|
-
|
1268
|
-
Parameters
|
1269
|
-
----------
|
1270
|
-
type : str, default 'default'
|
1271
|
-
Card type.
|
1272
|
-
id : str, optional, default None
|
1273
|
-
If multiple cards are present, use this id to identify this card.
|
1274
|
-
options : Dict[str, Any], default {}
|
1275
|
-
Options passed to the card. The contents depend on the card type.
|
1276
|
-
timeout : int, default 45
|
1277
|
-
Interrupt reporting if it takes more than this many seconds.
|
1278
|
-
|
1279
|
-
|
1280
|
-
"""
|
1281
|
-
...
|
1282
|
-
|
1283
|
-
@typing.overload
|
1284
|
-
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1285
|
-
...
|
1286
|
-
|
1287
|
-
@typing.overload
|
1288
|
-
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1289
|
-
...
|
1290
|
-
|
1291
|
-
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):
|
1292
|
-
"""
|
1293
|
-
Creates a human-readable report, a Metaflow Card, after this step completes.
|
1294
|
-
|
1295
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
1296
|
-
|
1297
|
-
Parameters
|
1298
|
-
----------
|
1299
|
-
type : str, default 'default'
|
1300
|
-
Card type.
|
1301
|
-
id : str, optional, default None
|
1302
|
-
If multiple cards are present, use this id to identify this card.
|
1303
|
-
options : Dict[str, Any], default {}
|
1304
|
-
Options passed to the card. The contents depend on the card type.
|
1305
|
-
timeout : int, default 45
|
1306
|
-
Interrupt reporting if it takes more than this many seconds.
|
1307
|
-
|
1308
|
-
|
1309
|
-
"""
|
1310
|
-
...
|
1311
|
-
|
1312
|
-
@typing.overload
|
1313
|
-
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]]]:
|
1394
|
+
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1314
1395
|
"""
|
1315
|
-
Specifies the PyPI packages for the
|
1396
|
+
Specifies the PyPI packages for all steps of the flow.
|
1316
1397
|
|
1317
|
-
|
1318
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
1319
|
-
you can use `@pypi_base` to set packages required by all
|
1398
|
+
Use `@pypi_base` to set common packages required by all
|
1320
1399
|
steps and use `@pypi` to specify step-specific overrides.
|
1321
|
-
|
1322
1400
|
Parameters
|
1323
1401
|
----------
|
1324
1402
|
packages : Dict[str, str], default: {}
|
1325
|
-
Packages to use for this
|
1403
|
+
Packages to use for this flow. The key is the name of the package
|
1326
1404
|
and the value is the version to use.
|
1327
1405
|
python : str, optional, default: None
|
1328
1406
|
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
@@ -1331,128 +1409,72 @@ def pypi(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] =
|
|
1331
1409
|
...
|
1332
1410
|
|
1333
1411
|
@typing.overload
|
1334
|
-
def
|
1335
|
-
...
|
1336
|
-
|
1337
|
-
@typing.overload
|
1338
|
-
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1412
|
+
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1339
1413
|
...
|
1340
1414
|
|
1341
|
-
def
|
1415
|
+
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
1342
1416
|
"""
|
1343
|
-
Specifies the PyPI packages for the
|
1417
|
+
Specifies the PyPI packages for all steps of the flow.
|
1344
1418
|
|
1345
|
-
|
1346
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
1347
|
-
you can use `@pypi_base` to set packages required by all
|
1419
|
+
Use `@pypi_base` to set common packages required by all
|
1348
1420
|
steps and use `@pypi` to specify step-specific overrides.
|
1349
|
-
|
1350
1421
|
Parameters
|
1351
|
-
----------
|
1352
|
-
packages : Dict[str, str], default: {}
|
1353
|
-
Packages to use for this
|
1354
|
-
and the value is the version to use.
|
1355
|
-
python : str, optional, default: None
|
1356
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1357
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1358
|
-
"""
|
1359
|
-
...
|
1360
|
-
|
1361
|
-
@typing.overload
|
1362
|
-
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]]]:
|
1363
|
-
"""
|
1364
|
-
Specifies environment variables to be set prior to the execution of a step.
|
1365
|
-
|
1366
|
-
Parameters
|
1367
|
-
----------
|
1368
|
-
vars : Dict[str, str], default {}
|
1369
|
-
Dictionary of environment variables to set.
|
1370
|
-
"""
|
1371
|
-
...
|
1372
|
-
|
1373
|
-
@typing.overload
|
1374
|
-
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1375
|
-
...
|
1376
|
-
|
1377
|
-
@typing.overload
|
1378
|
-
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1379
|
-
...
|
1380
|
-
|
1381
|
-
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
1382
|
-
"""
|
1383
|
-
Specifies environment variables to be set prior to the execution of a step.
|
1384
|
-
|
1385
|
-
Parameters
|
1386
|
-
----------
|
1387
|
-
vars : Dict[str, str], default {}
|
1388
|
-
Dictionary of environment variables to set.
|
1389
|
-
"""
|
1390
|
-
...
|
1391
|
-
|
1392
|
-
def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1393
|
-
"""
|
1394
|
-
Specifies what flows belong to the same project.
|
1395
|
-
|
1396
|
-
A project-specific namespace is created for all flows that
|
1397
|
-
use the same `@project(name)`.
|
1398
|
-
|
1399
|
-
Parameters
|
1400
|
-
----------
|
1401
|
-
name : str
|
1402
|
-
Project name. Make sure that the name is unique amongst all
|
1403
|
-
projects that use the same production scheduler. The name may
|
1404
|
-
contain only lowercase alphanumeric characters and underscores.
|
1405
|
-
|
1406
|
-
|
1422
|
+
----------
|
1423
|
+
packages : Dict[str, str], default: {}
|
1424
|
+
Packages to use for this flow. The key is the name of the package
|
1425
|
+
and the value is the version to use.
|
1426
|
+
python : str, optional, default: None
|
1427
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1428
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1407
1429
|
"""
|
1408
1430
|
...
|
1409
1431
|
|
1410
1432
|
@typing.overload
|
1411
|
-
def
|
1433
|
+
def conda_base(*, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1412
1434
|
"""
|
1413
|
-
Specifies the
|
1414
|
-
|
1435
|
+
Specifies the Conda environment for all steps of the flow.
|
1436
|
+
|
1437
|
+
Use `@conda_base` to set common libraries required by all
|
1438
|
+
steps and use `@conda` to specify step-specific additions.
|
1415
1439
|
|
1416
1440
|
Parameters
|
1417
1441
|
----------
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1429
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1442
|
+
packages : Dict[str, str], default {}
|
1443
|
+
Packages to use for this flow. The key is the name of the package
|
1444
|
+
and the value is the version to use.
|
1445
|
+
libraries : Dict[str, str], default {}
|
1446
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1447
|
+
python : str, optional, default None
|
1448
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1449
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1450
|
+
disabled : bool, default False
|
1451
|
+
If set to True, disables Conda.
|
1430
1452
|
"""
|
1431
1453
|
...
|
1432
1454
|
|
1433
1455
|
@typing.overload
|
1434
|
-
def
|
1456
|
+
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1435
1457
|
...
|
1436
1458
|
|
1437
|
-
def
|
1459
|
+
def conda_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, libraries: typing.Dict[str, str] = {}, python: typing.Optional[str] = None, disabled: bool = False):
|
1438
1460
|
"""
|
1439
|
-
Specifies the
|
1440
|
-
|
1461
|
+
Specifies the Conda environment for all steps of the flow.
|
1462
|
+
|
1463
|
+
Use `@conda_base` to set common libraries required by all
|
1464
|
+
steps and use `@conda` to specify step-specific additions.
|
1441
1465
|
|
1442
1466
|
Parameters
|
1443
1467
|
----------
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1455
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1468
|
+
packages : Dict[str, str], default {}
|
1469
|
+
Packages to use for this flow. The key is the name of the package
|
1470
|
+
and the value is the version to use.
|
1471
|
+
libraries : Dict[str, str], default {}
|
1472
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1473
|
+
python : str, optional, default None
|
1474
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1475
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1476
|
+
disabled : bool, default False
|
1477
|
+
If set to True, disables Conda.
|
1456
1478
|
"""
|
1457
1479
|
...
|
1458
1480
|
|
@@ -1498,6 +1520,48 @@ def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, expone
|
|
1498
1520
|
"""
|
1499
1521
|
...
|
1500
1522
|
|
1523
|
+
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]]:
|
1524
|
+
"""
|
1525
|
+
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.
|
1526
|
+
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.
|
1527
|
+
|
1528
|
+
Parameters
|
1529
|
+
----------
|
1530
|
+
timeout : int
|
1531
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
1532
|
+
poke_interval : int
|
1533
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
1534
|
+
mode : str
|
1535
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1536
|
+
exponential_backoff : bool
|
1537
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1538
|
+
pool : str
|
1539
|
+
the slot pool this task should run in,
|
1540
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1541
|
+
soft_fail : bool
|
1542
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1543
|
+
name : str
|
1544
|
+
Name of the sensor on Airflow
|
1545
|
+
description : str
|
1546
|
+
Description of sensor in the Airflow UI
|
1547
|
+
external_dag_id : str
|
1548
|
+
The dag_id that contains the task you want to wait for.
|
1549
|
+
external_task_ids : List[str]
|
1550
|
+
The list of task_ids that you want to wait for.
|
1551
|
+
If None (default value) the sensor waits for the DAG. (Default: None)
|
1552
|
+
allowed_states : List[str]
|
1553
|
+
Iterable of allowed states, (Default: ['success'])
|
1554
|
+
failed_states : List[str]
|
1555
|
+
Iterable of failed or dis-allowed states. (Default: None)
|
1556
|
+
execution_delta : datetime.timedelta
|
1557
|
+
time difference with the previous execution to look at,
|
1558
|
+
the default is the same logical date as the current task or DAG. (Default: None)
|
1559
|
+
check_existence: bool
|
1560
|
+
Set to True to check if the external task exists or check if
|
1561
|
+
the DAG to wait for exists. (Default: True)
|
1562
|
+
"""
|
1563
|
+
...
|
1564
|
+
|
1501
1565
|
@typing.overload
|
1502
1566
|
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]]:
|
1503
1567
|
"""
|
@@ -1593,45 +1657,6 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
1593
1657
|
"""
|
1594
1658
|
...
|
1595
1659
|
|
1596
|
-
@typing.overload
|
1597
|
-
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1598
|
-
"""
|
1599
|
-
Specifies the PyPI packages for all steps of the flow.
|
1600
|
-
|
1601
|
-
Use `@pypi_base` to set common packages required by all
|
1602
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1603
|
-
Parameters
|
1604
|
-
----------
|
1605
|
-
packages : Dict[str, str], default: {}
|
1606
|
-
Packages to use for this flow. The key is the name of the package
|
1607
|
-
and the value is the version to use.
|
1608
|
-
python : str, optional, default: None
|
1609
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1610
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1611
|
-
"""
|
1612
|
-
...
|
1613
|
-
|
1614
|
-
@typing.overload
|
1615
|
-
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1616
|
-
...
|
1617
|
-
|
1618
|
-
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
1619
|
-
"""
|
1620
|
-
Specifies the PyPI packages for all steps of the flow.
|
1621
|
-
|
1622
|
-
Use `@pypi_base` to set common packages required by all
|
1623
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1624
|
-
Parameters
|
1625
|
-
----------
|
1626
|
-
packages : Dict[str, str], default: {}
|
1627
|
-
Packages to use for this flow. The key is the name of the package
|
1628
|
-
and the value is the version to use.
|
1629
|
-
python : str, optional, default: None
|
1630
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1631
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1632
|
-
"""
|
1633
|
-
...
|
1634
|
-
|
1635
1660
|
@typing.overload
|
1636
1661
|
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]]:
|
1637
1662
|
"""
|
@@ -1736,93 +1761,69 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
|
|
1736
1761
|
...
|
1737
1762
|
|
1738
1763
|
@typing.overload
|
1739
|
-
def
|
1764
|
+
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]]:
|
1740
1765
|
"""
|
1741
|
-
Specifies the
|
1742
|
-
|
1743
|
-
Use `@conda_base` to set common libraries required by all
|
1744
|
-
steps and use `@conda` to specify step-specific additions.
|
1766
|
+
Specifies the times when the flow should be run when running on a
|
1767
|
+
production scheduler.
|
1745
1768
|
|
1746
1769
|
Parameters
|
1747
1770
|
----------
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1755
|
-
|
1756
|
-
|
1757
|
-
|
1771
|
+
hourly : bool, default False
|
1772
|
+
Run the workflow hourly.
|
1773
|
+
daily : bool, default True
|
1774
|
+
Run the workflow daily.
|
1775
|
+
weekly : bool, default False
|
1776
|
+
Run the workflow weekly.
|
1777
|
+
cron : str, optional, default None
|
1778
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1779
|
+
specified by this expression.
|
1780
|
+
timezone : str, optional, default None
|
1781
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1782
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1758
1783
|
"""
|
1759
1784
|
...
|
1760
1785
|
|
1761
1786
|
@typing.overload
|
1762
|
-
def
|
1787
|
+
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1763
1788
|
...
|
1764
1789
|
|
1765
|
-
def
|
1790
|
+
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):
|
1766
1791
|
"""
|
1767
|
-
Specifies the
|
1768
|
-
|
1769
|
-
Use `@conda_base` to set common libraries required by all
|
1770
|
-
steps and use `@conda` to specify step-specific additions.
|
1792
|
+
Specifies the times when the flow should be run when running on a
|
1793
|
+
production scheduler.
|
1771
1794
|
|
1772
1795
|
Parameters
|
1773
1796
|
----------
|
1774
|
-
|
1775
|
-
|
1776
|
-
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1797
|
+
hourly : bool, default False
|
1798
|
+
Run the workflow hourly.
|
1799
|
+
daily : bool, default True
|
1800
|
+
Run the workflow daily.
|
1801
|
+
weekly : bool, default False
|
1802
|
+
Run the workflow weekly.
|
1803
|
+
cron : str, optional, default None
|
1804
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1805
|
+
specified by this expression.
|
1806
|
+
timezone : str, optional, default None
|
1807
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1808
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1784
1809
|
"""
|
1785
1810
|
...
|
1786
1811
|
|
1787
|
-
def
|
1812
|
+
def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1788
1813
|
"""
|
1789
|
-
|
1790
|
-
|
1814
|
+
Specifies what flows belong to the same project.
|
1815
|
+
|
1816
|
+
A project-specific namespace is created for all flows that
|
1817
|
+
use the same `@project(name)`.
|
1791
1818
|
|
1792
1819
|
Parameters
|
1793
1820
|
----------
|
1794
|
-
timeout : int
|
1795
|
-
Time, in seconds before the task times out and fails. (Default: 3600)
|
1796
|
-
poke_interval : int
|
1797
|
-
Time in seconds that the job should wait in between each try. (Default: 60)
|
1798
|
-
mode : str
|
1799
|
-
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1800
|
-
exponential_backoff : bool
|
1801
|
-
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1802
|
-
pool : str
|
1803
|
-
the slot pool this task should run in,
|
1804
|
-
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1805
|
-
soft_fail : bool
|
1806
|
-
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1807
1821
|
name : str
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
external_task_ids : List[str]
|
1814
|
-
The list of task_ids that you want to wait for.
|
1815
|
-
If None (default value) the sensor waits for the DAG. (Default: None)
|
1816
|
-
allowed_states : List[str]
|
1817
|
-
Iterable of allowed states, (Default: ['success'])
|
1818
|
-
failed_states : List[str]
|
1819
|
-
Iterable of failed or dis-allowed states. (Default: None)
|
1820
|
-
execution_delta : datetime.timedelta
|
1821
|
-
time difference with the previous execution to look at,
|
1822
|
-
the default is the same logical date as the current task or DAG. (Default: None)
|
1823
|
-
check_existence: bool
|
1824
|
-
Set to True to check if the external task exists or check if
|
1825
|
-
the DAG to wait for exists. (Default: True)
|
1822
|
+
Project name. Make sure that the name is unique amongst all
|
1823
|
+
projects that use the same production scheduler. The name may
|
1824
|
+
contain only lowercase alphanumeric characters and underscores.
|
1825
|
+
|
1826
|
+
|
1826
1827
|
"""
|
1827
1828
|
...
|
1828
1829
|
|