ob-metaflow-stubs 5.9__py2.py3-none-any.whl → 5.9.1__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 +454 -454
- metaflow-stubs/cards.pyi +4 -4
- metaflow-stubs/cli.pyi +2 -2
- metaflow-stubs/client/__init__.pyi +3 -3
- metaflow-stubs/client/core.pyi +5 -5
- metaflow-stubs/client/filecache.pyi +2 -2
- metaflow-stubs/clone_util.pyi +1 -1
- metaflow-stubs/events.pyi +2 -2
- metaflow-stubs/exception.pyi +1 -1
- metaflow-stubs/flowspec.pyi +5 -5
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +3 -3
- metaflow-stubs/metadata/metadata.pyi +2 -2
- metaflow-stubs/metadata/util.pyi +1 -1
- metaflow-stubs/metaflow_config.pyi +1 -1
- metaflow-stubs/metaflow_current.pyi +4 -4
- metaflow-stubs/mflog/mflog.pyi +1 -1
- metaflow-stubs/multicore_utils.pyi +1 -1
- metaflow-stubs/parameters.pyi +2 -2
- metaflow-stubs/plugins/__init__.pyi +1 -1
- metaflow-stubs/plugins/airflow/__init__.pyi +1 -1
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +1 -1
- metaflow-stubs/plugins/airflow/exception.pyi +1 -1
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +1 -1
- 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 +1 -1
- metaflow-stubs/plugins/argo/argo_client.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_events.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_workflows.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +6 -6
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +5 -5
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
- metaflow-stubs/plugins/aws/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/aws_client.pyi +1 -1
- metaflow-stubs/plugins/aws/aws_utils.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/production_token.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +2 -2
- metaflow-stubs/plugins/azure/__init__.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_credential.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_utils.pyi +1 -1
- metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +1 -1
- metaflow-stubs/plugins/azure/includefile_support.pyi +1 -1
- metaflow-stubs/plugins/cards/__init__.pyi +1 -1
- 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 +1 -1
- metaflow-stubs/plugins/cards/card_datastore.pyi +1 -1
- metaflow-stubs/plugins/cards/card_decorator.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/card.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/components.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +1 -1
- metaflow-stubs/plugins/cards/card_resolver.pyi +1 -1
- metaflow-stubs/plugins/cards/component_serializer.pyi +3 -3
- metaflow-stubs/plugins/cards/exception.pyi +1 -1
- metaflow-stubs/plugins/catch_decorator.pyi +2 -2
- metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/local.pyi +1 -1
- 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 +1 -1
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +1 -1
- metaflow-stubs/plugins/debug_logger.pyi +1 -1
- metaflow-stubs/plugins/debug_monitor.pyi +1 -1
- metaflow-stubs/plugins/environment_decorator.pyi +1 -1
- metaflow-stubs/plugins/events_decorator.pyi +1 -1
- metaflow-stubs/plugins/frameworks/__init__.pyi +1 -1
- metaflow-stubs/plugins/frameworks/pytorch.pyi +1 -1
- metaflow-stubs/plugins/gcp/__init__.pyi +1 -1
- metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_exceptions.pyi +1 -1
- metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +1 -1
- metaflow-stubs/plugins/gcp/gs_utils.pyi +1 -1
- metaflow-stubs/plugins/gcp/includefile_support.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/__init__.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kube_utils.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_cli.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +1 -1
- metaflow-stubs/plugins/logs_cli.pyi +2 -2
- metaflow-stubs/plugins/package_cli.pyi +1 -1
- metaflow-stubs/plugins/parallel_decorator.pyi +1 -1
- metaflow-stubs/plugins/perimeters.pyi +1 -1
- metaflow-stubs/plugins/project_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/__init__.pyi +1 -1
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/conda_environment.pyi +3 -3
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
- metaflow-stubs/plugins/pypi/utils.pyi +1 -1
- metaflow-stubs/plugins/resources_decorator.pyi +1 -1
- metaflow-stubs/plugins/retry_decorator.pyi +1 -1
- metaflow-stubs/plugins/secrets/__init__.pyi +1 -1
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +1 -1
- metaflow-stubs/plugins/storage_executor.pyi +1 -1
- metaflow-stubs/plugins/tag_cli.pyi +4 -4
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +1 -1
- metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
- metaflow-stubs/procpoll.pyi +1 -1
- metaflow-stubs/profilers/__init__.pyi +1 -1
- metaflow-stubs/pylint_wrapper.pyi +1 -1
- metaflow-stubs/runner/__init__.pyi +1 -1
- metaflow-stubs/runner/deployer.pyi +2 -2
- metaflow-stubs/runner/metaflow_runner.pyi +4 -4
- metaflow-stubs/runner/nbdeploy.pyi +1 -1
- metaflow-stubs/runner/nbrun.pyi +1 -1
- metaflow-stubs/runner/subprocess_manager.pyi +1 -1
- metaflow-stubs/runner/utils.pyi +1 -1
- metaflow-stubs/system/__init__.pyi +2 -2
- metaflow-stubs/system/system_logger.pyi +2 -2
- metaflow-stubs/system/system_monitor.pyi +2 -2
- metaflow-stubs/tagging_util.pyi +1 -1
- metaflow-stubs/tuple_util.pyi +1 -1
- {ob_metaflow_stubs-5.9.dist-info → ob_metaflow_stubs-5.9.1.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-5.9.1.dist-info/RECORD +139 -0
- ob_metaflow_stubs-5.9.dist-info/RECORD +0 -139
- {ob_metaflow_stubs-5.9.dist-info → ob_metaflow_stubs-5.9.1.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-5.9.dist-info → ob_metaflow_stubs-5.9.1.dist-info}/top_level.txt +0 -0
metaflow-stubs/__init__.pyi
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
3
|
# MF version: 2.12.20.1+ob(v1) #
|
4
|
-
# Generated on 2024-09-
|
4
|
+
# Generated on 2024-09-16T18:41:26.221357 #
|
5
5
|
##################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -9,15 +9,15 @@ from __future__ import annotations
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
11
|
import metaflow._vendor.click.types
|
12
|
-
import metaflow.
|
13
|
-
import metaflow.parameters
|
14
|
-
import typing
|
12
|
+
import metaflow.client.core
|
15
13
|
import metaflow.runner.metaflow_runner
|
16
|
-
import metaflow.metaflow_current
|
17
|
-
import metaflow.events
|
18
14
|
import datetime
|
19
|
-
import metaflow.
|
15
|
+
import metaflow.events
|
16
|
+
import metaflow.metaflow_current
|
17
|
+
import typing
|
20
18
|
import metaflow.flowspec
|
19
|
+
import metaflow.parameters
|
20
|
+
import metaflow.datastore.inputs
|
21
21
|
FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
|
22
22
|
StepFlag = typing.NewType("StepFlag", bool)
|
23
23
|
|
@@ -437,57 +437,6 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
437
437
|
"""
|
438
438
|
...
|
439
439
|
|
440
|
-
@typing.overload
|
441
|
-
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]]]:
|
442
|
-
"""
|
443
|
-
Creates a human-readable report, a Metaflow Card, after this step completes.
|
444
|
-
|
445
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
446
|
-
|
447
|
-
Parameters
|
448
|
-
----------
|
449
|
-
type : str, default 'default'
|
450
|
-
Card type.
|
451
|
-
id : str, optional, default None
|
452
|
-
If multiple cards are present, use this id to identify this card.
|
453
|
-
options : Dict[str, Any], default {}
|
454
|
-
Options passed to the card. The contents depend on the card type.
|
455
|
-
timeout : int, default 45
|
456
|
-
Interrupt reporting if it takes more than this many seconds.
|
457
|
-
|
458
|
-
|
459
|
-
"""
|
460
|
-
...
|
461
|
-
|
462
|
-
@typing.overload
|
463
|
-
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
464
|
-
...
|
465
|
-
|
466
|
-
@typing.overload
|
467
|
-
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
468
|
-
...
|
469
|
-
|
470
|
-
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):
|
471
|
-
"""
|
472
|
-
Creates a human-readable report, a Metaflow Card, after this step completes.
|
473
|
-
|
474
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
475
|
-
|
476
|
-
Parameters
|
477
|
-
----------
|
478
|
-
type : str, default 'default'
|
479
|
-
Card type.
|
480
|
-
id : str, optional, default None
|
481
|
-
If multiple cards are present, use this id to identify this card.
|
482
|
-
options : Dict[str, Any], default {}
|
483
|
-
Options passed to the card. The contents depend on the card type.
|
484
|
-
timeout : int, default 45
|
485
|
-
Interrupt reporting if it takes more than this many seconds.
|
486
|
-
|
487
|
-
|
488
|
-
"""
|
489
|
-
...
|
490
|
-
|
491
440
|
@typing.overload
|
492
441
|
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]]]:
|
493
442
|
"""
|
@@ -597,150 +546,141 @@ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], Non
|
|
597
546
|
...
|
598
547
|
|
599
548
|
@typing.overload
|
600
|
-
def
|
549
|
+
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]]]:
|
601
550
|
"""
|
602
|
-
Specifies
|
603
|
-
|
604
|
-
The decorator will create an optional artifact, specified by `var`, which
|
605
|
-
contains the exception raised. You can use it to detect the presence
|
606
|
-
of errors, indicating that all happy-path artifacts produced by the step
|
607
|
-
are missing.
|
551
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
552
|
+
the execution of a step.
|
608
553
|
|
609
554
|
Parameters
|
610
555
|
----------
|
611
|
-
|
612
|
-
|
613
|
-
If not specified, the exception is not stored.
|
614
|
-
print_exception : bool, default True
|
615
|
-
Determines whether or not the exception is printed to
|
616
|
-
stdout when caught.
|
556
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
557
|
+
List of secret specs, defining how the secrets are to be retrieved
|
617
558
|
"""
|
618
559
|
...
|
619
560
|
|
620
561
|
@typing.overload
|
621
|
-
def
|
562
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
622
563
|
...
|
623
564
|
|
624
565
|
@typing.overload
|
625
|
-
def
|
566
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
626
567
|
...
|
627
568
|
|
628
|
-
def
|
569
|
+
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]]] = []):
|
629
570
|
"""
|
630
|
-
Specifies
|
571
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
572
|
+
the execution of a step.
|
631
573
|
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
574
|
+
Parameters
|
575
|
+
----------
|
576
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
577
|
+
List of secret specs, defining how the secrets are to be retrieved
|
578
|
+
"""
|
579
|
+
...
|
580
|
+
|
581
|
+
@typing.overload
|
582
|
+
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]]]:
|
583
|
+
"""
|
584
|
+
Specifies the Conda environment for the step.
|
585
|
+
|
586
|
+
Information in this decorator will augment any
|
587
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
588
|
+
you can use `@conda_base` to set packages required by all
|
589
|
+
steps and use `@conda` to specify step-specific overrides.
|
636
590
|
|
637
591
|
Parameters
|
638
592
|
----------
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
593
|
+
packages : Dict[str, str], default {}
|
594
|
+
Packages to use for this step. The key is the name of the package
|
595
|
+
and the value is the version to use.
|
596
|
+
libraries : Dict[str, str], default {}
|
597
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
598
|
+
python : str, optional, default None
|
599
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
600
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
601
|
+
disabled : bool, default False
|
602
|
+
If set to True, disables @conda.
|
645
603
|
"""
|
646
604
|
...
|
647
605
|
|
648
|
-
|
606
|
+
@typing.overload
|
607
|
+
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
608
|
+
...
|
609
|
+
|
610
|
+
@typing.overload
|
611
|
+
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
612
|
+
...
|
613
|
+
|
614
|
+
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):
|
649
615
|
"""
|
650
|
-
Specifies
|
616
|
+
Specifies the Conda environment for the step.
|
617
|
+
|
618
|
+
Information in this decorator will augment any
|
619
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
620
|
+
you can use `@conda_base` to set packages required by all
|
621
|
+
steps and use `@conda` to specify step-specific overrides.
|
651
622
|
|
652
623
|
Parameters
|
653
624
|
----------
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
used.
|
665
|
-
image : str, optional, default None
|
666
|
-
Docker image to use when launching on Kubernetes. If not specified, and
|
667
|
-
METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
|
668
|
-
not, a default Docker image mapping to the current version of Python is used.
|
669
|
-
image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
|
670
|
-
If given, the imagePullPolicy to be applied to the Docker image of the step.
|
671
|
-
service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
|
672
|
-
Kubernetes service account to use when launching pod in Kubernetes.
|
673
|
-
secrets : List[str], optional, default None
|
674
|
-
Kubernetes secrets to use when launching pod in Kubernetes. These
|
675
|
-
secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
|
676
|
-
in Metaflow configuration.
|
677
|
-
node_selector: Union[Dict[str,str], str], optional, default None
|
678
|
-
Kubernetes node selector(s) to apply to the pod running the task.
|
679
|
-
Can be passed in as a comma separated string of values e.g. "kubernetes.io/os=linux,kubernetes.io/arch=amd64"
|
680
|
-
or as a dictionary {"kubernetes.io/os": "linux", "kubernetes.io/arch": "amd64"}
|
681
|
-
namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
|
682
|
-
Kubernetes namespace to use when launching pod in Kubernetes.
|
683
|
-
gpu : int, optional, default None
|
684
|
-
Number of GPUs required for this step. A value of zero implies that
|
685
|
-
the scheduled node should not have GPUs.
|
686
|
-
gpu_vendor : str, default KUBERNETES_GPU_VENDOR
|
687
|
-
The vendor of the GPUs to be used for this step.
|
688
|
-
tolerations : List[str], default []
|
689
|
-
The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
|
690
|
-
Kubernetes tolerations to use when launching pod in Kubernetes.
|
691
|
-
use_tmpfs : bool, default False
|
692
|
-
This enables an explicit tmpfs mount for this step.
|
693
|
-
tmpfs_tempdir : bool, default True
|
694
|
-
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
695
|
-
tmpfs_size : int, optional, default: None
|
696
|
-
The value for the size (in MiB) of the tmpfs mount for this step.
|
697
|
-
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
698
|
-
memory allocated for this step.
|
699
|
-
tmpfs_path : str, optional, default /metaflow_temp
|
700
|
-
Path to tmpfs mount for this step.
|
701
|
-
persistent_volume_claims : Dict[str, str], optional, default None
|
702
|
-
A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
|
703
|
-
volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
|
704
|
-
shared_memory: int, optional
|
705
|
-
Shared memory size (in MiB) required for this step
|
706
|
-
port: int, optional
|
707
|
-
Port number to specify in the Kubernetes job object
|
708
|
-
compute_pool : str, optional, default None
|
709
|
-
Compute pool to be used for for this step.
|
710
|
-
If not specified, any accessible compute pool within the perimeter is used.
|
625
|
+
packages : Dict[str, str], default {}
|
626
|
+
Packages to use for this step. The key is the name of the package
|
627
|
+
and the value is the version to use.
|
628
|
+
libraries : Dict[str, str], default {}
|
629
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
630
|
+
python : str, optional, default None
|
631
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
632
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
633
|
+
disabled : bool, default False
|
634
|
+
If set to True, disables @conda.
|
711
635
|
"""
|
712
636
|
...
|
713
637
|
|
714
638
|
@typing.overload
|
715
|
-
def
|
639
|
+
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]]]:
|
716
640
|
"""
|
717
|
-
Specifies
|
718
|
-
|
641
|
+
Specifies that the step will success under all circumstances.
|
642
|
+
|
643
|
+
The decorator will create an optional artifact, specified by `var`, which
|
644
|
+
contains the exception raised. You can use it to detect the presence
|
645
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
646
|
+
are missing.
|
719
647
|
|
720
648
|
Parameters
|
721
649
|
----------
|
722
|
-
|
723
|
-
|
650
|
+
var : str, optional, default None
|
651
|
+
Name of the artifact in which to store the caught exception.
|
652
|
+
If not specified, the exception is not stored.
|
653
|
+
print_exception : bool, default True
|
654
|
+
Determines whether or not the exception is printed to
|
655
|
+
stdout when caught.
|
724
656
|
"""
|
725
657
|
...
|
726
658
|
|
727
659
|
@typing.overload
|
728
|
-
def
|
660
|
+
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
729
661
|
...
|
730
662
|
|
731
663
|
@typing.overload
|
732
|
-
def
|
664
|
+
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
733
665
|
...
|
734
666
|
|
735
|
-
def
|
667
|
+
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):
|
736
668
|
"""
|
737
|
-
Specifies
|
738
|
-
|
669
|
+
Specifies that the step will success under all circumstances.
|
670
|
+
|
671
|
+
The decorator will create an optional artifact, specified by `var`, which
|
672
|
+
contains the exception raised. You can use it to detect the presence
|
673
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
674
|
+
are missing.
|
739
675
|
|
740
676
|
Parameters
|
741
677
|
----------
|
742
|
-
|
743
|
-
|
678
|
+
var : str, optional, default None
|
679
|
+
Name of the artifact in which to store the caught exception.
|
680
|
+
If not specified, the exception is not stored.
|
681
|
+
print_exception : bool, default True
|
682
|
+
Determines whether or not the exception is printed to
|
683
|
+
stdout when caught.
|
744
684
|
"""
|
745
685
|
...
|
746
686
|
|
@@ -762,59 +702,102 @@ def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepF
|
|
762
702
|
...
|
763
703
|
|
764
704
|
@typing.overload
|
765
|
-
def
|
705
|
+
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]]]:
|
766
706
|
"""
|
767
|
-
|
707
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
768
708
|
|
769
|
-
|
770
|
-
|
771
|
-
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
772
|
-
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
773
|
-
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
774
|
-
|
775
|
-
Note that all the values specified in parameters are added together so if you specify
|
776
|
-
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
709
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
777
710
|
|
778
711
|
Parameters
|
779
712
|
----------
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
713
|
+
type : str, default 'default'
|
714
|
+
Card type.
|
715
|
+
id : str, optional, default None
|
716
|
+
If multiple cards are present, use this id to identify this card.
|
717
|
+
options : Dict[str, Any], default {}
|
718
|
+
Options passed to the card. The contents depend on the card type.
|
719
|
+
timeout : int, default 45
|
720
|
+
Interrupt reporting if it takes more than this many seconds.
|
721
|
+
|
722
|
+
|
786
723
|
"""
|
787
724
|
...
|
788
725
|
|
789
726
|
@typing.overload
|
790
|
-
def
|
727
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
791
728
|
...
|
792
729
|
|
793
730
|
@typing.overload
|
794
|
-
def
|
731
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
795
732
|
...
|
796
733
|
|
797
|
-
def
|
734
|
+
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):
|
798
735
|
"""
|
799
|
-
|
736
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
800
737
|
|
801
|
-
|
738
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
802
739
|
|
803
|
-
|
804
|
-
|
805
|
-
|
740
|
+
Parameters
|
741
|
+
----------
|
742
|
+
type : str, default 'default'
|
743
|
+
Card type.
|
744
|
+
id : str, optional, default None
|
745
|
+
If multiple cards are present, use this id to identify this card.
|
746
|
+
options : Dict[str, Any], default {}
|
747
|
+
Options passed to the card. The contents depend on the card type.
|
748
|
+
timeout : int, default 45
|
749
|
+
Interrupt reporting if it takes more than this many seconds.
|
806
750
|
|
807
|
-
|
808
|
-
|
751
|
+
|
752
|
+
"""
|
753
|
+
...
|
754
|
+
|
755
|
+
@typing.overload
|
756
|
+
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]]]:
|
757
|
+
"""
|
758
|
+
Specifies the PyPI packages for the step.
|
759
|
+
|
760
|
+
Information in this decorator will augment any
|
761
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
762
|
+
you can use `@pypi_base` to set packages required by all
|
763
|
+
steps and use `@pypi` to specify step-specific overrides.
|
809
764
|
|
810
765
|
Parameters
|
811
766
|
----------
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
767
|
+
packages : Dict[str, str], default: {}
|
768
|
+
Packages to use for this step. The key is the name of the package
|
769
|
+
and the value is the version to use.
|
770
|
+
python : str, optional, default: None
|
771
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
772
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
773
|
+
"""
|
774
|
+
...
|
775
|
+
|
776
|
+
@typing.overload
|
777
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
778
|
+
...
|
779
|
+
|
780
|
+
@typing.overload
|
781
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
782
|
+
...
|
783
|
+
|
784
|
+
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):
|
785
|
+
"""
|
786
|
+
Specifies the PyPI packages for the step.
|
787
|
+
|
788
|
+
Information in this decorator will augment any
|
789
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
790
|
+
you can use `@pypi_base` to set packages required by all
|
791
|
+
steps and use `@pypi` to specify step-specific overrides.
|
792
|
+
|
793
|
+
Parameters
|
794
|
+
----------
|
795
|
+
packages : Dict[str, str], default: {}
|
796
|
+
Packages to use for this step. The key is the name of the package
|
797
|
+
and the value is the version to use.
|
798
|
+
python : str, optional, default: None
|
799
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
800
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
818
801
|
"""
|
819
802
|
...
|
820
803
|
|
@@ -871,60 +854,69 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
871
854
|
"""
|
872
855
|
...
|
873
856
|
|
874
|
-
|
875
|
-
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]]]:
|
876
|
-
"""
|
877
|
-
Specifies the Conda environment for the step.
|
878
|
-
|
879
|
-
Information in this decorator will augment any
|
880
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
881
|
-
you can use `@conda_base` to set packages required by all
|
882
|
-
steps and use `@conda` to specify step-specific overrides.
|
883
|
-
|
884
|
-
Parameters
|
885
|
-
----------
|
886
|
-
packages : Dict[str, str], default {}
|
887
|
-
Packages to use for this step. The key is the name of the package
|
888
|
-
and the value is the version to use.
|
889
|
-
libraries : Dict[str, str], default {}
|
890
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
891
|
-
python : str, optional, default None
|
892
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
893
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
894
|
-
disabled : bool, default False
|
895
|
-
If set to True, disables @conda.
|
896
|
-
"""
|
897
|
-
...
|
898
|
-
|
899
|
-
@typing.overload
|
900
|
-
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
901
|
-
...
|
902
|
-
|
903
|
-
@typing.overload
|
904
|
-
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
905
|
-
...
|
906
|
-
|
907
|
-
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):
|
857
|
+
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, node_selector: typing.Union[typing.Dict[str, str], str, None] = 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, compute_pool: 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]]]:
|
908
858
|
"""
|
909
|
-
Specifies
|
910
|
-
|
911
|
-
Information in this decorator will augment any
|
912
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
913
|
-
you can use `@conda_base` to set packages required by all
|
914
|
-
steps and use `@conda` to specify step-specific overrides.
|
859
|
+
Specifies that this step should execute on Kubernetes.
|
915
860
|
|
916
861
|
Parameters
|
917
862
|
----------
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
863
|
+
cpu : int, default 1
|
864
|
+
Number of CPUs required for this step. If `@resources` is
|
865
|
+
also present, the maximum value from all decorators is used.
|
866
|
+
memory : int, default 4096
|
867
|
+
Memory size (in MB) required for this step. If
|
868
|
+
`@resources` is also present, the maximum value from all decorators is
|
869
|
+
used.
|
870
|
+
disk : int, default 10240
|
871
|
+
Disk size (in MB) required for this step. If
|
872
|
+
`@resources` is also present, the maximum value from all decorators is
|
873
|
+
used.
|
874
|
+
image : str, optional, default None
|
875
|
+
Docker image to use when launching on Kubernetes. If not specified, and
|
876
|
+
METAFLOW_KUBERNETES_CONTAINER_IMAGE is specified, that image is used. If
|
877
|
+
not, a default Docker image mapping to the current version of Python is used.
|
878
|
+
image_pull_policy: str, default KUBERNETES_IMAGE_PULL_POLICY
|
879
|
+
If given, the imagePullPolicy to be applied to the Docker image of the step.
|
880
|
+
service_account : str, default METAFLOW_KUBERNETES_SERVICE_ACCOUNT
|
881
|
+
Kubernetes service account to use when launching pod in Kubernetes.
|
882
|
+
secrets : List[str], optional, default None
|
883
|
+
Kubernetes secrets to use when launching pod in Kubernetes. These
|
884
|
+
secrets are in addition to the ones defined in `METAFLOW_KUBERNETES_SECRETS`
|
885
|
+
in Metaflow configuration.
|
886
|
+
node_selector: Union[Dict[str,str], str], optional, default None
|
887
|
+
Kubernetes node selector(s) to apply to the pod running the task.
|
888
|
+
Can be passed in as a comma separated string of values e.g. "kubernetes.io/os=linux,kubernetes.io/arch=amd64"
|
889
|
+
or as a dictionary {"kubernetes.io/os": "linux", "kubernetes.io/arch": "amd64"}
|
890
|
+
namespace : str, default METAFLOW_KUBERNETES_NAMESPACE
|
891
|
+
Kubernetes namespace to use when launching pod in Kubernetes.
|
892
|
+
gpu : int, optional, default None
|
893
|
+
Number of GPUs required for this step. A value of zero implies that
|
894
|
+
the scheduled node should not have GPUs.
|
895
|
+
gpu_vendor : str, default KUBERNETES_GPU_VENDOR
|
896
|
+
The vendor of the GPUs to be used for this step.
|
897
|
+
tolerations : List[str], default []
|
898
|
+
The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
|
899
|
+
Kubernetes tolerations to use when launching pod in Kubernetes.
|
900
|
+
use_tmpfs : bool, default False
|
901
|
+
This enables an explicit tmpfs mount for this step.
|
902
|
+
tmpfs_tempdir : bool, default True
|
903
|
+
sets METAFLOW_TEMPDIR to tmpfs_path if set for this step.
|
904
|
+
tmpfs_size : int, optional, default: None
|
905
|
+
The value for the size (in MiB) of the tmpfs mount for this step.
|
906
|
+
This parameter maps to the `--tmpfs` option in Docker. Defaults to 50% of the
|
907
|
+
memory allocated for this step.
|
908
|
+
tmpfs_path : str, optional, default /metaflow_temp
|
909
|
+
Path to tmpfs mount for this step.
|
910
|
+
persistent_volume_claims : Dict[str, str], optional, default None
|
911
|
+
A map (dictionary) of persistent volumes to be mounted to the pod for this step. The map is from persistent
|
912
|
+
volumes to the path to which the volume is to be mounted, e.g., `{'pvc-name': '/path/to/mount/on'}`.
|
913
|
+
shared_memory: int, optional
|
914
|
+
Shared memory size (in MiB) required for this step
|
915
|
+
port: int, optional
|
916
|
+
Port number to specify in the Kubernetes job object
|
917
|
+
compute_pool : str, optional, default None
|
918
|
+
Compute pool to be used for for this step.
|
919
|
+
If not specified, any accessible compute pool within the perimeter is used.
|
928
920
|
"""
|
929
921
|
...
|
930
922
|
|
@@ -948,51 +940,108 @@ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
|
|
948
940
|
...
|
949
941
|
|
950
942
|
@typing.overload
|
951
|
-
def
|
943
|
+
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]]]:
|
952
944
|
"""
|
953
|
-
Specifies
|
945
|
+
Specifies a timeout for your step.
|
954
946
|
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
947
|
+
This decorator is useful if this step may hang indefinitely.
|
948
|
+
|
949
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
950
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
951
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
952
|
+
|
953
|
+
Note that all the values specified in parameters are added together so if you specify
|
954
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
959
955
|
|
960
956
|
Parameters
|
961
957
|
----------
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
958
|
+
seconds : int, default 0
|
959
|
+
Number of seconds to wait prior to timing out.
|
960
|
+
minutes : int, default 0
|
961
|
+
Number of minutes to wait prior to timing out.
|
962
|
+
hours : int, default 0
|
963
|
+
Number of hours to wait prior to timing out.
|
968
964
|
"""
|
969
965
|
...
|
970
966
|
|
971
967
|
@typing.overload
|
972
|
-
def
|
968
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
973
969
|
...
|
974
970
|
|
975
971
|
@typing.overload
|
976
|
-
def
|
972
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
977
973
|
...
|
978
974
|
|
979
|
-
def
|
975
|
+
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):
|
980
976
|
"""
|
981
|
-
Specifies
|
977
|
+
Specifies a timeout for your step.
|
982
978
|
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
979
|
+
This decorator is useful if this step may hang indefinitely.
|
980
|
+
|
981
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
982
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
983
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
984
|
+
|
985
|
+
Note that all the values specified in parameters are added together so if you specify
|
986
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
987
987
|
|
988
988
|
Parameters
|
989
989
|
----------
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
990
|
+
seconds : int, default 0
|
991
|
+
Number of seconds to wait prior to timing out.
|
992
|
+
minutes : int, default 0
|
993
|
+
Number of minutes to wait prior to timing out.
|
994
|
+
hours : int, default 0
|
995
|
+
Number of hours to wait prior to timing out.
|
996
|
+
"""
|
997
|
+
...
|
998
|
+
|
999
|
+
@typing.overload
|
1000
|
+
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]]:
|
1001
|
+
"""
|
1002
|
+
Specifies the times when the flow should be run when running on a
|
1003
|
+
production scheduler.
|
1004
|
+
|
1005
|
+
Parameters
|
1006
|
+
----------
|
1007
|
+
hourly : bool, default False
|
1008
|
+
Run the workflow hourly.
|
1009
|
+
daily : bool, default True
|
1010
|
+
Run the workflow daily.
|
1011
|
+
weekly : bool, default False
|
1012
|
+
Run the workflow weekly.
|
1013
|
+
cron : str, optional, default None
|
1014
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1015
|
+
specified by this expression.
|
1016
|
+
timezone : str, optional, default None
|
1017
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1018
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1019
|
+
"""
|
1020
|
+
...
|
1021
|
+
|
1022
|
+
@typing.overload
|
1023
|
+
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1024
|
+
...
|
1025
|
+
|
1026
|
+
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):
|
1027
|
+
"""
|
1028
|
+
Specifies the times when the flow should be run when running on a
|
1029
|
+
production scheduler.
|
1030
|
+
|
1031
|
+
Parameters
|
1032
|
+
----------
|
1033
|
+
hourly : bool, default False
|
1034
|
+
Run the workflow hourly.
|
1035
|
+
daily : bool, default True
|
1036
|
+
Run the workflow daily.
|
1037
|
+
weekly : bool, default False
|
1038
|
+
Run the workflow weekly.
|
1039
|
+
cron : str, optional, default None
|
1040
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1041
|
+
specified by this expression.
|
1042
|
+
timezone : str, optional, default None
|
1043
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1044
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
996
1045
|
"""
|
997
1046
|
...
|
998
1047
|
|
@@ -1038,21 +1087,102 @@ def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, expone
|
|
1038
1087
|
"""
|
1039
1088
|
...
|
1040
1089
|
|
1041
|
-
def
|
1090
|
+
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]]:
|
1091
|
+
"""
|
1092
|
+
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.
|
1093
|
+
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.
|
1094
|
+
|
1095
|
+
Parameters
|
1096
|
+
----------
|
1097
|
+
timeout : int
|
1098
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
1099
|
+
poke_interval : int
|
1100
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
1101
|
+
mode : str
|
1102
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1103
|
+
exponential_backoff : bool
|
1104
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1105
|
+
pool : str
|
1106
|
+
the slot pool this task should run in,
|
1107
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1108
|
+
soft_fail : bool
|
1109
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1110
|
+
name : str
|
1111
|
+
Name of the sensor on Airflow
|
1112
|
+
description : str
|
1113
|
+
Description of sensor in the Airflow UI
|
1114
|
+
external_dag_id : str
|
1115
|
+
The dag_id that contains the task you want to wait for.
|
1116
|
+
external_task_ids : List[str]
|
1117
|
+
The list of task_ids that you want to wait for.
|
1118
|
+
If None (default value) the sensor waits for the DAG. (Default: None)
|
1119
|
+
allowed_states : List[str]
|
1120
|
+
Iterable of allowed states, (Default: ['success'])
|
1121
|
+
failed_states : List[str]
|
1122
|
+
Iterable of failed or dis-allowed states. (Default: None)
|
1123
|
+
execution_delta : datetime.timedelta
|
1124
|
+
time difference with the previous execution to look at,
|
1125
|
+
the default is the same logical date as the current task or DAG. (Default: None)
|
1126
|
+
check_existence: bool
|
1127
|
+
Set to True to check if the external task exists or check if
|
1128
|
+
the DAG to wait for exists. (Default: True)
|
1129
|
+
"""
|
1130
|
+
...
|
1131
|
+
|
1132
|
+
def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1133
|
+
"""
|
1134
|
+
Specifies what flows belong to the same project.
|
1135
|
+
|
1136
|
+
A project-specific namespace is created for all flows that
|
1137
|
+
use the same `@project(name)`.
|
1138
|
+
|
1139
|
+
Parameters
|
1140
|
+
----------
|
1141
|
+
name : str
|
1142
|
+
Project name. Make sure that the name is unique amongst all
|
1143
|
+
projects that use the same production scheduler. The name may
|
1144
|
+
contain only lowercase alphanumeric characters and underscores.
|
1145
|
+
|
1146
|
+
|
1147
|
+
"""
|
1148
|
+
...
|
1149
|
+
|
1150
|
+
@typing.overload
|
1151
|
+
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1152
|
+
"""
|
1153
|
+
Specifies the PyPI packages for all steps of the flow.
|
1154
|
+
|
1155
|
+
Use `@pypi_base` to set common packages required by all
|
1156
|
+
steps and use `@pypi` to specify step-specific overrides.
|
1157
|
+
Parameters
|
1158
|
+
----------
|
1159
|
+
packages : Dict[str, str], default: {}
|
1160
|
+
Packages to use for this flow. The key is the name of the package
|
1161
|
+
and the value is the version to use.
|
1162
|
+
python : str, optional, default: None
|
1163
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1164
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1165
|
+
"""
|
1166
|
+
...
|
1167
|
+
|
1168
|
+
@typing.overload
|
1169
|
+
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1170
|
+
...
|
1171
|
+
|
1172
|
+
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
1042
1173
|
"""
|
1043
|
-
Specifies
|
1044
|
-
|
1045
|
-
A project-specific namespace is created for all flows that
|
1046
|
-
use the same `@project(name)`.
|
1174
|
+
Specifies the PyPI packages for all steps of the flow.
|
1047
1175
|
|
1176
|
+
Use `@pypi_base` to set common packages required by all
|
1177
|
+
steps and use `@pypi` to specify step-specific overrides.
|
1048
1178
|
Parameters
|
1049
1179
|
----------
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1180
|
+
packages : Dict[str, str], default: {}
|
1181
|
+
Packages to use for this flow. The key is the name of the package
|
1182
|
+
and the value is the version to use.
|
1183
|
+
python : str, optional, default: None
|
1184
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1185
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1056
1186
|
"""
|
1057
1187
|
...
|
1058
1188
|
|
@@ -1087,6 +1217,55 @@ def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[Fl
|
|
1087
1217
|
"""
|
1088
1218
|
...
|
1089
1219
|
|
1220
|
+
@typing.overload
|
1221
|
+
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]]:
|
1222
|
+
"""
|
1223
|
+
Specifies the Conda environment for all steps of the flow.
|
1224
|
+
|
1225
|
+
Use `@conda_base` to set common libraries required by all
|
1226
|
+
steps and use `@conda` to specify step-specific additions.
|
1227
|
+
|
1228
|
+
Parameters
|
1229
|
+
----------
|
1230
|
+
packages : Dict[str, str], default {}
|
1231
|
+
Packages to use for this flow. The key is the name of the package
|
1232
|
+
and the value is the version to use.
|
1233
|
+
libraries : Dict[str, str], default {}
|
1234
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1235
|
+
python : str, optional, default None
|
1236
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1237
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1238
|
+
disabled : bool, default False
|
1239
|
+
If set to True, disables Conda.
|
1240
|
+
"""
|
1241
|
+
...
|
1242
|
+
|
1243
|
+
@typing.overload
|
1244
|
+
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1245
|
+
...
|
1246
|
+
|
1247
|
+
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):
|
1248
|
+
"""
|
1249
|
+
Specifies the Conda environment for all steps of the flow.
|
1250
|
+
|
1251
|
+
Use `@conda_base` to set common libraries required by all
|
1252
|
+
steps and use `@conda` to specify step-specific additions.
|
1253
|
+
|
1254
|
+
Parameters
|
1255
|
+
----------
|
1256
|
+
packages : Dict[str, str], default {}
|
1257
|
+
Packages to use for this flow. The key is the name of the package
|
1258
|
+
and the value is the version to use.
|
1259
|
+
libraries : Dict[str, str], default {}
|
1260
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1261
|
+
python : str, optional, default None
|
1262
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1263
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1264
|
+
disabled : bool, default False
|
1265
|
+
If set to True, disables Conda.
|
1266
|
+
"""
|
1267
|
+
...
|
1268
|
+
|
1090
1269
|
@typing.overload
|
1091
1270
|
def trigger_on_finish(*, flow: typing.Union[typing.Dict[str, 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]]:
|
1092
1271
|
"""
|
@@ -1190,136 +1369,6 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
|
|
1190
1369
|
"""
|
1191
1370
|
...
|
1192
1371
|
|
1193
|
-
@typing.overload
|
1194
|
-
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1195
|
-
"""
|
1196
|
-
Specifies the PyPI packages for all steps of the flow.
|
1197
|
-
|
1198
|
-
Use `@pypi_base` to set common packages required by all
|
1199
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1200
|
-
Parameters
|
1201
|
-
----------
|
1202
|
-
packages : Dict[str, str], default: {}
|
1203
|
-
Packages to use for this flow. The key is the name of the package
|
1204
|
-
and the value is the version to use.
|
1205
|
-
python : str, optional, default: None
|
1206
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1207
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1208
|
-
"""
|
1209
|
-
...
|
1210
|
-
|
1211
|
-
@typing.overload
|
1212
|
-
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1213
|
-
...
|
1214
|
-
|
1215
|
-
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
1216
|
-
"""
|
1217
|
-
Specifies the PyPI packages for all steps of the flow.
|
1218
|
-
|
1219
|
-
Use `@pypi_base` to set common packages required by all
|
1220
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1221
|
-
Parameters
|
1222
|
-
----------
|
1223
|
-
packages : Dict[str, str], default: {}
|
1224
|
-
Packages to use for this flow. The key is the name of the package
|
1225
|
-
and the value is the version to use.
|
1226
|
-
python : str, optional, default: None
|
1227
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1228
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1229
|
-
"""
|
1230
|
-
...
|
1231
|
-
|
1232
|
-
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]]:
|
1233
|
-
"""
|
1234
|
-
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.
|
1235
|
-
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.
|
1236
|
-
|
1237
|
-
Parameters
|
1238
|
-
----------
|
1239
|
-
timeout : int
|
1240
|
-
Time, in seconds before the task times out and fails. (Default: 3600)
|
1241
|
-
poke_interval : int
|
1242
|
-
Time in seconds that the job should wait in between each try. (Default: 60)
|
1243
|
-
mode : str
|
1244
|
-
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1245
|
-
exponential_backoff : bool
|
1246
|
-
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1247
|
-
pool : str
|
1248
|
-
the slot pool this task should run in,
|
1249
|
-
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1250
|
-
soft_fail : bool
|
1251
|
-
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1252
|
-
name : str
|
1253
|
-
Name of the sensor on Airflow
|
1254
|
-
description : str
|
1255
|
-
Description of sensor in the Airflow UI
|
1256
|
-
external_dag_id : str
|
1257
|
-
The dag_id that contains the task you want to wait for.
|
1258
|
-
external_task_ids : List[str]
|
1259
|
-
The list of task_ids that you want to wait for.
|
1260
|
-
If None (default value) the sensor waits for the DAG. (Default: None)
|
1261
|
-
allowed_states : List[str]
|
1262
|
-
Iterable of allowed states, (Default: ['success'])
|
1263
|
-
failed_states : List[str]
|
1264
|
-
Iterable of failed or dis-allowed states. (Default: None)
|
1265
|
-
execution_delta : datetime.timedelta
|
1266
|
-
time difference with the previous execution to look at,
|
1267
|
-
the default is the same logical date as the current task or DAG. (Default: None)
|
1268
|
-
check_existence: bool
|
1269
|
-
Set to True to check if the external task exists or check if
|
1270
|
-
the DAG to wait for exists. (Default: True)
|
1271
|
-
"""
|
1272
|
-
...
|
1273
|
-
|
1274
|
-
@typing.overload
|
1275
|
-
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]]:
|
1276
|
-
"""
|
1277
|
-
Specifies the Conda environment for all steps of the flow.
|
1278
|
-
|
1279
|
-
Use `@conda_base` to set common libraries required by all
|
1280
|
-
steps and use `@conda` to specify step-specific additions.
|
1281
|
-
|
1282
|
-
Parameters
|
1283
|
-
----------
|
1284
|
-
packages : Dict[str, str], default {}
|
1285
|
-
Packages to use for this flow. The key is the name of the package
|
1286
|
-
and the value is the version to use.
|
1287
|
-
libraries : Dict[str, str], default {}
|
1288
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1289
|
-
python : str, optional, default None
|
1290
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1291
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1292
|
-
disabled : bool, default False
|
1293
|
-
If set to True, disables Conda.
|
1294
|
-
"""
|
1295
|
-
...
|
1296
|
-
|
1297
|
-
@typing.overload
|
1298
|
-
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1299
|
-
...
|
1300
|
-
|
1301
|
-
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):
|
1302
|
-
"""
|
1303
|
-
Specifies the Conda environment for all steps of the flow.
|
1304
|
-
|
1305
|
-
Use `@conda_base` to set common libraries required by all
|
1306
|
-
steps and use `@conda` to specify step-specific additions.
|
1307
|
-
|
1308
|
-
Parameters
|
1309
|
-
----------
|
1310
|
-
packages : Dict[str, str], default {}
|
1311
|
-
Packages to use for this flow. The key is the name of the package
|
1312
|
-
and the value is the version to use.
|
1313
|
-
libraries : Dict[str, str], default {}
|
1314
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1315
|
-
python : str, optional, default None
|
1316
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1317
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1318
|
-
disabled : bool, default False
|
1319
|
-
If set to True, disables Conda.
|
1320
|
-
"""
|
1321
|
-
...
|
1322
|
-
|
1323
1372
|
@typing.overload
|
1324
1373
|
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]]:
|
1325
1374
|
"""
|
@@ -1415,55 +1464,6 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
1415
1464
|
"""
|
1416
1465
|
...
|
1417
1466
|
|
1418
|
-
@typing.overload
|
1419
|
-
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]]:
|
1420
|
-
"""
|
1421
|
-
Specifies the times when the flow should be run when running on a
|
1422
|
-
production scheduler.
|
1423
|
-
|
1424
|
-
Parameters
|
1425
|
-
----------
|
1426
|
-
hourly : bool, default False
|
1427
|
-
Run the workflow hourly.
|
1428
|
-
daily : bool, default True
|
1429
|
-
Run the workflow daily.
|
1430
|
-
weekly : bool, default False
|
1431
|
-
Run the workflow weekly.
|
1432
|
-
cron : str, optional, default None
|
1433
|
-
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1434
|
-
specified by this expression.
|
1435
|
-
timezone : str, optional, default None
|
1436
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1437
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1438
|
-
"""
|
1439
|
-
...
|
1440
|
-
|
1441
|
-
@typing.overload
|
1442
|
-
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1443
|
-
...
|
1444
|
-
|
1445
|
-
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):
|
1446
|
-
"""
|
1447
|
-
Specifies the times when the flow should be run when running on a
|
1448
|
-
production scheduler.
|
1449
|
-
|
1450
|
-
Parameters
|
1451
|
-
----------
|
1452
|
-
hourly : bool, default False
|
1453
|
-
Run the workflow hourly.
|
1454
|
-
daily : bool, default True
|
1455
|
-
Run the workflow daily.
|
1456
|
-
weekly : bool, default False
|
1457
|
-
Run the workflow weekly.
|
1458
|
-
cron : str, optional, default None
|
1459
|
-
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1460
|
-
specified by this expression.
|
1461
|
-
timezone : str, optional, default None
|
1462
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1463
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1464
|
-
"""
|
1465
|
-
...
|
1466
|
-
|
1467
1467
|
def namespace(ns: typing.Optional[str]) -> typing.Optional[str]:
|
1468
1468
|
"""
|
1469
1469
|
Switch namespace to the one provided.
|