ob-metaflow-stubs 6.0.3.108__py2.py3-none-any.whl → 6.0.3.109__py2.py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- metaflow-stubs/__init__.pyi +494 -494
- metaflow-stubs/cards.pyi +5 -5
- metaflow-stubs/cli.pyi +3 -3
- metaflow-stubs/client/__init__.pyi +4 -4
- metaflow-stubs/client/core.pyi +7 -7
- metaflow-stubs/client/filecache.pyi +3 -3
- metaflow-stubs/clone_util.pyi +2 -2
- metaflow-stubs/events.pyi +3 -3
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +5 -5
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +5 -5
- metaflow-stubs/info_file.pyi +2 -2
- metaflow-stubs/metadata/metadata.pyi +3 -3
- metaflow-stubs/metadata/util.pyi +2 -2
- metaflow-stubs/metaflow_config.pyi +4 -2
- metaflow-stubs/metaflow_current.pyi +85 -85
- metaflow-stubs/mflog/mflog.pyi +2 -2
- metaflow-stubs/multicore_utils.pyi +2 -2
- metaflow-stubs/parameters.pyi +4 -4
- metaflow-stubs/plugins/__init__.pyi +5 -3
- metaflow-stubs/plugins/airflow/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +2 -2
- metaflow-stubs/plugins/airflow/exception.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +3 -3
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +3 -3
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +3 -3
- metaflow-stubs/plugins/argo/__init__.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows.pyi +4 -4
- metaflow-stubs/plugins/argo/argo_workflows_cli.pyi +5 -5
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +5 -5
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +131 -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_client.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +3 -3
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/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_client.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +6 -3
- 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 +3 -3
- 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 +5 -5
- metaflow-stubs/plugins/cards/card_client.pyi +3 -3
- metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
- metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +4 -4
- metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/components.pyi +4 -4
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +3 -3
- metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
- metaflow-stubs/plugins/cards/component_serializer.pyi +4 -4
- metaflow-stubs/plugins/cards/exception.pyi +2 -2
- metaflow-stubs/plugins/catch_decorator.pyi +3 -3
- metaflow-stubs/plugins/datatools/__init__.pyi +3 -3
- metaflow-stubs/plugins/datatools/local.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +3 -3
- metaflow-stubs/plugins/datatools/s3/s3.pyi +6 -6
- 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 +3 -3
- 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/kube_utils.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +3 -3
- 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 +3 -3
- 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 +4 -4
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +2 -2
- metaflow-stubs/plugins/pypi/utils.pyi +2 -2
- metaflow-stubs/plugins/resources_decorator.pyi +2 -2
- metaflow-stubs/plugins/retry_decorator.pyi +2 -2
- metaflow-stubs/plugins/secrets/__init__.pyi +2 -2
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
- metaflow-stubs/plugins/storage_executor.pyi +2 -2
- metaflow-stubs/plugins/tag_cli.pyi +5 -5
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +3 -3
- metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
- 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/deployer.pyi +20 -4
- metaflow-stubs/runner/metaflow_runner.pyi +5 -5
- metaflow-stubs/runner/nbdeploy.pyi +2 -2
- metaflow-stubs/runner/nbrun.pyi +2 -2
- metaflow-stubs/runner/subprocess_manager.pyi +2 -2
- metaflow-stubs/runner/utils.pyi +2 -2
- metaflow-stubs/system/__init__.pyi +3 -3
- metaflow-stubs/system/system_logger.pyi +2 -2
- metaflow-stubs/system/system_monitor.pyi +3 -3
- metaflow-stubs/tagging_util.pyi +2 -2
- metaflow-stubs/tuple_util.pyi +2 -2
- {ob_metaflow_stubs-6.0.3.108.dist-info → ob_metaflow_stubs-6.0.3.109.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-6.0.3.109.dist-info/RECORD +140 -0
- ob_metaflow_stubs-6.0.3.108.dist-info/RECORD +0 -140
- {ob_metaflow_stubs-6.0.3.108.dist-info → ob_metaflow_stubs-6.0.3.109.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-6.0.3.108.dist-info → ob_metaflow_stubs-6.0.3.109.dist-info}/top_level.txt +0 -0
metaflow-stubs/__init__.pyi
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
##################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.12.25.
|
4
|
-
# Generated on 2024-10-
|
3
|
+
# MF version: 2.12.25.2+obcheckpoint(0.0.11);ob(v1) #
|
4
|
+
# Generated on 2024-10-15T21:29:55.306291 #
|
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.
|
11
|
+
import metaflow.flowspec
|
12
12
|
import metaflow.metaflow_current
|
13
13
|
import metaflow.datastore.inputs
|
14
|
-
import metaflow_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures
|
15
14
|
import typing
|
16
|
-
import
|
17
|
-
import
|
15
|
+
import metaflow_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures
|
16
|
+
import metaflow.client.core
|
17
|
+
import metaflow.events
|
18
18
|
import metaflow.runner.metaflow_runner
|
19
19
|
import metaflow.parameters
|
20
|
-
import metaflow.
|
21
|
-
import
|
20
|
+
import metaflow._vendor.click.types
|
21
|
+
import datetime
|
22
22
|
FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
|
23
23
|
StepFlag = typing.NewType("StepFlag", bool)
|
24
24
|
|
@@ -513,59 +513,111 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
513
513
|
...
|
514
514
|
|
515
515
|
@typing.overload
|
516
|
-
def
|
516
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
517
517
|
"""
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
518
|
+
Decorator prototype for all step decorators. This function gets specialized
|
519
|
+
and imported for all decorators types by _import_plugin_decorators().
|
520
|
+
"""
|
521
|
+
...
|
522
|
+
|
523
|
+
@typing.overload
|
524
|
+
def parallel(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
525
|
+
...
|
526
|
+
|
527
|
+
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
528
|
+
"""
|
529
|
+
Decorator prototype for all step decorators. This function gets specialized
|
530
|
+
and imported for all decorators types by _import_plugin_decorators().
|
531
|
+
"""
|
532
|
+
...
|
533
|
+
|
534
|
+
@typing.overload
|
535
|
+
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]]]:
|
536
|
+
"""
|
537
|
+
Specifies the Conda environment for the step.
|
525
538
|
|
526
|
-
|
527
|
-
|
539
|
+
Information in this decorator will augment any
|
540
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
541
|
+
you can use `@conda_base` to set packages required by all
|
542
|
+
steps and use `@conda` to specify step-specific overrides.
|
528
543
|
|
529
544
|
Parameters
|
530
545
|
----------
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
546
|
+
packages : Dict[str, str], default {}
|
547
|
+
Packages to use for this step. The key is the name of the package
|
548
|
+
and the value is the version to use.
|
549
|
+
libraries : Dict[str, str], default {}
|
550
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
551
|
+
python : str, optional, default None
|
552
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
553
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
554
|
+
disabled : bool, default False
|
555
|
+
If set to True, disables @conda.
|
537
556
|
"""
|
538
557
|
...
|
539
558
|
|
540
559
|
@typing.overload
|
541
|
-
def
|
560
|
+
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
542
561
|
...
|
543
562
|
|
544
563
|
@typing.overload
|
545
|
-
def
|
564
|
+
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
546
565
|
...
|
547
566
|
|
548
|
-
def
|
567
|
+
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):
|
549
568
|
"""
|
550
|
-
Specifies
|
569
|
+
Specifies the Conda environment for the step.
|
551
570
|
|
552
|
-
|
571
|
+
Information in this decorator will augment any
|
572
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
573
|
+
you can use `@conda_base` to set packages required by all
|
574
|
+
steps and use `@conda` to specify step-specific overrides.
|
553
575
|
|
554
|
-
|
555
|
-
|
556
|
-
|
576
|
+
Parameters
|
577
|
+
----------
|
578
|
+
packages : Dict[str, str], default {}
|
579
|
+
Packages to use for this step. The key is the name of the package
|
580
|
+
and the value is the version to use.
|
581
|
+
libraries : Dict[str, str], default {}
|
582
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
583
|
+
python : str, optional, default None
|
584
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
585
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
586
|
+
disabled : bool, default False
|
587
|
+
If set to True, disables @conda.
|
588
|
+
"""
|
589
|
+
...
|
590
|
+
|
591
|
+
@typing.overload
|
592
|
+
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]]]:
|
593
|
+
"""
|
594
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
595
|
+
the execution of a step.
|
557
596
|
|
558
|
-
|
559
|
-
|
597
|
+
Parameters
|
598
|
+
----------
|
599
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
600
|
+
List of secret specs, defining how the secrets are to be retrieved
|
601
|
+
"""
|
602
|
+
...
|
603
|
+
|
604
|
+
@typing.overload
|
605
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
606
|
+
...
|
607
|
+
|
608
|
+
@typing.overload
|
609
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
610
|
+
...
|
611
|
+
|
612
|
+
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]]] = []):
|
613
|
+
"""
|
614
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
615
|
+
the execution of a step.
|
560
616
|
|
561
617
|
Parameters
|
562
618
|
----------
|
563
|
-
|
564
|
-
|
565
|
-
minutes : int, default 0
|
566
|
-
Number of minutes to wait prior to timing out.
|
567
|
-
hours : int, default 0
|
568
|
-
Number of hours to wait prior to timing out.
|
619
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
620
|
+
List of secret specs, defining how the secrets are to be retrieved
|
569
621
|
"""
|
570
622
|
...
|
571
623
|
|
@@ -685,187 +737,108 @@ def catch(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
685
737
|
...
|
686
738
|
|
687
739
|
@typing.overload
|
688
|
-
def
|
740
|
+
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]]]:
|
689
741
|
"""
|
690
|
-
Specifies
|
742
|
+
Specifies a timeout for your step.
|
691
743
|
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
744
|
+
This decorator is useful if this step may hang indefinitely.
|
745
|
+
|
746
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
747
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
748
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
749
|
+
|
750
|
+
Note that all the values specified in parameters are added together so if you specify
|
751
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
696
752
|
|
697
753
|
Parameters
|
698
754
|
----------
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
755
|
+
seconds : int, default 0
|
756
|
+
Number of seconds to wait prior to timing out.
|
757
|
+
minutes : int, default 0
|
758
|
+
Number of minutes to wait prior to timing out.
|
759
|
+
hours : int, default 0
|
760
|
+
Number of hours to wait prior to timing out.
|
705
761
|
"""
|
706
762
|
...
|
707
763
|
|
708
764
|
@typing.overload
|
709
|
-
def
|
765
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
710
766
|
...
|
711
767
|
|
712
768
|
@typing.overload
|
713
|
-
def
|
769
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
714
770
|
...
|
715
771
|
|
716
|
-
def
|
772
|
+
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):
|
717
773
|
"""
|
718
|
-
Specifies
|
774
|
+
Specifies a timeout for your step.
|
719
775
|
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
776
|
+
This decorator is useful if this step may hang indefinitely.
|
777
|
+
|
778
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
779
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
780
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
781
|
+
|
782
|
+
Note that all the values specified in parameters are added together so if you specify
|
783
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
724
784
|
|
725
785
|
Parameters
|
726
786
|
----------
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
787
|
+
seconds : int, default 0
|
788
|
+
Number of seconds to wait prior to timing out.
|
789
|
+
minutes : int, default 0
|
790
|
+
Number of minutes to wait prior to timing out.
|
791
|
+
hours : int, default 0
|
792
|
+
Number of hours to wait prior to timing out.
|
733
793
|
"""
|
734
794
|
...
|
735
795
|
|
736
796
|
@typing.overload
|
737
|
-
def
|
797
|
+
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]]]:
|
738
798
|
"""
|
739
|
-
|
740
|
-
|
741
|
-
Use `@resources` to specify the resource requirements
|
742
|
-
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
799
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
743
800
|
|
744
|
-
|
745
|
-
```
|
746
|
-
python myflow.py run --with batch
|
747
|
-
```
|
748
|
-
or
|
749
|
-
```
|
750
|
-
python myflow.py run --with kubernetes
|
751
|
-
```
|
752
|
-
which executes the flow on the desired system using the
|
753
|
-
requirements specified in `@resources`.
|
801
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
754
802
|
|
755
803
|
Parameters
|
756
804
|
----------
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
This parameter maps to the `--shm-size` option in Docker.
|
805
|
+
type : str, default 'default'
|
806
|
+
Card type.
|
807
|
+
id : str, optional, default None
|
808
|
+
If multiple cards are present, use this id to identify this card.
|
809
|
+
options : Dict[str, Any], default {}
|
810
|
+
Options passed to the card. The contents depend on the card type.
|
811
|
+
timeout : int, default 45
|
812
|
+
Interrupt reporting if it takes more than this many seconds.
|
813
|
+
|
814
|
+
|
768
815
|
"""
|
769
816
|
...
|
770
817
|
|
771
818
|
@typing.overload
|
772
|
-
def
|
819
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
773
820
|
...
|
774
821
|
|
775
822
|
@typing.overload
|
776
|
-
def
|
823
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
777
824
|
...
|
778
825
|
|
779
|
-
def
|
826
|
+
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):
|
780
827
|
"""
|
781
|
-
|
782
|
-
|
783
|
-
Use `@resources` to specify the resource requirements
|
784
|
-
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
828
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
785
829
|
|
786
|
-
|
787
|
-
```
|
788
|
-
python myflow.py run --with batch
|
789
|
-
```
|
790
|
-
or
|
791
|
-
```
|
792
|
-
python myflow.py run --with kubernetes
|
793
|
-
```
|
794
|
-
which executes the flow on the desired system using the
|
795
|
-
requirements specified in `@resources`.
|
830
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
796
831
|
|
797
832
|
Parameters
|
798
833
|
----------
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
shared_memory : int, optional, default None
|
808
|
-
The value for the size (in MiB) of the /dev/shm volume for this step.
|
809
|
-
This parameter maps to the `--shm-size` option in Docker.
|
810
|
-
"""
|
811
|
-
...
|
812
|
-
|
813
|
-
@typing.overload
|
814
|
-
def model(*, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, temp_dir_root: 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]]]:
|
815
|
-
"""
|
816
|
-
Enables loading / saving of models within a step.
|
817
|
-
|
818
|
-
|
819
|
-
Parameters
|
820
|
-
----------
|
821
|
-
load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
|
822
|
-
Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
|
823
|
-
These artifact names give to `load` be reference objects or reference `key` string's from objects created by:
|
824
|
-
- `current.checkpoint`
|
825
|
-
- `current.model`
|
826
|
-
- `current.huggingface_hub`
|
827
|
-
|
828
|
-
If a list of tuples is provided, the first element is the artifact name and the second element is the path the artifact needs be unpacked on
|
829
|
-
the local filesystem. If the second element is None, the artifact will be unpacked in the current working directory.
|
830
|
-
If a string is provided, then the artifact corresponding to that name will be loaded in the current working directory.
|
831
|
-
|
832
|
-
temp_dir_root : str, default: None
|
833
|
-
The root directory under which `current.model.loaded` will store loaded models
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
"""
|
838
|
-
...
|
839
|
-
|
840
|
-
@typing.overload
|
841
|
-
def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
842
|
-
...
|
843
|
-
|
844
|
-
@typing.overload
|
845
|
-
def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
846
|
-
...
|
847
|
-
|
848
|
-
def model(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, temp_dir_root: str = None):
|
849
|
-
"""
|
850
|
-
Enables loading / saving of models within a step.
|
851
|
-
|
852
|
-
|
853
|
-
Parameters
|
854
|
-
----------
|
855
|
-
load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
|
856
|
-
Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
|
857
|
-
These artifact names give to `load` be reference objects or reference `key` string's from objects created by:
|
858
|
-
- `current.checkpoint`
|
859
|
-
- `current.model`
|
860
|
-
- `current.huggingface_hub`
|
861
|
-
|
862
|
-
If a list of tuples is provided, the first element is the artifact name and the second element is the path the artifact needs be unpacked on
|
863
|
-
the local filesystem. If the second element is None, the artifact will be unpacked in the current working directory.
|
864
|
-
If a string is provided, then the artifact corresponding to that name will be loaded in the current working directory.
|
865
|
-
|
866
|
-
temp_dir_root : str, default: None
|
867
|
-
The root directory under which `current.model.loaded` will store loaded models
|
868
|
-
|
834
|
+
type : str, default 'default'
|
835
|
+
Card type.
|
836
|
+
id : str, optional, default None
|
837
|
+
If multiple cards are present, use this id to identify this card.
|
838
|
+
options : Dict[str, Any], default {}
|
839
|
+
Options passed to the card. The contents depend on the card type.
|
840
|
+
timeout : int, default 45
|
841
|
+
Interrupt reporting if it takes more than this many seconds.
|
869
842
|
|
870
843
|
|
871
844
|
"""
|
@@ -889,111 +862,112 @@ def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepF
|
|
889
862
|
...
|
890
863
|
|
891
864
|
@typing.overload
|
892
|
-
def
|
865
|
+
def checkpoint(*, load_policy: str = "fresh", temp_dir_root: 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]]]:
|
893
866
|
"""
|
894
|
-
|
895
|
-
|
867
|
+
Enables checkpointing for a step.
|
868
|
+
|
896
869
|
|
897
870
|
Parameters
|
898
871
|
----------
|
899
|
-
|
900
|
-
|
872
|
+
load_policy : str, default: "fresh"
|
873
|
+
The policy for loading the checkpoint. The following policies are supported:
|
874
|
+
- "eager": Loads the the latest available checkpoint within the namespace.
|
875
|
+
With this mode, the latest checkpoint written by any previous task (can be even a different run) of the step
|
876
|
+
will be loaded at the start of the task.
|
877
|
+
- "none": Do not load any checkpoint
|
878
|
+
- "fresh": Loads the lastest checkpoint created within the running Task.
|
879
|
+
This mode helps loading checkpoints across various retry attempts of the same task.
|
880
|
+
With this mode, no checkpoint will be loaded at the start of a task but any checkpoints
|
881
|
+
created within the task will be loaded when the task is retries execution on failure.
|
882
|
+
|
883
|
+
temp_dir_root : str, default: None
|
884
|
+
The root directory under which `current.checkpoint.directory` will be created.
|
885
|
+
|
886
|
+
|
887
|
+
|
901
888
|
"""
|
902
889
|
...
|
903
890
|
|
904
891
|
@typing.overload
|
905
|
-
def
|
892
|
+
def checkpoint(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
906
893
|
...
|
907
894
|
|
908
895
|
@typing.overload
|
909
|
-
def
|
896
|
+
def checkpoint(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
910
897
|
...
|
911
898
|
|
912
|
-
def
|
899
|
+
def checkpoint(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, load_policy: str = "fresh", temp_dir_root: str = None):
|
913
900
|
"""
|
914
|
-
|
915
|
-
|
901
|
+
Enables checkpointing for a step.
|
902
|
+
|
916
903
|
|
917
904
|
Parameters
|
918
905
|
----------
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
937
|
-
"""
|
938
|
-
Decorator prototype for all step decorators. This function gets specialized
|
939
|
-
and imported for all decorators types by _import_plugin_decorators().
|
906
|
+
load_policy : str, default: "fresh"
|
907
|
+
The policy for loading the checkpoint. The following policies are supported:
|
908
|
+
- "eager": Loads the the latest available checkpoint within the namespace.
|
909
|
+
With this mode, the latest checkpoint written by any previous task (can be even a different run) of the step
|
910
|
+
will be loaded at the start of the task.
|
911
|
+
- "none": Do not load any checkpoint
|
912
|
+
- "fresh": Loads the lastest checkpoint created within the running Task.
|
913
|
+
This mode helps loading checkpoints across various retry attempts of the same task.
|
914
|
+
With this mode, no checkpoint will be loaded at the start of a task but any checkpoints
|
915
|
+
created within the task will be loaded when the task is retries execution on failure.
|
916
|
+
|
917
|
+
temp_dir_root : str, default: None
|
918
|
+
The root directory under which `current.checkpoint.directory` will be created.
|
919
|
+
|
920
|
+
|
921
|
+
|
940
922
|
"""
|
941
923
|
...
|
942
924
|
|
943
925
|
@typing.overload
|
944
|
-
def
|
926
|
+
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]]]:
|
945
927
|
"""
|
946
|
-
Specifies the
|
928
|
+
Specifies the PyPI packages for the step.
|
947
929
|
|
948
930
|
Information in this decorator will augment any
|
949
|
-
attributes set in the `@
|
950
|
-
you can use `@
|
951
|
-
steps and use `@
|
931
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
932
|
+
you can use `@pypi_base` to set packages required by all
|
933
|
+
steps and use `@pypi` to specify step-specific overrides.
|
952
934
|
|
953
935
|
Parameters
|
954
936
|
----------
|
955
|
-
packages : Dict[str, str], default {}
|
937
|
+
packages : Dict[str, str], default: {}
|
956
938
|
Packages to use for this step. The key is the name of the package
|
957
939
|
and the value is the version to use.
|
958
|
-
|
959
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
960
|
-
python : str, optional, default None
|
940
|
+
python : str, optional, default: None
|
961
941
|
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
962
942
|
that the version used will correspond to the version of the Python interpreter used to start the run.
|
963
|
-
disabled : bool, default False
|
964
|
-
If set to True, disables @conda.
|
965
943
|
"""
|
966
944
|
...
|
967
945
|
|
968
946
|
@typing.overload
|
969
|
-
def
|
947
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
970
948
|
...
|
971
949
|
|
972
950
|
@typing.overload
|
973
|
-
def
|
951
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
974
952
|
...
|
975
953
|
|
976
|
-
def
|
954
|
+
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):
|
977
955
|
"""
|
978
|
-
Specifies the
|
956
|
+
Specifies the PyPI packages for the step.
|
979
957
|
|
980
958
|
Information in this decorator will augment any
|
981
|
-
attributes set in the `@
|
982
|
-
you can use `@
|
983
|
-
steps and use `@
|
959
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
960
|
+
you can use `@pypi_base` to set packages required by all
|
961
|
+
steps and use `@pypi` to specify step-specific overrides.
|
984
962
|
|
985
963
|
Parameters
|
986
964
|
----------
|
987
|
-
packages : Dict[str, str], default {}
|
965
|
+
packages : Dict[str, str], default: {}
|
988
966
|
Packages to use for this step. The key is the name of the package
|
989
967
|
and the value is the version to use.
|
990
|
-
|
991
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
992
|
-
python : str, optional, default None
|
968
|
+
python : str, optional, default: None
|
993
969
|
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
994
970
|
that the version used will correspond to the version of the Python interpreter used to start the run.
|
995
|
-
disabled : bool, default False
|
996
|
-
If set to True, disables @conda.
|
997
971
|
"""
|
998
972
|
...
|
999
973
|
|
@@ -1029,63 +1003,79 @@ def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], Non
|
|
1029
1003
|
...
|
1030
1004
|
|
1031
1005
|
@typing.overload
|
1032
|
-
def
|
1006
|
+
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]]]:
|
1033
1007
|
"""
|
1034
|
-
|
1008
|
+
Specifies the resources needed when executing this step.
|
1009
|
+
|
1010
|
+
Use `@resources` to specify the resource requirements
|
1011
|
+
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
1035
1012
|
|
1013
|
+
You can choose the compute layer on the command line by executing e.g.
|
1014
|
+
```
|
1015
|
+
python myflow.py run --with batch
|
1016
|
+
```
|
1017
|
+
or
|
1018
|
+
```
|
1019
|
+
python myflow.py run --with kubernetes
|
1020
|
+
```
|
1021
|
+
which executes the flow on the desired system using the
|
1022
|
+
requirements specified in `@resources`.
|
1036
1023
|
|
1037
1024
|
Parameters
|
1038
1025
|
----------
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
temp_dir_root : str, default: None
|
1051
|
-
The root directory under which `current.checkpoint.directory` will be created.
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1026
|
+
cpu : int, default 1
|
1027
|
+
Number of CPUs required for this step.
|
1028
|
+
gpu : int, default 0
|
1029
|
+
Number of GPUs required for this step.
|
1030
|
+
disk : int, optional, default None
|
1031
|
+
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
1032
|
+
memory : int, default 4096
|
1033
|
+
Memory size (in MB) required for this step.
|
1034
|
+
shared_memory : int, optional, default None
|
1035
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
1036
|
+
This parameter maps to the `--shm-size` option in Docker.
|
1055
1037
|
"""
|
1056
1038
|
...
|
1057
1039
|
|
1058
1040
|
@typing.overload
|
1059
|
-
def
|
1041
|
+
def resources(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1060
1042
|
...
|
1061
1043
|
|
1062
1044
|
@typing.overload
|
1063
|
-
def
|
1045
|
+
def resources(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1064
1046
|
...
|
1065
1047
|
|
1066
|
-
def
|
1048
|
+
def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, cpu: int = 1, gpu: int = 0, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None):
|
1067
1049
|
"""
|
1068
|
-
|
1050
|
+
Specifies the resources needed when executing this step.
|
1051
|
+
|
1052
|
+
Use `@resources` to specify the resource requirements
|
1053
|
+
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
1069
1054
|
|
1055
|
+
You can choose the compute layer on the command line by executing e.g.
|
1056
|
+
```
|
1057
|
+
python myflow.py run --with batch
|
1058
|
+
```
|
1059
|
+
or
|
1060
|
+
```
|
1061
|
+
python myflow.py run --with kubernetes
|
1062
|
+
```
|
1063
|
+
which executes the flow on the desired system using the
|
1064
|
+
requirements specified in `@resources`.
|
1070
1065
|
|
1071
1066
|
Parameters
|
1072
1067
|
----------
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
temp_dir_root : str, default: None
|
1085
|
-
The root directory under which `current.checkpoint.directory` will be created.
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1068
|
+
cpu : int, default 1
|
1069
|
+
Number of CPUs required for this step.
|
1070
|
+
gpu : int, default 0
|
1071
|
+
Number of GPUs required for this step.
|
1072
|
+
disk : int, optional, default None
|
1073
|
+
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
1074
|
+
memory : int, default 4096
|
1075
|
+
Memory size (in MB) required for this step.
|
1076
|
+
shared_memory : int, optional, default None
|
1077
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
1078
|
+
This parameter maps to the `--shm-size` option in Docker.
|
1089
1079
|
"""
|
1090
1080
|
...
|
1091
1081
|
|
@@ -1143,51 +1133,61 @@ def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], ty
|
|
1143
1133
|
...
|
1144
1134
|
|
1145
1135
|
@typing.overload
|
1146
|
-
def
|
1136
|
+
def model(*, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, temp_dir_root: 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]]]:
|
1147
1137
|
"""
|
1148
|
-
|
1138
|
+
Enables loading / saving of models within a step.
|
1149
1139
|
|
1150
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
1151
1140
|
|
1152
1141
|
Parameters
|
1153
1142
|
----------
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1143
|
+
load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
|
1144
|
+
Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
|
1145
|
+
These artifact names give to `load` be reference objects or reference `key` string's from objects created by:
|
1146
|
+
- `current.checkpoint`
|
1147
|
+
- `current.model`
|
1148
|
+
- `current.huggingface_hub`
|
1149
|
+
|
1150
|
+
If a list of tuples is provided, the first element is the artifact name and the second element is the path the artifact needs be unpacked on
|
1151
|
+
the local filesystem. If the second element is None, the artifact will be unpacked in the current working directory.
|
1152
|
+
If a string is provided, then the artifact corresponding to that name will be loaded in the current working directory.
|
1153
|
+
|
1154
|
+
temp_dir_root : str, default: None
|
1155
|
+
The root directory under which `current.model.loaded` will store loaded models
|
1156
|
+
|
1162
1157
|
|
1163
1158
|
|
1164
1159
|
"""
|
1165
1160
|
...
|
1166
1161
|
|
1167
1162
|
@typing.overload
|
1168
|
-
def
|
1163
|
+
def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1169
1164
|
...
|
1170
1165
|
|
1171
1166
|
@typing.overload
|
1172
|
-
def
|
1167
|
+
def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1173
1168
|
...
|
1174
1169
|
|
1175
|
-
def
|
1170
|
+
def model(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, load: typing.Union[typing.List[str], str, typing.List[typing.Tuple[str, typing.Optional[str]]]] = None, temp_dir_root: str = None):
|
1176
1171
|
"""
|
1177
|
-
|
1172
|
+
Enables loading / saving of models within a step.
|
1178
1173
|
|
1179
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
1180
1174
|
|
1181
1175
|
Parameters
|
1182
1176
|
----------
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1177
|
+
load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
|
1178
|
+
Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
|
1179
|
+
These artifact names give to `load` be reference objects or reference `key` string's from objects created by:
|
1180
|
+
- `current.checkpoint`
|
1181
|
+
- `current.model`
|
1182
|
+
- `current.huggingface_hub`
|
1183
|
+
|
1184
|
+
If a list of tuples is provided, the first element is the artifact name and the second element is the path the artifact needs be unpacked on
|
1185
|
+
the local filesystem. If the second element is None, the artifact will be unpacked in the current working directory.
|
1186
|
+
If a string is provided, then the artifact corresponding to that name will be loaded in the current working directory.
|
1187
|
+
|
1188
|
+
temp_dir_root : str, default: None
|
1189
|
+
The root directory under which `current.model.loaded` will store loaded models
|
1190
|
+
|
1191
1191
|
|
1192
1192
|
|
1193
1193
|
"""
|
@@ -1233,103 +1233,67 @@ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packag
|
|
1233
1233
|
...
|
1234
1234
|
|
1235
1235
|
@typing.overload
|
1236
|
-
def
|
1236
|
+
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]]:
|
1237
1237
|
"""
|
1238
|
-
Specifies the
|
1239
|
-
|
1240
|
-
```
|
1241
|
-
@trigger_on_finish(flow='FooFlow')
|
1242
|
-
```
|
1243
|
-
or
|
1244
|
-
```
|
1245
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1246
|
-
```
|
1247
|
-
This decorator respects the @project decorator and triggers the flow
|
1248
|
-
when upstream runs within the same namespace complete successfully
|
1249
|
-
|
1250
|
-
Additionally, you can specify project aware upstream flow dependencies
|
1251
|
-
by specifying the fully qualified project_flow_name.
|
1252
|
-
```
|
1253
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1254
|
-
```
|
1255
|
-
or
|
1256
|
-
```
|
1257
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1258
|
-
```
|
1259
|
-
|
1260
|
-
You can also specify just the project or project branch (other values will be
|
1261
|
-
inferred from the current project or project branch):
|
1262
|
-
```
|
1263
|
-
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1264
|
-
```
|
1238
|
+
Specifies the Conda environment for all steps of the flow.
|
1265
1239
|
|
1266
|
-
|
1267
|
-
|
1268
|
-
- `user.bob`
|
1269
|
-
- `test.my_experiment`
|
1270
|
-
- `prod.staging`
|
1240
|
+
Use `@conda_base` to set common libraries required by all
|
1241
|
+
steps and use `@conda` to specify step-specific additions.
|
1271
1242
|
|
1272
1243
|
Parameters
|
1273
1244
|
----------
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1245
|
+
packages : Dict[str, str], default {}
|
1246
|
+
Packages to use for this flow. The key is the name of the package
|
1247
|
+
and the value is the version to use.
|
1248
|
+
libraries : Dict[str, str], default {}
|
1249
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1250
|
+
python : str, optional, default None
|
1251
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1252
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1253
|
+
disabled : bool, default False
|
1254
|
+
If set to True, disables Conda.
|
1282
1255
|
"""
|
1283
1256
|
...
|
1284
1257
|
|
1285
1258
|
@typing.overload
|
1286
|
-
def
|
1259
|
+
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1287
1260
|
...
|
1288
1261
|
|
1289
|
-
def
|
1262
|
+
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):
|
1290
1263
|
"""
|
1291
|
-
Specifies the
|
1292
|
-
|
1293
|
-
```
|
1294
|
-
@trigger_on_finish(flow='FooFlow')
|
1295
|
-
```
|
1296
|
-
or
|
1297
|
-
```
|
1298
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1299
|
-
```
|
1300
|
-
This decorator respects the @project decorator and triggers the flow
|
1301
|
-
when upstream runs within the same namespace complete successfully
|
1264
|
+
Specifies the Conda environment for all steps of the flow.
|
1302
1265
|
|
1303
|
-
|
1304
|
-
|
1305
|
-
```
|
1306
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1307
|
-
```
|
1308
|
-
or
|
1309
|
-
```
|
1310
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1311
|
-
```
|
1266
|
+
Use `@conda_base` to set common libraries required by all
|
1267
|
+
steps and use `@conda` to specify step-specific additions.
|
1312
1268
|
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1269
|
+
Parameters
|
1270
|
+
----------
|
1271
|
+
packages : Dict[str, str], default {}
|
1272
|
+
Packages to use for this flow. The key is the name of the package
|
1273
|
+
and the value is the version to use.
|
1274
|
+
libraries : Dict[str, str], default {}
|
1275
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1276
|
+
python : str, optional, default None
|
1277
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1278
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1279
|
+
disabled : bool, default False
|
1280
|
+
If set to True, disables Conda.
|
1281
|
+
"""
|
1282
|
+
...
|
1283
|
+
|
1284
|
+
def project(*, name: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1285
|
+
"""
|
1286
|
+
Specifies what flows belong to the same project.
|
1318
1287
|
|
1319
|
-
|
1320
|
-
|
1321
|
-
- `user.bob`
|
1322
|
-
- `test.my_experiment`
|
1323
|
-
- `prod.staging`
|
1288
|
+
A project-specific namespace is created for all flows that
|
1289
|
+
use the same `@project(name)`.
|
1324
1290
|
|
1325
1291
|
Parameters
|
1326
1292
|
----------
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
options : Dict[str, Any], default {}
|
1332
|
-
Backend-specific configuration for tuning eventing behavior.
|
1293
|
+
name : str
|
1294
|
+
Project name. Make sure that the name is unique amongst all
|
1295
|
+
projects that use the same production scheduler. The name may
|
1296
|
+
contain only lowercase alphanumeric characters and underscores.
|
1333
1297
|
|
1334
1298
|
|
1335
1299
|
"""
|
@@ -1430,6 +1394,48 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
1430
1394
|
"""
|
1431
1395
|
...
|
1432
1396
|
|
1397
|
+
def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, bucket_key: typing.Union[str, typing.List[str]], bucket_name: str, wildcard_match: bool, aws_conn_id: str, verify: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1398
|
+
"""
|
1399
|
+
The `@airflow_s3_key_sensor` decorator attaches a Airflow [S3KeySensor](https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/_api/airflow/providers/amazon/aws/sensors/s3/index.html#airflow.providers.amazon.aws.sensors.s3.S3KeySensor)
|
1400
|
+
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
1401
|
+
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1402
|
+
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1403
|
+
starts only after all sensors finish.
|
1404
|
+
|
1405
|
+
Parameters
|
1406
|
+
----------
|
1407
|
+
timeout : int
|
1408
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
1409
|
+
poke_interval : int
|
1410
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
1411
|
+
mode : str
|
1412
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1413
|
+
exponential_backoff : bool
|
1414
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1415
|
+
pool : str
|
1416
|
+
the slot pool this task should run in,
|
1417
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1418
|
+
soft_fail : bool
|
1419
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1420
|
+
name : str
|
1421
|
+
Name of the sensor on Airflow
|
1422
|
+
description : str
|
1423
|
+
Description of sensor in the Airflow UI
|
1424
|
+
bucket_key : Union[str, List[str]]
|
1425
|
+
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
1426
|
+
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
1427
|
+
bucket_name : str
|
1428
|
+
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
1429
|
+
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
1430
|
+
wildcard_match : bool
|
1431
|
+
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
1432
|
+
aws_conn_id : str
|
1433
|
+
a reference to the s3 connection on Airflow. (Default: None)
|
1434
|
+
verify : bool
|
1435
|
+
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
1436
|
+
"""
|
1437
|
+
...
|
1438
|
+
|
1433
1439
|
def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1434
1440
|
"""
|
1435
1441
|
This decorator is used to run NIM containers in Metaflow tasks as sidecars.
|
@@ -1461,70 +1467,106 @@ def nim(*, models: "list[NIM]", backend: str) -> typing.Callable[[typing.Type[Fl
|
|
1461
1467
|
"""
|
1462
1468
|
...
|
1463
1469
|
|
1464
|
-
|
1470
|
+
@typing.overload
|
1471
|
+
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]]:
|
1465
1472
|
"""
|
1466
|
-
Specifies
|
1473
|
+
Specifies the flow(s) that this flow depends on.
|
1467
1474
|
|
1468
|
-
|
1469
|
-
|
1475
|
+
```
|
1476
|
+
@trigger_on_finish(flow='FooFlow')
|
1477
|
+
```
|
1478
|
+
or
|
1479
|
+
```
|
1480
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1481
|
+
```
|
1482
|
+
This decorator respects the @project decorator and triggers the flow
|
1483
|
+
when upstream runs within the same namespace complete successfully
|
1470
1484
|
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1485
|
+
Additionally, you can specify project aware upstream flow dependencies
|
1486
|
+
by specifying the fully qualified project_flow_name.
|
1487
|
+
```
|
1488
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1489
|
+
```
|
1490
|
+
or
|
1491
|
+
```
|
1492
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1493
|
+
```
|
1477
1494
|
|
1495
|
+
You can also specify just the project or project branch (other values will be
|
1496
|
+
inferred from the current project or project branch):
|
1497
|
+
```
|
1498
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1499
|
+
```
|
1478
1500
|
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
"""
|
1485
|
-
Specifies the times when the flow should be run when running on a
|
1486
|
-
production scheduler.
|
1501
|
+
Note that `branch` is typically one of:
|
1502
|
+
- `prod`
|
1503
|
+
- `user.bob`
|
1504
|
+
- `test.my_experiment`
|
1505
|
+
- `prod.staging`
|
1487
1506
|
|
1488
1507
|
Parameters
|
1489
1508
|
----------
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
specified by this expression.
|
1499
|
-
timezone : str, optional, default None
|
1500
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1501
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1509
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
1510
|
+
Upstream flow dependency for this flow.
|
1511
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
1512
|
+
Upstream flow dependencies for this flow.
|
1513
|
+
options : Dict[str, Any], default {}
|
1514
|
+
Backend-specific configuration for tuning eventing behavior.
|
1515
|
+
|
1516
|
+
|
1502
1517
|
"""
|
1503
1518
|
...
|
1504
1519
|
|
1505
1520
|
@typing.overload
|
1506
|
-
def
|
1521
|
+
def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1507
1522
|
...
|
1508
1523
|
|
1509
|
-
def
|
1524
|
+
def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, 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] = {}):
|
1510
1525
|
"""
|
1511
|
-
Specifies the
|
1512
|
-
|
1526
|
+
Specifies the flow(s) that this flow depends on.
|
1527
|
+
|
1528
|
+
```
|
1529
|
+
@trigger_on_finish(flow='FooFlow')
|
1530
|
+
```
|
1531
|
+
or
|
1532
|
+
```
|
1533
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1534
|
+
```
|
1535
|
+
This decorator respects the @project decorator and triggers the flow
|
1536
|
+
when upstream runs within the same namespace complete successfully
|
1537
|
+
|
1538
|
+
Additionally, you can specify project aware upstream flow dependencies
|
1539
|
+
by specifying the fully qualified project_flow_name.
|
1540
|
+
```
|
1541
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1542
|
+
```
|
1543
|
+
or
|
1544
|
+
```
|
1545
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1546
|
+
```
|
1547
|
+
|
1548
|
+
You can also specify just the project or project branch (other values will be
|
1549
|
+
inferred from the current project or project branch):
|
1550
|
+
```
|
1551
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1552
|
+
```
|
1553
|
+
|
1554
|
+
Note that `branch` is typically one of:
|
1555
|
+
- `prod`
|
1556
|
+
- `user.bob`
|
1557
|
+
- `test.my_experiment`
|
1558
|
+
- `prod.staging`
|
1513
1559
|
|
1514
1560
|
Parameters
|
1515
1561
|
----------
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
specified by this expression.
|
1525
|
-
timezone : str, optional, default None
|
1526
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1527
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1562
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
1563
|
+
Upstream flow dependency for this flow.
|
1564
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
1565
|
+
Upstream flow dependencies for this flow.
|
1566
|
+
options : Dict[str, Any], default {}
|
1567
|
+
Backend-specific configuration for tuning eventing behavior.
|
1568
|
+
|
1569
|
+
|
1528
1570
|
"""
|
1529
1571
|
...
|
1530
1572
|
|
@@ -1570,94 +1612,52 @@ def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str,
|
|
1570
1612
|
"""
|
1571
1613
|
...
|
1572
1614
|
|
1573
|
-
def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, bucket_key: typing.Union[str, typing.List[str]], bucket_name: str, wildcard_match: bool, aws_conn_id: str, verify: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1574
|
-
"""
|
1575
|
-
The `@airflow_s3_key_sensor` decorator attaches a Airflow [S3KeySensor](https://airflow.apache.org/docs/apache-airflow-providers-amazon/stable/_api/airflow/providers/amazon/aws/sensors/s3/index.html#airflow.providers.amazon.aws.sensors.s3.S3KeySensor)
|
1576
|
-
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
1577
|
-
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1578
|
-
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1579
|
-
starts only after all sensors finish.
|
1580
|
-
|
1581
|
-
Parameters
|
1582
|
-
----------
|
1583
|
-
timeout : int
|
1584
|
-
Time, in seconds before the task times out and fails. (Default: 3600)
|
1585
|
-
poke_interval : int
|
1586
|
-
Time in seconds that the job should wait in between each try. (Default: 60)
|
1587
|
-
mode : str
|
1588
|
-
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1589
|
-
exponential_backoff : bool
|
1590
|
-
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1591
|
-
pool : str
|
1592
|
-
the slot pool this task should run in,
|
1593
|
-
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1594
|
-
soft_fail : bool
|
1595
|
-
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1596
|
-
name : str
|
1597
|
-
Name of the sensor on Airflow
|
1598
|
-
description : str
|
1599
|
-
Description of sensor in the Airflow UI
|
1600
|
-
bucket_key : Union[str, List[str]]
|
1601
|
-
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
1602
|
-
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
1603
|
-
bucket_name : str
|
1604
|
-
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
1605
|
-
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
1606
|
-
wildcard_match : bool
|
1607
|
-
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
1608
|
-
aws_conn_id : str
|
1609
|
-
a reference to the s3 connection on Airflow. (Default: None)
|
1610
|
-
verify : bool
|
1611
|
-
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
1612
|
-
"""
|
1613
|
-
...
|
1614
|
-
|
1615
1615
|
@typing.overload
|
1616
|
-
def
|
1616
|
+
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]]:
|
1617
1617
|
"""
|
1618
|
-
Specifies the
|
1619
|
-
|
1620
|
-
Use `@conda_base` to set common libraries required by all
|
1621
|
-
steps and use `@conda` to specify step-specific additions.
|
1618
|
+
Specifies the times when the flow should be run when running on a
|
1619
|
+
production scheduler.
|
1622
1620
|
|
1623
1621
|
Parameters
|
1624
1622
|
----------
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1632
|
-
|
1633
|
-
|
1634
|
-
|
1623
|
+
hourly : bool, default False
|
1624
|
+
Run the workflow hourly.
|
1625
|
+
daily : bool, default True
|
1626
|
+
Run the workflow daily.
|
1627
|
+
weekly : bool, default False
|
1628
|
+
Run the workflow weekly.
|
1629
|
+
cron : str, optional, default None
|
1630
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1631
|
+
specified by this expression.
|
1632
|
+
timezone : str, optional, default None
|
1633
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1634
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1635
1635
|
"""
|
1636
1636
|
...
|
1637
1637
|
|
1638
1638
|
@typing.overload
|
1639
|
-
def
|
1639
|
+
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1640
1640
|
...
|
1641
1641
|
|
1642
|
-
def
|
1642
|
+
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):
|
1643
1643
|
"""
|
1644
|
-
Specifies the
|
1645
|
-
|
1646
|
-
Use `@conda_base` to set common libraries required by all
|
1647
|
-
steps and use `@conda` to specify step-specific additions.
|
1644
|
+
Specifies the times when the flow should be run when running on a
|
1645
|
+
production scheduler.
|
1648
1646
|
|
1649
1647
|
Parameters
|
1650
1648
|
----------
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1649
|
+
hourly : bool, default False
|
1650
|
+
Run the workflow hourly.
|
1651
|
+
daily : bool, default True
|
1652
|
+
Run the workflow daily.
|
1653
|
+
weekly : bool, default False
|
1654
|
+
Run the workflow weekly.
|
1655
|
+
cron : str, optional, default None
|
1656
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1657
|
+
specified by this expression.
|
1658
|
+
timezone : str, optional, default None
|
1659
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1660
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1661
1661
|
"""
|
1662
1662
|
...
|
1663
1663
|
|