ob-metaflow-stubs 6.0.3.143rc0__py2.py3-none-any.whl → 6.0.3.145__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 +525 -523
- metaflow-stubs/cards.pyi +2 -2
- metaflow-stubs/cli.pyi +2 -7
- metaflow-stubs/cli_components/__init__.pyi +2 -2
- metaflow-stubs/cli_components/utils.pyi +2 -2
- metaflow-stubs/client/__init__.pyi +2 -2
- metaflow-stubs/client/core.pyi +93 -4
- metaflow-stubs/client/filecache.pyi +2 -2
- metaflow-stubs/events.pyi +3 -3
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +4 -4
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +3 -3
- metaflow-stubs/info_file.pyi +2 -2
- metaflow-stubs/metadata_provider/__init__.pyi +2 -2
- metaflow-stubs/metadata_provider/heartbeat.pyi +2 -2
- metaflow-stubs/metadata_provider/metadata.pyi +27 -3
- metaflow-stubs/metadata_provider/util.pyi +2 -2
- metaflow-stubs/metaflow_config.pyi +3 -3
- metaflow-stubs/metaflow_current.pyi +115 -115
- metaflow-stubs/mf_extensions/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/async_cards.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/deco_injection_mixin.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/extra_components.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/checkpoint_lister.pyi +4 -4
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/lineage_card.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +3 -5
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi +4 -7
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/decorator.pyi +3 -4
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/exceptions.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +2 -4
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/lineage.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +8 -4
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/task_utils.pyi +4 -11
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/exceptions.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/hf_hub/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/hf_hub/decorator.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/core.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/exceptions.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/model_storage.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/base.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/tar.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/injector.pyi +23 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/ollama.pyi +29 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/snowflake.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +2 -2
- metaflow-stubs/multicore_utils.pyi +2 -2
- metaflow-stubs/parameters.pyi +3 -3
- metaflow-stubs/plugins/__init__.pyi +13 -12
- 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 +2 -2
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +2 -2
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +2 -2
- metaflow-stubs/plugins/argo/__init__.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_client.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_events.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +2 -2
- 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 +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +3 -3
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.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 +3 -3
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +2 -2
- metaflow-stubs/plugins/azure/__init__.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_credential.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +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 +6 -6
- metaflow-stubs/plugins/cards/card_client.pyi +3 -3
- metaflow-stubs/plugins/cards/card_creator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_datastore.pyi +2 -2
- metaflow-stubs/plugins/cards/card_decorator.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +3 -3
- metaflow-stubs/plugins/cards/card_modules/card.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/components.pyi +3 -3
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +2 -2
- metaflow-stubs/plugins/cards/card_resolver.pyi +2 -2
- metaflow-stubs/plugins/cards/component_serializer.pyi +2 -2
- metaflow-stubs/plugins/cards/exception.pyi +2 -2
- metaflow-stubs/plugins/catch_decorator.pyi +3 -3
- metaflow-stubs/plugins/datatools/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/local.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3.pyi +3 -3
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +2 -2
- metaflow-stubs/plugins/debug_logger.pyi +2 -2
- metaflow-stubs/plugins/debug_monitor.pyi +2 -2
- metaflow-stubs/plugins/environment_decorator.pyi +2 -2
- metaflow-stubs/plugins/events_decorator.pyi +2 -2
- metaflow-stubs/plugins/frameworks/__init__.pyi +2 -2
- metaflow-stubs/plugins/frameworks/pytorch.pyi +2 -2
- metaflow-stubs/plugins/gcp/__init__.pyi +2 -2
- metaflow-stubs/plugins/gcp/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 +4 -4
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +2 -5
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +2 -2
- metaflow-stubs/plugins/kubernetes/spot_monitor_sidecar.pyi +2 -2
- metaflow-stubs/plugins/ollama/__init__.pyi +53 -0
- 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 +3 -3
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
- metaflow-stubs/plugins/snowflake/__init__.pyi +2 -2
- metaflow-stubs/plugins/storage_executor.pyi +2 -2
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +2 -2
- metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
- 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 +6 -6
- metaflow-stubs/runner/deployer_impl.pyi +2 -2
- metaflow-stubs/runner/metaflow_runner.pyi +2 -2
- 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 +4 -4
- metaflow-stubs/system/__init__.pyi +2 -2
- metaflow-stubs/system/system_logger.pyi +3 -3
- metaflow-stubs/system/system_monitor.pyi +2 -2
- metaflow-stubs/tagging_util.pyi +2 -2
- metaflow-stubs/tuple_util.pyi +2 -2
- metaflow-stubs/user_configs/__init__.pyi +2 -2
- metaflow-stubs/user_configs/config_decorators.pyi +6 -6
- metaflow-stubs/user_configs/config_options.pyi +3 -3
- metaflow-stubs/user_configs/config_parameters.pyi +6 -6
- {ob_metaflow_stubs-6.0.3.143rc0.dist-info → ob_metaflow_stubs-6.0.3.145.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-6.0.3.145.dist-info/RECORD +197 -0
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/context.pyi +0 -79
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/decorator.pyi +0 -46
- ob_metaflow_stubs-6.0.3.143rc0.dist-info/RECORD +0 -194
- {ob_metaflow_stubs-6.0.3.143rc0.dist-info → ob_metaflow_stubs-6.0.3.145.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-6.0.3.143rc0.dist-info → ob_metaflow_stubs-6.0.3.145.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
|
-
# MF version: 2.14.
|
4
|
-
# Generated on 2025-02-
|
3
|
+
# MF version: 2.14.3.1+obcheckpoint(0.1.8);ob(v1) #
|
4
|
+
# Generated on 2025-02-24T18:52:39.248529 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -35,9 +35,9 @@ from .user_configs.config_parameters import ConfigValue as ConfigValue
|
|
35
35
|
from .user_configs.config_parameters import config_expr as config_expr
|
36
36
|
from .user_configs.config_decorators import CustomFlowDecorator as CustomFlowDecorator
|
37
37
|
from .user_configs.config_decorators import CustomStepDecorator as CustomStepDecorator
|
38
|
-
from . import tuple_util as tuple_util
|
39
38
|
from . import cards as cards
|
40
39
|
from . import events as events
|
40
|
+
from . import tuple_util as tuple_util
|
41
41
|
from . import runner as runner
|
42
42
|
from . import plugins as plugins
|
43
43
|
from .mf_extensions.outerbounds.toplevel.global_aliases_for_metaflow_package import S3 as S3
|
@@ -63,7 +63,6 @@ from .runner.deployer import DeployedFlow as DeployedFlow
|
|
63
63
|
from .runner.nbdeploy import NBDeployer as NBDeployer
|
64
64
|
from .mf_extensions.obcheckpoint.plugins.machine_learning_utilities.checkpoints.final_api import Checkpoint as Checkpoint
|
65
65
|
from .mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastructures import load_model as load_model
|
66
|
-
from .mf_extensions.obcheckpoint.plugins.machine_learning_utilities.datastore.context import using_artifact_store as using_artifact_store
|
67
66
|
from .mf_extensions.outerbounds.toplevel.global_aliases_for_metaflow_package import get_aws_client as get_aws_client
|
68
67
|
from .mf_extensions.outerbounds.plugins.snowflake.snowflake import Snowflake as Snowflake
|
69
68
|
from . import cli_components as cli_components
|
@@ -147,138 +146,301 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
147
146
|
"""
|
148
147
|
...
|
149
148
|
|
150
|
-
|
149
|
+
@typing.overload
|
150
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
151
151
|
"""
|
152
|
-
|
152
|
+
Internal decorator to support Fast bakery
|
153
|
+
Parameters
|
154
|
+
----------
|
155
|
+
"""
|
156
|
+
...
|
157
|
+
|
158
|
+
@typing.overload
|
159
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
160
|
+
...
|
161
|
+
|
162
|
+
def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
163
|
+
"""
|
164
|
+
Internal decorator to support Fast bakery
|
165
|
+
Parameters
|
166
|
+
----------
|
167
|
+
"""
|
168
|
+
...
|
169
|
+
|
170
|
+
@typing.overload
|
171
|
+
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]]]:
|
172
|
+
"""
|
173
|
+
Specifies the Conda environment for the step.
|
174
|
+
|
175
|
+
Information in this decorator will augment any
|
176
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
177
|
+
you can use `@conda_base` to set packages required by all
|
178
|
+
steps and use `@conda` to specify step-specific overrides.
|
153
179
|
|
154
180
|
|
155
181
|
Parameters
|
156
182
|
----------
|
157
|
-
|
158
|
-
|
183
|
+
packages : Dict[str, str], default {}
|
184
|
+
Packages to use for this step. The key is the name of the package
|
185
|
+
and the value is the version to use.
|
186
|
+
libraries : Dict[str, str], default {}
|
187
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
188
|
+
python : str, optional, default None
|
189
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
190
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
191
|
+
disabled : bool, default False
|
192
|
+
If set to True, disables @conda.
|
193
|
+
"""
|
194
|
+
...
|
195
|
+
|
196
|
+
@typing.overload
|
197
|
+
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
198
|
+
...
|
199
|
+
|
200
|
+
@typing.overload
|
201
|
+
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
202
|
+
...
|
203
|
+
|
204
|
+
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):
|
205
|
+
"""
|
206
|
+
Specifies the Conda environment for the step.
|
159
207
|
|
160
|
-
|
161
|
-
|
208
|
+
Information in this decorator will augment any
|
209
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
210
|
+
you can use `@conda_base` to set packages required by all
|
211
|
+
steps and use `@conda` to specify step-specific overrides.
|
162
212
|
|
163
|
-
Loaded repos can be accessed via `current.huggingface_hub.loaded`. If load is set, then the following happens:
|
164
213
|
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
214
|
+
Parameters
|
215
|
+
----------
|
216
|
+
packages : Dict[str, str], default {}
|
217
|
+
Packages to use for this step. The key is the name of the package
|
218
|
+
and the value is the version to use.
|
219
|
+
libraries : Dict[str, str], default {}
|
220
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
221
|
+
python : str, optional, default None
|
222
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
223
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
224
|
+
disabled : bool, default False
|
225
|
+
If set to True, disables @conda.
|
226
|
+
"""
|
227
|
+
...
|
228
|
+
|
229
|
+
@typing.overload
|
230
|
+
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]]]:
|
231
|
+
"""
|
232
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
169
233
|
|
170
|
-
|
171
|
-
|
234
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
235
|
+
|
236
|
+
|
237
|
+
Parameters
|
238
|
+
----------
|
239
|
+
type : str, default 'default'
|
240
|
+
Card type.
|
241
|
+
id : str, optional, default None
|
242
|
+
If multiple cards are present, use this id to identify this card.
|
243
|
+
options : Dict[str, Any], default {}
|
244
|
+
Options passed to the card. The contents depend on the card type.
|
245
|
+
timeout : int, default 45
|
246
|
+
Interrupt reporting if it takes more than this many seconds.
|
172
247
|
"""
|
173
248
|
...
|
174
249
|
|
175
250
|
@typing.overload
|
176
|
-
def
|
251
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
252
|
+
...
|
253
|
+
|
254
|
+
@typing.overload
|
255
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
256
|
+
...
|
257
|
+
|
258
|
+
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):
|
177
259
|
"""
|
178
|
-
|
260
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
179
261
|
|
180
|
-
|
262
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
181
263
|
|
182
|
-
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
183
|
-
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
184
|
-
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
185
264
|
|
186
|
-
|
187
|
-
|
265
|
+
Parameters
|
266
|
+
----------
|
267
|
+
type : str, default 'default'
|
268
|
+
Card type.
|
269
|
+
id : str, optional, default None
|
270
|
+
If multiple cards are present, use this id to identify this card.
|
271
|
+
options : Dict[str, Any], default {}
|
272
|
+
Options passed to the card. The contents depend on the card type.
|
273
|
+
timeout : int, default 45
|
274
|
+
Interrupt reporting if it takes more than this many seconds.
|
275
|
+
"""
|
276
|
+
...
|
277
|
+
|
278
|
+
@typing.overload
|
279
|
+
def environment(*, vars: typing.Dict[str, str] = {}) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
280
|
+
"""
|
281
|
+
Specifies environment variables to be set prior to the execution of a step.
|
188
282
|
|
189
283
|
|
190
284
|
Parameters
|
191
285
|
----------
|
192
|
-
|
193
|
-
|
194
|
-
minutes : int, default 0
|
195
|
-
Number of minutes to wait prior to timing out.
|
196
|
-
hours : int, default 0
|
197
|
-
Number of hours to wait prior to timing out.
|
286
|
+
vars : Dict[str, str], default {}
|
287
|
+
Dictionary of environment variables to set.
|
198
288
|
"""
|
199
289
|
...
|
200
290
|
|
201
291
|
@typing.overload
|
202
|
-
def
|
292
|
+
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
203
293
|
...
|
204
294
|
|
205
295
|
@typing.overload
|
206
|
-
def
|
296
|
+
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
207
297
|
...
|
208
298
|
|
209
|
-
def
|
299
|
+
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
210
300
|
"""
|
211
|
-
Specifies
|
301
|
+
Specifies environment variables to be set prior to the execution of a step.
|
212
302
|
|
213
|
-
This decorator is useful if this step may hang indefinitely.
|
214
303
|
|
215
|
-
|
216
|
-
|
217
|
-
|
304
|
+
Parameters
|
305
|
+
----------
|
306
|
+
vars : Dict[str, str], default {}
|
307
|
+
Dictionary of environment variables to set.
|
308
|
+
"""
|
309
|
+
...
|
310
|
+
|
311
|
+
@typing.overload
|
312
|
+
def resources(*, cpu: int = 1, gpu: typing.Optional[int] = None, 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]]]:
|
313
|
+
"""
|
314
|
+
Specifies the resources needed when executing this step.
|
218
315
|
|
219
|
-
|
220
|
-
|
316
|
+
Use `@resources` to specify the resource requirements
|
317
|
+
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
318
|
+
|
319
|
+
You can choose the compute layer on the command line by executing e.g.
|
320
|
+
```
|
321
|
+
python myflow.py run --with batch
|
322
|
+
```
|
323
|
+
or
|
324
|
+
```
|
325
|
+
python myflow.py run --with kubernetes
|
326
|
+
```
|
327
|
+
which executes the flow on the desired system using the
|
328
|
+
requirements specified in `@resources`.
|
221
329
|
|
222
330
|
|
223
331
|
Parameters
|
224
332
|
----------
|
225
|
-
|
226
|
-
Number of
|
227
|
-
|
228
|
-
Number of
|
229
|
-
|
230
|
-
|
333
|
+
cpu : int, default 1
|
334
|
+
Number of CPUs required for this step.
|
335
|
+
gpu : int, optional, default None
|
336
|
+
Number of GPUs required for this step.
|
337
|
+
disk : int, optional, default None
|
338
|
+
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
339
|
+
memory : int, default 4096
|
340
|
+
Memory size (in MB) required for this step.
|
341
|
+
shared_memory : int, optional, default None
|
342
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
343
|
+
This parameter maps to the `--shm-size` option in Docker.
|
231
344
|
"""
|
232
345
|
...
|
233
346
|
|
234
347
|
@typing.overload
|
235
|
-
def
|
348
|
+
def resources(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
349
|
+
...
|
350
|
+
|
351
|
+
@typing.overload
|
352
|
+
def resources(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
353
|
+
...
|
354
|
+
|
355
|
+
def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, cpu: int = 1, gpu: typing.Optional[int] = None, disk: typing.Optional[int] = None, memory: int = 4096, shared_memory: typing.Optional[int] = None):
|
236
356
|
"""
|
237
|
-
Specifies
|
357
|
+
Specifies the resources needed when executing this step.
|
238
358
|
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
359
|
+
Use `@resources` to specify the resource requirements
|
360
|
+
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
361
|
+
|
362
|
+
You can choose the compute layer on the command line by executing e.g.
|
363
|
+
```
|
364
|
+
python myflow.py run --with batch
|
365
|
+
```
|
366
|
+
or
|
367
|
+
```
|
368
|
+
python myflow.py run --with kubernetes
|
369
|
+
```
|
370
|
+
which executes the flow on the desired system using the
|
371
|
+
requirements specified in `@resources`.
|
243
372
|
|
244
373
|
|
245
374
|
Parameters
|
246
375
|
----------
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
376
|
+
cpu : int, default 1
|
377
|
+
Number of CPUs required for this step.
|
378
|
+
gpu : int, optional, default None
|
379
|
+
Number of GPUs required for this step.
|
380
|
+
disk : int, optional, default None
|
381
|
+
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
382
|
+
memory : int, default 4096
|
383
|
+
Memory size (in MB) required for this step.
|
384
|
+
shared_memory : int, optional, default None
|
385
|
+
The value for the size (in MiB) of the /dev/shm volume for this step.
|
386
|
+
This parameter maps to the `--shm-size` option in Docker.
|
253
387
|
"""
|
254
388
|
...
|
255
389
|
|
256
390
|
@typing.overload
|
257
|
-
def
|
391
|
+
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]]]:
|
392
|
+
"""
|
393
|
+
Enables checkpointing for a step.
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
Parameters
|
398
|
+
----------
|
399
|
+
load_policy : str, default: "fresh"
|
400
|
+
The policy for loading the checkpoint. The following policies are supported:
|
401
|
+
- "eager": Loads the the latest available checkpoint within the namespace.
|
402
|
+
With this mode, the latest checkpoint written by any previous task (can be even a different run) of the step
|
403
|
+
will be loaded at the start of the task.
|
404
|
+
- "none": Do not load any checkpoint
|
405
|
+
- "fresh": Loads the lastest checkpoint created within the running Task.
|
406
|
+
This mode helps loading checkpoints across various retry attempts of the same task.
|
407
|
+
With this mode, no checkpoint will be loaded at the start of a task but any checkpoints
|
408
|
+
created within the task will be loaded when the task is retries execution on failure.
|
409
|
+
|
410
|
+
temp_dir_root : str, default: None
|
411
|
+
The root directory under which `current.checkpoint.directory` will be created.
|
412
|
+
"""
|
258
413
|
...
|
259
414
|
|
260
415
|
@typing.overload
|
261
|
-
def
|
416
|
+
def checkpoint(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
262
417
|
...
|
263
418
|
|
264
|
-
|
419
|
+
@typing.overload
|
420
|
+
def checkpoint(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
421
|
+
...
|
422
|
+
|
423
|
+
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):
|
265
424
|
"""
|
266
|
-
|
425
|
+
Enables checkpointing for a step.
|
267
426
|
|
268
|
-
The decorator will create an optional artifact, specified by `var`, which
|
269
|
-
contains the exception raised. You can use it to detect the presence
|
270
|
-
of errors, indicating that all happy-path artifacts produced by the step
|
271
|
-
are missing.
|
272
427
|
|
273
428
|
|
274
429
|
Parameters
|
275
430
|
----------
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
431
|
+
load_policy : str, default: "fresh"
|
432
|
+
The policy for loading the checkpoint. The following policies are supported:
|
433
|
+
- "eager": Loads the the latest available checkpoint within the namespace.
|
434
|
+
With this mode, the latest checkpoint written by any previous task (can be even a different run) of the step
|
435
|
+
will be loaded at the start of the task.
|
436
|
+
- "none": Do not load any checkpoint
|
437
|
+
- "fresh": Loads the lastest checkpoint created within the running Task.
|
438
|
+
This mode helps loading checkpoints across various retry attempts of the same task.
|
439
|
+
With this mode, no checkpoint will be loaded at the start of a task but any checkpoints
|
440
|
+
created within the task will be loaded when the task is retries execution on failure.
|
441
|
+
|
442
|
+
temp_dir_root : str, default: None
|
443
|
+
The root directory under which `current.checkpoint.directory` will be created.
|
282
444
|
"""
|
283
445
|
...
|
284
446
|
|
@@ -301,6 +463,31 @@ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
|
|
301
463
|
"""
|
302
464
|
...
|
303
465
|
|
466
|
+
def huggingface_hub(*, temp_dir_root: typing.Optional[str] = None, load: typing.Union[typing.List[str], typing.List[typing.Tuple[typing.Dict, str]], typing.List[typing.Tuple[str, str]], typing.List[typing.Dict], 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]]]:
|
467
|
+
"""
|
468
|
+
Decorator that helps cache, version and store models/datasets from huggingface hub.
|
469
|
+
|
470
|
+
|
471
|
+
Parameters
|
472
|
+
----------
|
473
|
+
temp_dir_root : str, optional
|
474
|
+
The root directory that will hold the temporary directory where objects will be downloaded.
|
475
|
+
|
476
|
+
load: Union[List[str], List[Tuple[Dict, str]], List[Tuple[str, str]], List[Dict], None]
|
477
|
+
The list of repos (models/datasets) to load.
|
478
|
+
|
479
|
+
Loaded repos can be accessed via `current.huggingface_hub.loaded`. If load is set, then the following happens:
|
480
|
+
|
481
|
+
- If repo (model/dataset) is not found in the datastore:
|
482
|
+
- Downloads the repo from Hugging Face Hub to a temporary directory (or uses specified path) for local access
|
483
|
+
- Stores it in Metaflow's datastore (s3/gcs/azure etc.) with a unique name based on repo_type/repo_id
|
484
|
+
- All HF models loaded for a `@step` will be cached separately under flow/step/namespace.
|
485
|
+
|
486
|
+
- If repo is found in the datastore:
|
487
|
+
- Loads it directly from datastore to local path (can be temporary directory or specified path)
|
488
|
+
"""
|
489
|
+
...
|
490
|
+
|
304
491
|
@typing.overload
|
305
492
|
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]]]:
|
306
493
|
"""
|
@@ -392,200 +579,116 @@ def nim(*, models: "list[NIM]", backend: str, queue_timeout: int) -> typing.Call
|
|
392
579
|
...
|
393
580
|
|
394
581
|
@typing.overload
|
395
|
-
def
|
396
|
-
"""
|
397
|
-
Specifies the number of times the task corresponding
|
398
|
-
to a step needs to be retried.
|
399
|
-
|
400
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
401
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
402
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
403
|
-
|
404
|
-
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
405
|
-
decorator will execute a no-op task after all retries have been exhausted,
|
406
|
-
ensuring that the flow execution can continue.
|
407
|
-
|
408
|
-
|
409
|
-
Parameters
|
410
|
-
----------
|
411
|
-
times : int, default 3
|
412
|
-
Number of times to retry this task.
|
413
|
-
minutes_between_retries : int, default 2
|
414
|
-
Number of minutes between retries.
|
415
|
-
"""
|
416
|
-
...
|
417
|
-
|
418
|
-
@typing.overload
|
419
|
-
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
420
|
-
...
|
421
|
-
|
422
|
-
@typing.overload
|
423
|
-
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
424
|
-
...
|
425
|
-
|
426
|
-
def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, times: int = 3, minutes_between_retries: int = 2):
|
427
|
-
"""
|
428
|
-
Specifies the number of times the task corresponding
|
429
|
-
to a step needs to be retried.
|
430
|
-
|
431
|
-
This decorator is useful for handling transient errors, such as networking issues.
|
432
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
433
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
434
|
-
|
435
|
-
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
436
|
-
decorator will execute a no-op task after all retries have been exhausted,
|
437
|
-
ensuring that the flow execution can continue.
|
438
|
-
|
439
|
-
|
440
|
-
Parameters
|
441
|
-
----------
|
442
|
-
times : int, default 3
|
443
|
-
Number of times to retry this task.
|
444
|
-
minutes_between_retries : int, default 2
|
445
|
-
Number of minutes between retries.
|
446
|
-
"""
|
447
|
-
...
|
448
|
-
|
449
|
-
@typing.overload
|
450
|
-
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]]]:
|
582
|
+
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]]]:
|
451
583
|
"""
|
452
|
-
|
584
|
+
Specifies that the step will success under all circumstances.
|
453
585
|
|
586
|
+
The decorator will create an optional artifact, specified by `var`, which
|
587
|
+
contains the exception raised. You can use it to detect the presence
|
588
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
589
|
+
are missing.
|
454
590
|
|
455
591
|
|
456
592
|
Parameters
|
457
593
|
----------
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
- "fresh": Loads the lastest checkpoint created within the running Task.
|
465
|
-
This mode helps loading checkpoints across various retry attempts of the same task.
|
466
|
-
With this mode, no checkpoint will be loaded at the start of a task but any checkpoints
|
467
|
-
created within the task will be loaded when the task is retries execution on failure.
|
468
|
-
|
469
|
-
temp_dir_root : str, default: None
|
470
|
-
The root directory under which `current.checkpoint.directory` will be created.
|
594
|
+
var : str, optional, default None
|
595
|
+
Name of the artifact in which to store the caught exception.
|
596
|
+
If not specified, the exception is not stored.
|
597
|
+
print_exception : bool, default True
|
598
|
+
Determines whether or not the exception is printed to
|
599
|
+
stdout when caught.
|
471
600
|
"""
|
472
601
|
...
|
473
602
|
|
474
603
|
@typing.overload
|
475
|
-
def
|
604
|
+
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
476
605
|
...
|
477
606
|
|
478
607
|
@typing.overload
|
479
|
-
def
|
480
|
-
...
|
481
|
-
|
482
|
-
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):
|
483
|
-
"""
|
484
|
-
Enables checkpointing for a step.
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
Parameters
|
489
|
-
----------
|
490
|
-
load_policy : str, default: "fresh"
|
491
|
-
The policy for loading the checkpoint. The following policies are supported:
|
492
|
-
- "eager": Loads the the latest available checkpoint within the namespace.
|
493
|
-
With this mode, the latest checkpoint written by any previous task (can be even a different run) of the step
|
494
|
-
will be loaded at the start of the task.
|
495
|
-
- "none": Do not load any checkpoint
|
496
|
-
- "fresh": Loads the lastest checkpoint created within the running Task.
|
497
|
-
This mode helps loading checkpoints across various retry attempts of the same task.
|
498
|
-
With this mode, no checkpoint will be loaded at the start of a task but any checkpoints
|
499
|
-
created within the task will be loaded when the task is retries execution on failure.
|
500
|
-
|
501
|
-
temp_dir_root : str, default: None
|
502
|
-
The root directory under which `current.checkpoint.directory` will be created.
|
503
|
-
"""
|
608
|
+
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
504
609
|
...
|
505
610
|
|
506
|
-
|
507
|
-
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]]]:
|
611
|
+
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):
|
508
612
|
"""
|
509
|
-
|
613
|
+
Specifies that the step will success under all circumstances.
|
510
614
|
|
511
|
-
|
615
|
+
The decorator will create an optional artifact, specified by `var`, which
|
616
|
+
contains the exception raised. You can use it to detect the presence
|
617
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
618
|
+
are missing.
|
512
619
|
|
513
620
|
|
514
621
|
Parameters
|
515
622
|
----------
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
timeout : int, default 45
|
523
|
-
Interrupt reporting if it takes more than this many seconds.
|
623
|
+
var : str, optional, default None
|
624
|
+
Name of the artifact in which to store the caught exception.
|
625
|
+
If not specified, the exception is not stored.
|
626
|
+
print_exception : bool, default True
|
627
|
+
Determines whether or not the exception is printed to
|
628
|
+
stdout when caught.
|
524
629
|
"""
|
525
630
|
...
|
526
631
|
|
527
632
|
@typing.overload
|
528
|
-
def
|
529
|
-
...
|
530
|
-
|
531
|
-
@typing.overload
|
532
|
-
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
533
|
-
...
|
534
|
-
|
535
|
-
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):
|
633
|
+
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]]]:
|
536
634
|
"""
|
537
|
-
|
635
|
+
Specifies a timeout for your step.
|
538
636
|
|
539
|
-
|
637
|
+
This decorator is useful if this step may hang indefinitely.
|
540
638
|
|
639
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
640
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
641
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
541
642
|
|
542
|
-
|
543
|
-
|
544
|
-
type : str, default 'default'
|
545
|
-
Card type.
|
546
|
-
id : str, optional, default None
|
547
|
-
If multiple cards are present, use this id to identify this card.
|
548
|
-
options : Dict[str, Any], default {}
|
549
|
-
Options passed to the card. The contents depend on the card type.
|
550
|
-
timeout : int, default 45
|
551
|
-
Interrupt reporting if it takes more than this many seconds.
|
552
|
-
"""
|
553
|
-
...
|
554
|
-
|
555
|
-
@typing.overload
|
556
|
-
def environment(*, vars: typing.Dict[str, str] = {}) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
557
|
-
"""
|
558
|
-
Specifies environment variables to be set prior to the execution of a step.
|
643
|
+
Note that all the values specified in parameters are added together so if you specify
|
644
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
559
645
|
|
560
646
|
|
561
647
|
Parameters
|
562
648
|
----------
|
563
|
-
|
564
|
-
|
649
|
+
seconds : int, default 0
|
650
|
+
Number of seconds to wait prior to timing out.
|
651
|
+
minutes : int, default 0
|
652
|
+
Number of minutes to wait prior to timing out.
|
653
|
+
hours : int, default 0
|
654
|
+
Number of hours to wait prior to timing out.
|
565
655
|
"""
|
566
656
|
...
|
567
657
|
|
568
658
|
@typing.overload
|
569
|
-
def
|
659
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
570
660
|
...
|
571
661
|
|
572
662
|
@typing.overload
|
573
|
-
def
|
663
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
574
664
|
...
|
575
665
|
|
576
|
-
def
|
666
|
+
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):
|
577
667
|
"""
|
578
|
-
Specifies
|
668
|
+
Specifies a timeout for your step.
|
669
|
+
|
670
|
+
This decorator is useful if this step may hang indefinitely.
|
671
|
+
|
672
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
673
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
674
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
675
|
+
|
676
|
+
Note that all the values specified in parameters are added together so if you specify
|
677
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
579
678
|
|
580
679
|
|
581
680
|
Parameters
|
582
681
|
----------
|
583
|
-
|
584
|
-
|
682
|
+
seconds : int, default 0
|
683
|
+
Number of seconds to wait prior to timing out.
|
684
|
+
minutes : int, default 0
|
685
|
+
Number of minutes to wait prior to timing out.
|
686
|
+
hours : int, default 0
|
687
|
+
Number of hours to wait prior to timing out.
|
585
688
|
"""
|
586
689
|
...
|
587
690
|
|
588
|
-
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] = [], labels: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_LABELS', annotations: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_ANNOTATIONS', 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, hostname_resolution_timeout: int = 600, qos: str = 'Burstable'
|
691
|
+
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] = [], labels: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_LABELS', annotations: typing.Dict[str, str] = 'METAFLOW_KUBERNETES_ANNOTATIONS', 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, hostname_resolution_timeout: int = 600, qos: str = 'Burstable') -> 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]]]:
|
589
692
|
"""
|
590
693
|
Specifies that this step should execute on Kubernetes.
|
591
694
|
|
@@ -659,198 +762,145 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
|
|
659
762
|
Only applicable when @parallel is used.
|
660
763
|
qos: str, default: Burstable
|
661
764
|
Quality of Service class to assign to the pod. Supported values are: Guaranteed, Burstable, BestEffort
|
662
|
-
extended_resources: Dict[str, str], optional, default None
|
663
|
-
Extended resources to be requested for the pod.
|
664
|
-
https://kubernetes.io/docs/tasks/administer-cluster/extended-resource-node/
|
665
765
|
"""
|
666
766
|
...
|
667
767
|
|
668
|
-
|
669
|
-
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]]]:
|
768
|
+
def ollama(*, models: "list[Ollama]", backend: str) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
670
769
|
"""
|
671
|
-
|
770
|
+
This decorator is used to run Ollama APIs as Metaflow task sidecars.
|
672
771
|
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
772
|
+
User code call
|
773
|
+
-----------
|
774
|
+
@ollama(
|
775
|
+
models=['meta/llama3-8b-instruct', 'meta/llama3-70b-instruct'],
|
776
|
+
backend='local'
|
777
|
+
)
|
778
|
+
|
779
|
+
Valid backend options
|
780
|
+
---------------------
|
781
|
+
- 'local': Run as a separate process on the local task machine.
|
782
|
+
- (TODO) 'managed': Outerbounds hosts and selects compute provider.
|
783
|
+
- (TODO) 'remote': Spin up separate instance to serve Ollama models.
|
784
|
+
|
785
|
+
Valid model options
|
786
|
+
----------------
|
787
|
+
- 'llama3.2'
|
788
|
+
- 'llama3.3'
|
789
|
+
- any model here https://ollama.com/search
|
677
790
|
|
678
791
|
|
679
792
|
Parameters
|
680
793
|
----------
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
686
|
-
python : str, optional, default None
|
687
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
688
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
689
|
-
disabled : bool, default False
|
690
|
-
If set to True, disables @conda.
|
794
|
+
models: list[Ollama]
|
795
|
+
List of Ollama containers running models in sidecars.
|
796
|
+
backend: str
|
797
|
+
Determines where and how to run the Ollama process.
|
691
798
|
"""
|
692
799
|
...
|
693
800
|
|
694
|
-
|
695
|
-
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
696
|
-
...
|
697
|
-
|
698
|
-
@typing.overload
|
699
|
-
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
700
|
-
...
|
701
|
-
|
702
|
-
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):
|
801
|
+
def nvidia(*, gpu: int, gpu_type: str, queue_timeout: int) -> 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]]]:
|
703
802
|
"""
|
704
|
-
Specifies
|
705
|
-
|
706
|
-
Information in this decorator will augment any
|
707
|
-
attributes set in the `@conda_base` flow-level decorator. Hence,
|
708
|
-
you can use `@conda_base` to set packages required by all
|
709
|
-
steps and use `@conda` to specify step-specific overrides.
|
803
|
+
Specifies that this step should execute on DGX cloud.
|
710
804
|
|
711
805
|
|
712
806
|
Parameters
|
713
807
|
----------
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
721
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
722
|
-
disabled : bool, default False
|
723
|
-
If set to True, disables @conda.
|
808
|
+
gpu : int
|
809
|
+
Number of GPUs to use.
|
810
|
+
gpu_type : str
|
811
|
+
Type of Nvidia GPU to use.
|
812
|
+
queue_timeout : int
|
813
|
+
Time to keep the job in NVCF's queue.
|
724
814
|
"""
|
725
815
|
...
|
726
816
|
|
727
817
|
@typing.overload
|
728
|
-
def
|
818
|
+
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]]]:
|
729
819
|
"""
|
730
|
-
Specifies
|
731
|
-
|
732
|
-
Use `@resources` to specify the resource requirements
|
733
|
-
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
734
|
-
|
735
|
-
You can choose the compute layer on the command line by executing e.g.
|
736
|
-
```
|
737
|
-
python myflow.py run --with batch
|
738
|
-
```
|
739
|
-
or
|
740
|
-
```
|
741
|
-
python myflow.py run --with kubernetes
|
742
|
-
```
|
743
|
-
which executes the flow on the desired system using the
|
744
|
-
requirements specified in `@resources`.
|
820
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
821
|
+
the execution of a step.
|
745
822
|
|
746
823
|
|
747
824
|
Parameters
|
748
825
|
----------
|
749
|
-
|
750
|
-
|
751
|
-
gpu : int, optional, default None
|
752
|
-
Number of GPUs required for this step.
|
753
|
-
disk : int, optional, default None
|
754
|
-
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
755
|
-
memory : int, default 4096
|
756
|
-
Memory size (in MB) required for this step.
|
757
|
-
shared_memory : int, optional, default None
|
758
|
-
The value for the size (in MiB) of the /dev/shm volume for this step.
|
759
|
-
This parameter maps to the `--shm-size` option in Docker.
|
826
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
827
|
+
List of secret specs, defining how the secrets are to be retrieved
|
760
828
|
"""
|
761
829
|
...
|
762
830
|
|
763
831
|
@typing.overload
|
764
|
-
def
|
832
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
765
833
|
...
|
766
834
|
|
767
835
|
@typing.overload
|
768
|
-
def
|
836
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
769
837
|
...
|
770
838
|
|
771
|
-
def
|
839
|
+
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]]] = []):
|
772
840
|
"""
|
773
|
-
Specifies
|
774
|
-
|
775
|
-
Use `@resources` to specify the resource requirements
|
776
|
-
independently of the specific compute layer (`@batch`, `@kubernetes`).
|
777
|
-
|
778
|
-
You can choose the compute layer on the command line by executing e.g.
|
779
|
-
```
|
780
|
-
python myflow.py run --with batch
|
781
|
-
```
|
782
|
-
or
|
783
|
-
```
|
784
|
-
python myflow.py run --with kubernetes
|
785
|
-
```
|
786
|
-
which executes the flow on the desired system using the
|
787
|
-
requirements specified in `@resources`.
|
841
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
842
|
+
the execution of a step.
|
788
843
|
|
789
844
|
|
790
845
|
Parameters
|
791
846
|
----------
|
792
|
-
|
793
|
-
|
794
|
-
gpu : int, optional, default None
|
795
|
-
Number of GPUs required for this step.
|
796
|
-
disk : int, optional, default None
|
797
|
-
Disk size (in MB) required for this step. Only applies on Kubernetes.
|
798
|
-
memory : int, default 4096
|
799
|
-
Memory size (in MB) required for this step.
|
800
|
-
shared_memory : int, optional, default None
|
801
|
-
The value for the size (in MiB) of the /dev/shm volume for this step.
|
802
|
-
This parameter maps to the `--shm-size` option in Docker.
|
847
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
848
|
+
List of secret specs, defining how the secrets are to be retrieved
|
803
849
|
"""
|
804
850
|
...
|
805
851
|
|
806
852
|
@typing.overload
|
807
|
-
def
|
853
|
+
def retry(*, times: int = 3, minutes_between_retries: int = 2) -> typing.Callable[[typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]], typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]]]:
|
808
854
|
"""
|
809
|
-
Specifies
|
810
|
-
|
855
|
+
Specifies the number of times the task corresponding
|
856
|
+
to a step needs to be retried.
|
857
|
+
|
858
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
859
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
860
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
861
|
+
|
862
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
863
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
864
|
+
ensuring that the flow execution can continue.
|
811
865
|
|
812
866
|
|
813
867
|
Parameters
|
814
868
|
----------
|
815
|
-
|
816
|
-
|
869
|
+
times : int, default 3
|
870
|
+
Number of times to retry this task.
|
871
|
+
minutes_between_retries : int, default 2
|
872
|
+
Number of minutes between retries.
|
817
873
|
"""
|
818
874
|
...
|
819
875
|
|
820
876
|
@typing.overload
|
821
|
-
def
|
877
|
+
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
822
878
|
...
|
823
879
|
|
824
880
|
@typing.overload
|
825
|
-
def
|
881
|
+
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
826
882
|
...
|
827
883
|
|
828
|
-
def
|
884
|
+
def retry(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, times: int = 3, minutes_between_retries: int = 2):
|
829
885
|
"""
|
830
|
-
Specifies
|
831
|
-
|
886
|
+
Specifies the number of times the task corresponding
|
887
|
+
to a step needs to be retried.
|
832
888
|
|
889
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
890
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
891
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
833
892
|
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
List of secret specs, defining how the secrets are to be retrieved
|
838
|
-
"""
|
839
|
-
...
|
840
|
-
|
841
|
-
def nvidia(*, gpu: int, gpu_type: str, queue_timeout: int) -> 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]]]:
|
842
|
-
"""
|
843
|
-
Specifies that this step should execute on DGX cloud.
|
893
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
894
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
895
|
+
ensuring that the flow execution can continue.
|
844
896
|
|
845
897
|
|
846
898
|
Parameters
|
847
899
|
----------
|
848
|
-
|
849
|
-
Number of
|
850
|
-
|
851
|
-
|
852
|
-
queue_timeout : int
|
853
|
-
Time to keep the job in NVCF's queue.
|
900
|
+
times : int, default 3
|
901
|
+
Number of times to retry this task.
|
902
|
+
minutes_between_retries : int, default 2
|
903
|
+
Number of minutes between retries.
|
854
904
|
"""
|
855
905
|
...
|
856
906
|
|
@@ -906,74 +956,43 @@ def pypi(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typ
|
|
906
956
|
...
|
907
957
|
|
908
958
|
@typing.overload
|
909
|
-
def
|
910
|
-
"""
|
911
|
-
Internal decorator to support Fast bakery
|
912
|
-
Parameters
|
913
|
-
----------
|
914
|
-
"""
|
915
|
-
...
|
916
|
-
|
917
|
-
@typing.overload
|
918
|
-
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
919
|
-
...
|
920
|
-
|
921
|
-
def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
922
|
-
"""
|
923
|
-
Internal decorator to support Fast bakery
|
924
|
-
Parameters
|
925
|
-
----------
|
926
|
-
"""
|
927
|
-
...
|
928
|
-
|
929
|
-
@typing.overload
|
930
|
-
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]]:
|
959
|
+
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
931
960
|
"""
|
932
|
-
Specifies the
|
933
|
-
|
934
|
-
Use `@conda_base` to set common libraries required by all
|
935
|
-
steps and use `@conda` to specify step-specific additions.
|
961
|
+
Specifies the PyPI packages for all steps of the flow.
|
936
962
|
|
963
|
+
Use `@pypi_base` to set common packages required by all
|
964
|
+
steps and use `@pypi` to specify step-specific overrides.
|
937
965
|
|
938
966
|
Parameters
|
939
967
|
----------
|
940
|
-
packages : Dict[str, str], default {}
|
968
|
+
packages : Dict[str, str], default: {}
|
941
969
|
Packages to use for this flow. The key is the name of the package
|
942
|
-
and the value is the version to use.
|
943
|
-
|
944
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
945
|
-
python : str, optional, default None
|
970
|
+
and the value is the version to use.
|
971
|
+
python : str, optional, default: None
|
946
972
|
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
947
973
|
that the version used will correspond to the version of the Python interpreter used to start the run.
|
948
|
-
disabled : bool, default False
|
949
|
-
If set to True, disables Conda.
|
950
974
|
"""
|
951
975
|
...
|
952
976
|
|
953
977
|
@typing.overload
|
954
|
-
def
|
978
|
+
def pypi_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
955
979
|
...
|
956
980
|
|
957
|
-
def
|
981
|
+
def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None):
|
958
982
|
"""
|
959
|
-
Specifies the
|
960
|
-
|
961
|
-
Use `@conda_base` to set common libraries required by all
|
962
|
-
steps and use `@conda` to specify step-specific additions.
|
983
|
+
Specifies the PyPI packages for all steps of the flow.
|
963
984
|
|
985
|
+
Use `@pypi_base` to set common packages required by all
|
986
|
+
steps and use `@pypi` to specify step-specific overrides.
|
964
987
|
|
965
988
|
Parameters
|
966
989
|
----------
|
967
|
-
packages : Dict[str, str], default {}
|
990
|
+
packages : Dict[str, str], default: {}
|
968
991
|
Packages to use for this flow. The key is the name of the package
|
969
992
|
and the value is the version to use.
|
970
|
-
|
971
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
972
|
-
python : str, optional, default None
|
993
|
+
python : str, optional, default: None
|
973
994
|
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
974
995
|
that the version used will correspond to the version of the Python interpreter used to start the run.
|
975
|
-
disabled : bool, default False
|
976
|
-
If set to True, disables Conda.
|
977
996
|
"""
|
978
997
|
...
|
979
998
|
|
@@ -1020,114 +1039,54 @@ def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str,
|
|
1020
1039
|
"""
|
1021
1040
|
...
|
1022
1041
|
|
1023
|
-
def with_artifact_store(f: typing.Optional[typing.Type[FlowSpecDerived]] = None):
|
1024
|
-
"""
|
1025
|
-
Allows setting external datastores to save data for the
|
1026
|
-
`@checkpoint`/`@model`/`@huggingface_hub` decorators. This is useful
|
1027
|
-
when the compute medium lives in a different geographical location
|
1028
|
-
than metaflow's datastore (e.g. S3, GCS, Azure Blob Storage).
|
1029
|
-
|
1030
|
-
Parameters:
|
1031
|
-
----------
|
1032
|
-
|
1033
|
-
type: str
|
1034
|
-
The type of the datastore. Can be one of 's3', 'gcs', 'azure' or any other supported metaflow Datastore.
|
1035
|
-
|
1036
|
-
config: dict or Callable
|
1037
|
-
Dictionary of configuration options for the datastore. The following keys are required:
|
1038
|
-
- root: The root path in the datastore where the data will be saved. (needs to be in the format expected by the datastore)
|
1039
|
-
- example: 's3://bucket-name/path/to/root'
|
1040
|
-
- example: 'gs://bucket-name/path/to/root'
|
1041
|
-
- example: 'https://myblockacc.blob.core.windows.net/metaflow/'
|
1042
|
-
- role_arn (optional): AWS IAM role to access s3 bucket (only when `type` is 's3')
|
1043
|
-
- session_vars (optional): AWS session variables to access s3 bucket (only when `type` is 's3')
|
1044
|
-
- client_params (optional): AWS client parameters to access s3 bucket (only when `type` is 's3')
|
1045
|
-
Parameters
|
1046
|
-
----------
|
1047
|
-
"""
|
1048
|
-
...
|
1049
|
-
|
1050
1042
|
@typing.overload
|
1051
|
-
def
|
1043
|
+
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]]:
|
1052
1044
|
"""
|
1053
|
-
Specifies the
|
1045
|
+
Specifies the Conda environment for all steps of the flow.
|
1046
|
+
|
1047
|
+
Use `@conda_base` to set common libraries required by all
|
1048
|
+
steps and use `@conda` to specify step-specific additions.
|
1054
1049
|
|
1055
|
-
Use `@pypi_base` to set common packages required by all
|
1056
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1057
1050
|
|
1058
1051
|
Parameters
|
1059
1052
|
----------
|
1060
|
-
packages : Dict[str, str], default
|
1053
|
+
packages : Dict[str, str], default {}
|
1061
1054
|
Packages to use for this flow. The key is the name of the package
|
1062
1055
|
and the value is the version to use.
|
1063
|
-
|
1056
|
+
libraries : Dict[str, str], default {}
|
1057
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1058
|
+
python : str, optional, default None
|
1064
1059
|
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1065
1060
|
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1061
|
+
disabled : bool, default False
|
1062
|
+
If set to True, disables Conda.
|
1066
1063
|
"""
|
1067
1064
|
...
|
1068
1065
|
|
1069
1066
|
@typing.overload
|
1070
|
-
def
|
1067
|
+
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1071
1068
|
...
|
1072
1069
|
|
1073
|
-
def
|
1070
|
+
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):
|
1074
1071
|
"""
|
1075
|
-
Specifies the
|
1072
|
+
Specifies the Conda environment for all steps of the flow.
|
1073
|
+
|
1074
|
+
Use `@conda_base` to set common libraries required by all
|
1075
|
+
steps and use `@conda` to specify step-specific additions.
|
1076
1076
|
|
1077
|
-
Use `@pypi_base` to set common packages required by all
|
1078
|
-
steps and use `@pypi` to specify step-specific overrides.
|
1079
1077
|
|
1080
1078
|
Parameters
|
1081
1079
|
----------
|
1082
|
-
packages : Dict[str, str], default
|
1080
|
+
packages : Dict[str, str], default {}
|
1083
1081
|
Packages to use for this flow. The key is the name of the package
|
1084
1082
|
and the value is the version to use.
|
1085
|
-
|
1083
|
+
libraries : Dict[str, str], default {}
|
1084
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1085
|
+
python : str, optional, default None
|
1086
1086
|
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1087
1087
|
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
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]]:
|
1092
|
-
"""
|
1093
|
-
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)
|
1094
|
-
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
1095
|
-
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1096
|
-
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1097
|
-
starts only after all sensors finish.
|
1098
|
-
|
1099
|
-
|
1100
|
-
Parameters
|
1101
|
-
----------
|
1102
|
-
timeout : int
|
1103
|
-
Time, in seconds before the task times out and fails. (Default: 3600)
|
1104
|
-
poke_interval : int
|
1105
|
-
Time in seconds that the job should wait in between each try. (Default: 60)
|
1106
|
-
mode : str
|
1107
|
-
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1108
|
-
exponential_backoff : bool
|
1109
|
-
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1110
|
-
pool : str
|
1111
|
-
the slot pool this task should run in,
|
1112
|
-
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1113
|
-
soft_fail : bool
|
1114
|
-
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1115
|
-
name : str
|
1116
|
-
Name of the sensor on Airflow
|
1117
|
-
description : str
|
1118
|
-
Description of sensor in the Airflow UI
|
1119
|
-
bucket_key : Union[str, List[str]]
|
1120
|
-
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
1121
|
-
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
1122
|
-
bucket_name : str
|
1123
|
-
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
1124
|
-
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
1125
|
-
wildcard_match : bool
|
1126
|
-
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
1127
|
-
aws_conn_id : str
|
1128
|
-
a reference to the s3 connection on Airflow. (Default: None)
|
1129
|
-
verify : bool
|
1130
|
-
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
1088
|
+
disabled : bool, default False
|
1089
|
+
If set to True, disables Conda.
|
1131
1090
|
"""
|
1132
1091
|
...
|
1133
1092
|
|
@@ -1259,57 +1218,6 @@ def project(*, name: str, branch: typing.Optional[str] = None, production: bool
|
|
1259
1218
|
"""
|
1260
1219
|
...
|
1261
1220
|
|
1262
|
-
@typing.overload
|
1263
|
-
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]]:
|
1264
|
-
"""
|
1265
|
-
Specifies the times when the flow should be run when running on a
|
1266
|
-
production scheduler.
|
1267
|
-
|
1268
|
-
|
1269
|
-
Parameters
|
1270
|
-
----------
|
1271
|
-
hourly : bool, default False
|
1272
|
-
Run the workflow hourly.
|
1273
|
-
daily : bool, default True
|
1274
|
-
Run the workflow daily.
|
1275
|
-
weekly : bool, default False
|
1276
|
-
Run the workflow weekly.
|
1277
|
-
cron : str, optional, default None
|
1278
|
-
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1279
|
-
specified by this expression.
|
1280
|
-
timezone : str, optional, default None
|
1281
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1282
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1283
|
-
"""
|
1284
|
-
...
|
1285
|
-
|
1286
|
-
@typing.overload
|
1287
|
-
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1288
|
-
...
|
1289
|
-
|
1290
|
-
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):
|
1291
|
-
"""
|
1292
|
-
Specifies the times when the flow should be run when running on a
|
1293
|
-
production scheduler.
|
1294
|
-
|
1295
|
-
|
1296
|
-
Parameters
|
1297
|
-
----------
|
1298
|
-
hourly : bool, default False
|
1299
|
-
Run the workflow hourly.
|
1300
|
-
daily : bool, default True
|
1301
|
-
Run the workflow daily.
|
1302
|
-
weekly : bool, default False
|
1303
|
-
Run the workflow weekly.
|
1304
|
-
cron : str, optional, default None
|
1305
|
-
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1306
|
-
specified by this expression.
|
1307
|
-
timezone : str, optional, default None
|
1308
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1309
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1310
|
-
"""
|
1311
|
-
...
|
1312
|
-
|
1313
1221
|
@typing.overload
|
1314
1222
|
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]]:
|
1315
1223
|
"""
|
@@ -1411,5 +1319,99 @@ def trigger_on_finish(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *
|
|
1411
1319
|
"""
|
1412
1320
|
...
|
1413
1321
|
|
1322
|
+
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]]:
|
1323
|
+
"""
|
1324
|
+
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)
|
1325
|
+
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
1326
|
+
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1327
|
+
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1328
|
+
starts only after all sensors finish.
|
1329
|
+
|
1330
|
+
|
1331
|
+
Parameters
|
1332
|
+
----------
|
1333
|
+
timeout : int
|
1334
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
1335
|
+
poke_interval : int
|
1336
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
1337
|
+
mode : str
|
1338
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1339
|
+
exponential_backoff : bool
|
1340
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1341
|
+
pool : str
|
1342
|
+
the slot pool this task should run in,
|
1343
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1344
|
+
soft_fail : bool
|
1345
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1346
|
+
name : str
|
1347
|
+
Name of the sensor on Airflow
|
1348
|
+
description : str
|
1349
|
+
Description of sensor in the Airflow UI
|
1350
|
+
bucket_key : Union[str, List[str]]
|
1351
|
+
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
1352
|
+
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
1353
|
+
bucket_name : str
|
1354
|
+
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
1355
|
+
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
1356
|
+
wildcard_match : bool
|
1357
|
+
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
1358
|
+
aws_conn_id : str
|
1359
|
+
a reference to the s3 connection on Airflow. (Default: None)
|
1360
|
+
verify : bool
|
1361
|
+
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
1362
|
+
"""
|
1363
|
+
...
|
1364
|
+
|
1365
|
+
@typing.overload
|
1366
|
+
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]]:
|
1367
|
+
"""
|
1368
|
+
Specifies the times when the flow should be run when running on a
|
1369
|
+
production scheduler.
|
1370
|
+
|
1371
|
+
|
1372
|
+
Parameters
|
1373
|
+
----------
|
1374
|
+
hourly : bool, default False
|
1375
|
+
Run the workflow hourly.
|
1376
|
+
daily : bool, default True
|
1377
|
+
Run the workflow daily.
|
1378
|
+
weekly : bool, default False
|
1379
|
+
Run the workflow weekly.
|
1380
|
+
cron : str, optional, default None
|
1381
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1382
|
+
specified by this expression.
|
1383
|
+
timezone : str, optional, default None
|
1384
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1385
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1386
|
+
"""
|
1387
|
+
...
|
1388
|
+
|
1389
|
+
@typing.overload
|
1390
|
+
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1391
|
+
...
|
1392
|
+
|
1393
|
+
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):
|
1394
|
+
"""
|
1395
|
+
Specifies the times when the flow should be run when running on a
|
1396
|
+
production scheduler.
|
1397
|
+
|
1398
|
+
|
1399
|
+
Parameters
|
1400
|
+
----------
|
1401
|
+
hourly : bool, default False
|
1402
|
+
Run the workflow hourly.
|
1403
|
+
daily : bool, default True
|
1404
|
+
Run the workflow daily.
|
1405
|
+
weekly : bool, default False
|
1406
|
+
Run the workflow weekly.
|
1407
|
+
cron : str, optional, default None
|
1408
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1409
|
+
specified by this expression.
|
1410
|
+
timezone : str, optional, default None
|
1411
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1412
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1413
|
+
"""
|
1414
|
+
...
|
1415
|
+
|
1414
1416
|
pkg_name: str
|
1415
1417
|
|