ob-metaflow-stubs 6.0.4.4rc0__py2.py3-none-any.whl → 6.0.4.6rc0__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 +781 -787
- metaflow-stubs/cards.pyi +2 -2
- metaflow-stubs/cli.pyi +2 -3
- 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 +6 -5
- metaflow-stubs/client/filecache.pyi +3 -3
- metaflow-stubs/events.pyi +2 -2
- metaflow-stubs/exception.pyi +2 -2
- metaflow-stubs/flowspec.pyi +9 -9
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +3 -3
- metaflow-stubs/{meta_files.pyi → info_file.pyi} +6 -2
- metaflow-stubs/metadata_provider/__init__.pyi +2 -2
- metaflow-stubs/metadata_provider/heartbeat.pyi +2 -2
- metaflow-stubs/metadata_provider/metadata.pyi +2 -2
- metaflow-stubs/metadata_provider/util.pyi +2 -2
- metaflow-stubs/metaflow_config.pyi +2 -6
- metaflow-stubs/metaflow_current.pyi +36 -36
- metaflow-stubs/metaflow_git.pyi +2 -2
- 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 +3 -3
- 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 +5 -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 -4
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/decorator.pyi +4 -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 +3 -3
- 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/context.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/core.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/decorator.pyi +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +4 -4
- 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 +4 -4
- 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 +2 -2
- 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/apps/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_state_machine.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_vendor/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_vendor/spinner/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_vendor/spinner/spinners.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/app_cli.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/app_config.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/capsule.pyi +4 -4
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/click_importer.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/code_package/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/code_package/code_packager.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/cli_generator.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/config_utils.pyi +3 -3
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/schema_export.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/typed_configs.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/unified_config.pyi +3 -3
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/dependencies.pyi +4 -4
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/deployer.pyi +4 -4
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/experimental/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/perimeters.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/utils.pyi +3 -3
- metaflow-stubs/mf_extensions/outerbounds/plugins/aws/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/aws/assume_role_decorator.pyi +8 -12
- metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/async_cards.pyi +3 -3
- metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/injector.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/checkpoint_datastores/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/checkpoint_datastores/coreweave.pyi +11 -13
- metaflow-stubs/mf_extensions/outerbounds/plugins/checkpoint_datastores/nebius.pyi +11 -13
- metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/baker.pyi +4 -4
- metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/docker_environment.pyi +3 -3
- metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/fast_bakery.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/kubernetes/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/kubernetes/pod_killer.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/__init__.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/constants.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/exceptions.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/ollama.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/status_card.pyi +2 -2
- 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/ob_internal.pyi +2 -2
- metaflow-stubs/parameters.pyi +3 -3
- metaflow-stubs/plugins/__init__.pyi +13 -13
- 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 +5 -5
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +2 -2
- metaflow-stubs/plugins/argo/exit_hooks.pyi +3 -3
- metaflow-stubs/plugins/aws/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/aws_client.pyi +2 -2
- metaflow-stubs/plugins/aws/aws_utils.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch.pyi +4 -4
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +2 -2
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +2 -4
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +2 -2
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +4 -4
- 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 +3 -3
- 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 +3 -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 +4 -4
- 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_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 +4 -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 +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 +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/exit_hook/__init__.pyi +2 -2
- metaflow-stubs/plugins/exit_hook/exit_hook_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 +4 -4
- 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 -4
- 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 +3 -3
- metaflow-stubs/plugins/parallel_decorator.pyi +3 -3
- metaflow-stubs/plugins/perimeters.pyi +2 -2
- metaflow-stubs/plugins/project_decorator.pyi +2 -2
- metaflow-stubs/plugins/pypi/__init__.pyi +3 -3
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +8 -5
- metaflow-stubs/plugins/pypi/conda_environment.pyi +5 -6
- metaflow-stubs/plugins/pypi/parsers.pyi +2 -2
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +4 -4
- 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 +4 -4
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_func.pyi +2 -2
- metaflow-stubs/plugins/secrets/secrets_spec.pyi +2 -2
- metaflow-stubs/plugins/secrets/utils.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 +4 -4
- metaflow-stubs/plugins/timeout_decorator.pyi +3 -3
- metaflow-stubs/plugins/torchtune/__init__.pyi +2 -2
- metaflow-stubs/plugins/uv/__init__.pyi +2 -2
- metaflow-stubs/plugins/uv/uv_environment.pyi +2 -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 +29 -29
- metaflow-stubs/runner/deployer_impl.pyi +3 -3
- metaflow-stubs/runner/metaflow_runner.pyi +3 -3
- metaflow-stubs/runner/nbdeploy.pyi +2 -2
- metaflow-stubs/runner/nbrun.pyi +2 -2
- metaflow-stubs/runner/subprocess_manager.pyi +2 -3
- metaflow-stubs/runner/utils.pyi +3 -3
- 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 +3 -2
- metaflow-stubs/user_configs/config_decorators.pyi +251 -0
- metaflow-stubs/user_configs/config_options.pyi +4 -3
- metaflow-stubs/user_configs/config_parameters.pyi +8 -6
- {ob_metaflow_stubs-6.0.4.4rc0.dist-info → ob_metaflow_stubs-6.0.4.6rc0.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-6.0.4.6rc0.dist-info/RECORD +249 -0
- metaflow-stubs/packaging_sys/__init__.pyi +0 -430
- metaflow-stubs/packaging_sys/backend.pyi +0 -73
- metaflow-stubs/packaging_sys/distribution_support.pyi +0 -57
- metaflow-stubs/packaging_sys/tar_backend.pyi +0 -53
- metaflow-stubs/packaging_sys/utils.pyi +0 -26
- metaflow-stubs/packaging_sys/v1.pyi +0 -145
- metaflow-stubs/user_decorators/__init__.pyi +0 -15
- metaflow-stubs/user_decorators/common.pyi +0 -38
- metaflow-stubs/user_decorators/mutable_flow.pyi +0 -223
- metaflow-stubs/user_decorators/mutable_step.pyi +0 -152
- metaflow-stubs/user_decorators/user_flow_decorator.pyi +0 -137
- metaflow-stubs/user_decorators/user_step_decorator.pyi +0 -323
- ob_metaflow_stubs-6.0.4.4rc0.dist-info/RECORD +0 -260
- {ob_metaflow_stubs-6.0.4.4rc0.dist-info → ob_metaflow_stubs-6.0.4.6rc0.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-6.0.4.4rc0.dist-info → ob_metaflow_stubs-6.0.4.6rc0.dist-info}/top_level.txt +0 -0
metaflow-stubs/__init__.pyi
CHANGED
@@ -1,20 +1,19 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
|
-
# MF version: 2.
|
4
|
-
# Generated on 2025-07-
|
3
|
+
# MF version: 2.15.21.2+obcheckpoint(0.2.4);ob(v1) #
|
4
|
+
# Generated on 2025-07-16T22:08:50.283182 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
-
import typing
|
12
11
|
import datetime
|
12
|
+
import typing
|
13
13
|
FlowSpecDerived = typing.TypeVar("FlowSpecDerived", bound="FlowSpec", contravariant=False, covariant=False)
|
14
14
|
StepFlag = typing.NewType("StepFlag", bool)
|
15
15
|
|
16
|
-
from . import
|
17
|
-
from . import packaging_sys as packaging_sys
|
16
|
+
from . import info_file as info_file
|
18
17
|
from . import exception as exception
|
19
18
|
from . import metaflow_config as metaflow_config
|
20
19
|
from . import multicore_utils as multicore_utils
|
@@ -24,7 +23,6 @@ from . import metaflow_current as metaflow_current
|
|
24
23
|
from .metaflow_current import current as current
|
25
24
|
from . import parameters as parameters
|
26
25
|
from . import user_configs as user_configs
|
27
|
-
from . import user_decorators as user_decorators
|
28
26
|
from . import tagging_util as tagging_util
|
29
27
|
from . import metadata_provider as metadata_provider
|
30
28
|
from . import flowspec as flowspec
|
@@ -35,22 +33,20 @@ from .parameters import JSONType as JSONType
|
|
35
33
|
from .user_configs.config_parameters import Config as Config
|
36
34
|
from .user_configs.config_parameters import ConfigValue as ConfigValue
|
37
35
|
from .user_configs.config_parameters import config_expr as config_expr
|
38
|
-
from .
|
39
|
-
from .
|
40
|
-
from .
|
41
|
-
from .user_decorators.user_flow_decorator import FlowMutator as FlowMutator
|
42
|
-
from . import cards as cards
|
36
|
+
from .user_configs.config_decorators import CustomFlowDecorator as CustomFlowDecorator
|
37
|
+
from .user_configs.config_decorators import CustomStepDecorator as CustomStepDecorator
|
38
|
+
from . import events as events
|
43
39
|
from . import metaflow_git as metaflow_git
|
40
|
+
from . import cards as cards
|
44
41
|
from . import tuple_util as tuple_util
|
45
|
-
from . import events as events
|
46
42
|
from . import runner as runner
|
47
43
|
from . import plugins as plugins
|
48
44
|
from .mf_extensions.outerbounds.toplevel.global_aliases_for_metaflow_package import S3 as S3
|
49
45
|
from . import includefile as includefile
|
50
46
|
from .includefile import IncludeFile as IncludeFile
|
51
|
-
from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
|
52
|
-
from .plugins.pypi.parsers import requirements_txt_parser as requirements_txt_parser
|
53
47
|
from .plugins.pypi.parsers import conda_environment_yml_parser as conda_environment_yml_parser
|
48
|
+
from .plugins.pypi.parsers import requirements_txt_parser as requirements_txt_parser
|
49
|
+
from .plugins.pypi.parsers import pyproject_toml_parser as pyproject_toml_parser
|
54
50
|
from . import client as client
|
55
51
|
from .client.core import namespace as namespace
|
56
52
|
from .client.core import get_namespace as get_namespace
|
@@ -87,8 +83,6 @@ from . import ob_internal as ob_internal
|
|
87
83
|
|
88
84
|
EXT_PKG: str
|
89
85
|
|
90
|
-
USER_SKIP_STEP: dict
|
91
|
-
|
92
86
|
@typing.overload
|
93
87
|
def step(f: typing.Callable[[FlowSpecDerived], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
94
88
|
"""
|
@@ -162,460 +156,245 @@ def step(f: typing.Union[typing.Callable[[FlowSpecDerived], None], typing.Callab
|
|
162
156
|
"""
|
163
157
|
...
|
164
158
|
|
165
|
-
|
159
|
+
@typing.overload
|
160
|
+
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]]]:
|
166
161
|
"""
|
167
|
-
|
162
|
+
Specifies a timeout for your step.
|
168
163
|
|
169
|
-
|
170
|
-
--------------
|
171
|
-
@ollama(
|
172
|
-
models=[...],
|
173
|
-
...
|
174
|
-
)
|
164
|
+
This decorator is useful if this step may hang indefinitely.
|
175
165
|
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
- (TODO) 'managed': Outerbounds hosts and selects compute provider.
|
180
|
-
- (TODO) 'remote': Spin up separate instance to serve Ollama models.
|
166
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
167
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
168
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
181
169
|
|
182
|
-
|
183
|
-
|
184
|
-
Any model here https://ollama.com/search, e.g. 'llama3.2', 'llama3.3'
|
170
|
+
Note that all the values specified in parameters are added together so if you specify
|
171
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
185
172
|
|
186
173
|
|
187
174
|
Parameters
|
188
175
|
----------
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
cache_update_policy: str
|
196
|
-
Cache update policy: "auto", "force", or "never".
|
197
|
-
force_cache_update: bool
|
198
|
-
Simple override for "force" cache update policy.
|
199
|
-
debug: bool
|
200
|
-
Whether to turn on verbose debugging logs.
|
201
|
-
circuit_breaker_config: dict
|
202
|
-
Configuration for circuit breaker protection. Keys: failure_threshold, recovery_timeout, reset_timeout.
|
203
|
-
timeout_config: dict
|
204
|
-
Configuration for various operation timeouts. Keys: pull, stop, health_check, install, server_startup.
|
176
|
+
seconds : int, default 0
|
177
|
+
Number of seconds to wait prior to timing out.
|
178
|
+
minutes : int, default 0
|
179
|
+
Number of minutes to wait prior to timing out.
|
180
|
+
hours : int, default 0
|
181
|
+
Number of hours to wait prior to timing out.
|
205
182
|
"""
|
206
183
|
...
|
207
184
|
|
208
185
|
@typing.overload
|
209
|
-
def
|
186
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
187
|
+
...
|
188
|
+
|
189
|
+
@typing.overload
|
190
|
+
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
191
|
+
...
|
192
|
+
|
193
|
+
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):
|
210
194
|
"""
|
211
|
-
Specifies
|
212
|
-
to a step needs to be retried.
|
195
|
+
Specifies a timeout for your step.
|
213
196
|
|
214
|
-
This decorator is useful
|
215
|
-
If your task contains operations that can't be retried safely, e.g. database updates,
|
216
|
-
it is advisable to annotate it with `@retry(times=0)`.
|
197
|
+
This decorator is useful if this step may hang indefinitely.
|
217
198
|
|
218
|
-
This can be used in conjunction with the `@
|
219
|
-
|
220
|
-
|
199
|
+
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
200
|
+
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
201
|
+
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
202
|
+
|
203
|
+
Note that all the values specified in parameters are added together so if you specify
|
204
|
+
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
221
205
|
|
222
206
|
|
223
207
|
Parameters
|
224
208
|
----------
|
225
|
-
|
226
|
-
Number of
|
227
|
-
|
228
|
-
Number of minutes
|
209
|
+
seconds : int, default 0
|
210
|
+
Number of seconds to wait prior to timing out.
|
211
|
+
minutes : int, default 0
|
212
|
+
Number of minutes to wait prior to timing out.
|
213
|
+
hours : int, default 0
|
214
|
+
Number of hours to wait prior to timing out.
|
215
|
+
"""
|
216
|
+
...
|
217
|
+
|
218
|
+
def nvct(*, gpu: int, gpu_type: 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]]]:
|
219
|
+
"""
|
220
|
+
Specifies that this step should execute on DGX cloud.
|
221
|
+
|
222
|
+
|
223
|
+
Parameters
|
224
|
+
----------
|
225
|
+
gpu : int
|
226
|
+
Number of GPUs to use.
|
227
|
+
gpu_type : str
|
228
|
+
Type of Nvidia GPU to use.
|
229
229
|
"""
|
230
230
|
...
|
231
231
|
|
232
232
|
@typing.overload
|
233
|
-
def
|
233
|
+
def app_deploy(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
234
|
+
"""
|
235
|
+
Decorator prototype for all step decorators. This function gets specialized
|
236
|
+
and imported for all decorators types by _import_plugin_decorators().
|
237
|
+
"""
|
234
238
|
...
|
235
239
|
|
236
240
|
@typing.overload
|
237
|
-
def
|
241
|
+
def app_deploy(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
238
242
|
...
|
239
243
|
|
240
|
-
def
|
244
|
+
def app_deploy(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
241
245
|
"""
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
246
|
+
Decorator prototype for all step decorators. This function gets specialized
|
247
|
+
and imported for all decorators types by _import_plugin_decorators().
|
248
|
+
"""
|
249
|
+
...
|
250
|
+
|
251
|
+
@typing.overload
|
252
|
+
def secrets(*, sources: typing.List[typing.Union[str, typing.Dict[str, typing.Any]]] = [], role: 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]]]:
|
253
|
+
"""
|
254
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
255
|
+
the execution of a step.
|
252
256
|
|
253
257
|
|
254
258
|
Parameters
|
255
259
|
----------
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
261
|
+
List of secret specs, defining how the secrets are to be retrieved
|
262
|
+
role : str, optional, default: None
|
263
|
+
Role to use for fetching secrets
|
260
264
|
"""
|
261
265
|
...
|
262
266
|
|
263
|
-
|
267
|
+
@typing.overload
|
268
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
269
|
+
...
|
270
|
+
|
271
|
+
@typing.overload
|
272
|
+
def secrets(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
273
|
+
...
|
274
|
+
|
275
|
+
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]]] = [], role: typing.Optional[str] = None):
|
264
276
|
"""
|
265
|
-
|
266
|
-
|
267
|
-
User code call
|
268
|
-
--------------
|
269
|
-
@vllm(
|
270
|
-
model="...",
|
271
|
-
...
|
272
|
-
)
|
273
|
-
|
274
|
-
Valid backend options
|
275
|
-
---------------------
|
276
|
-
- 'local': Run as a separate process on the local task machine.
|
277
|
-
|
278
|
-
Valid model options
|
279
|
-
-------------------
|
280
|
-
Any HuggingFace model identifier, e.g. 'meta-llama/Llama-3.2-1B'
|
281
|
-
|
282
|
-
NOTE: vLLM's OpenAI-compatible server serves ONE model per server instance.
|
283
|
-
If you need multiple models, you must create multiple @vllm decorators.
|
277
|
+
Specifies secrets to be retrieved and injected as environment variables prior to
|
278
|
+
the execution of a step.
|
284
279
|
|
285
280
|
|
286
281
|
Parameters
|
287
282
|
----------
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
openai_api_server: bool
|
293
|
-
Whether to use OpenAI-compatible API server mode (subprocess) instead of native engine.
|
294
|
-
Default is False (uses native engine).
|
295
|
-
Set to True for backward compatibility with existing code.
|
296
|
-
debug: bool
|
297
|
-
Whether to turn on verbose debugging logs.
|
298
|
-
card_refresh_interval: int
|
299
|
-
Interval in seconds for refreshing the vLLM status card.
|
300
|
-
Only used when openai_api_server=True.
|
301
|
-
max_retries: int
|
302
|
-
Maximum number of retries checking for vLLM server startup.
|
303
|
-
Only used when openai_api_server=True.
|
304
|
-
retry_alert_frequency: int
|
305
|
-
Frequency of alert logs for vLLM server startup retries.
|
306
|
-
Only used when openai_api_server=True.
|
307
|
-
engine_args : dict
|
308
|
-
Additional keyword arguments to pass to the vLLM engine.
|
309
|
-
For example, `tensor_parallel_size=2`.
|
283
|
+
sources : List[Union[str, Dict[str, Any]]], default: []
|
284
|
+
List of secret specs, defining how the secrets are to be retrieved
|
285
|
+
role : str, optional, default: None
|
286
|
+
Role to use for fetching secrets
|
310
287
|
"""
|
311
288
|
...
|
312
289
|
|
313
290
|
@typing.overload
|
314
|
-
def
|
291
|
+
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]]]:
|
315
292
|
"""
|
316
|
-
Specifies the
|
293
|
+
Specifies the PyPI packages for the step.
|
317
294
|
|
318
295
|
Information in this decorator will augment any
|
319
|
-
attributes set in the `@
|
320
|
-
you can use `@
|
321
|
-
steps and use `@
|
296
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
297
|
+
you can use `@pypi_base` to set packages required by all
|
298
|
+
steps and use `@pypi` to specify step-specific overrides.
|
322
299
|
|
323
300
|
|
324
301
|
Parameters
|
325
302
|
----------
|
326
|
-
packages : Dict[str, str], default {}
|
303
|
+
packages : Dict[str, str], default: {}
|
327
304
|
Packages to use for this step. The key is the name of the package
|
328
305
|
and the value is the version to use.
|
329
|
-
|
330
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
331
|
-
python : str, optional, default None
|
306
|
+
python : str, optional, default: None
|
332
307
|
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
333
308
|
that the version used will correspond to the version of the Python interpreter used to start the run.
|
334
|
-
disabled : bool, default False
|
335
|
-
If set to True, disables @conda.
|
336
309
|
"""
|
337
310
|
...
|
338
311
|
|
339
312
|
@typing.overload
|
340
|
-
def
|
313
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
341
314
|
...
|
342
315
|
|
343
316
|
@typing.overload
|
344
|
-
def
|
317
|
+
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
345
318
|
...
|
346
319
|
|
347
|
-
def
|
320
|
+
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):
|
348
321
|
"""
|
349
|
-
Specifies the
|
322
|
+
Specifies the PyPI packages for the step.
|
350
323
|
|
351
324
|
Information in this decorator will augment any
|
352
|
-
attributes set in the `@
|
353
|
-
you can use `@
|
354
|
-
steps and use `@
|
325
|
+
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
326
|
+
you can use `@pypi_base` to set packages required by all
|
327
|
+
steps and use `@pypi` to specify step-specific overrides.
|
355
328
|
|
356
329
|
|
357
330
|
Parameters
|
358
331
|
----------
|
359
|
-
packages : Dict[str, str], default {}
|
332
|
+
packages : Dict[str, str], default: {}
|
360
333
|
Packages to use for this step. The key is the name of the package
|
361
334
|
and the value is the version to use.
|
362
|
-
|
363
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
364
|
-
python : str, optional, default None
|
335
|
+
python : str, optional, default: None
|
365
336
|
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
366
337
|
that the version used will correspond to the version of the Python interpreter used to start the run.
|
367
|
-
disabled : bool, default False
|
368
|
-
If set to True, disables @conda.
|
369
|
-
"""
|
370
|
-
...
|
371
|
-
|
372
|
-
@typing.overload
|
373
|
-
def app_deploy(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
374
|
-
"""
|
375
|
-
Decorator prototype for all step decorators. This function gets specialized
|
376
|
-
and imported for all decorators types by _import_plugin_decorators().
|
377
338
|
"""
|
378
339
|
...
|
379
340
|
|
380
|
-
|
381
|
-
def app_deploy(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
382
|
-
...
|
383
|
-
|
384
|
-
def app_deploy(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
341
|
+
def ollama(*, models: list, backend: str, force_pull: bool, cache_update_policy: str, force_cache_update: bool, debug: bool, circuit_breaker_config: dict, timeout_config: dict) -> 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]]]:
|
385
342
|
"""
|
386
|
-
|
387
|
-
and imported for all decorators types by _import_plugin_decorators().
|
388
|
-
"""
|
389
|
-
...
|
390
|
-
|
391
|
-
@typing.overload
|
392
|
-
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]]]:
|
393
|
-
"""
|
394
|
-
Enables loading / saving of models within a step.
|
395
|
-
|
396
|
-
> Examples
|
397
|
-
- Saving Models
|
398
|
-
```python
|
399
|
-
@model
|
400
|
-
@step
|
401
|
-
def train(self):
|
402
|
-
# current.model.save returns a dictionary reference to the model saved
|
403
|
-
self.my_model = current.model.save(
|
404
|
-
path_to_my_model,
|
405
|
-
label="my_model",
|
406
|
-
metadata={
|
407
|
-
"epochs": 10,
|
408
|
-
"batch-size": 32,
|
409
|
-
"learning-rate": 0.001,
|
410
|
-
}
|
411
|
-
)
|
412
|
-
self.next(self.test)
|
413
|
-
|
414
|
-
@model(load="my_model")
|
415
|
-
@step
|
416
|
-
def test(self):
|
417
|
-
# `current.model.loaded` returns a dictionary of the loaded models
|
418
|
-
# where the key is the name of the artifact and the value is the path to the model
|
419
|
-
print(os.listdir(current.model.loaded["my_model"]))
|
420
|
-
self.next(self.end)
|
421
|
-
```
|
422
|
-
|
423
|
-
- Loading models
|
424
|
-
```python
|
425
|
-
@step
|
426
|
-
def train(self):
|
427
|
-
# current.model.load returns the path to the model loaded
|
428
|
-
checkpoint_path = current.model.load(
|
429
|
-
self.checkpoint_key,
|
430
|
-
)
|
431
|
-
model_path = current.model.load(
|
432
|
-
self.model,
|
433
|
-
)
|
434
|
-
self.next(self.test)
|
435
|
-
```
|
436
|
-
|
437
|
-
|
438
|
-
Parameters
|
439
|
-
----------
|
440
|
-
load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
|
441
|
-
Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
|
442
|
-
These artifact names give to `load` be reference objects or reference `key` string's from objects created by `current.checkpoint` / `current.model` / `current.huggingface_hub`.
|
443
|
-
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
|
444
|
-
the local filesystem. If the second element is None, the artifact will be unpacked in the current working directory.
|
445
|
-
If a string is provided, then the artifact corresponding to that name will be loaded in the current working directory.
|
446
|
-
|
447
|
-
temp_dir_root : str, default: None
|
448
|
-
The root directory under which `current.model.loaded` will store loaded models
|
449
|
-
"""
|
450
|
-
...
|
451
|
-
|
452
|
-
@typing.overload
|
453
|
-
def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
454
|
-
...
|
455
|
-
|
456
|
-
@typing.overload
|
457
|
-
def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
458
|
-
...
|
459
|
-
|
460
|
-
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):
|
461
|
-
"""
|
462
|
-
Enables loading / saving of models within a step.
|
463
|
-
|
464
|
-
> Examples
|
465
|
-
- Saving Models
|
466
|
-
```python
|
467
|
-
@model
|
468
|
-
@step
|
469
|
-
def train(self):
|
470
|
-
# current.model.save returns a dictionary reference to the model saved
|
471
|
-
self.my_model = current.model.save(
|
472
|
-
path_to_my_model,
|
473
|
-
label="my_model",
|
474
|
-
metadata={
|
475
|
-
"epochs": 10,
|
476
|
-
"batch-size": 32,
|
477
|
-
"learning-rate": 0.001,
|
478
|
-
}
|
479
|
-
)
|
480
|
-
self.next(self.test)
|
481
|
-
|
482
|
-
@model(load="my_model")
|
483
|
-
@step
|
484
|
-
def test(self):
|
485
|
-
# `current.model.loaded` returns a dictionary of the loaded models
|
486
|
-
# where the key is the name of the artifact and the value is the path to the model
|
487
|
-
print(os.listdir(current.model.loaded["my_model"]))
|
488
|
-
self.next(self.end)
|
489
|
-
```
|
490
|
-
|
491
|
-
- Loading models
|
492
|
-
```python
|
493
|
-
@step
|
494
|
-
def train(self):
|
495
|
-
# current.model.load returns the path to the model loaded
|
496
|
-
checkpoint_path = current.model.load(
|
497
|
-
self.checkpoint_key,
|
498
|
-
)
|
499
|
-
model_path = current.model.load(
|
500
|
-
self.model,
|
501
|
-
)
|
502
|
-
self.next(self.test)
|
503
|
-
```
|
504
|
-
|
505
|
-
|
506
|
-
Parameters
|
507
|
-
----------
|
508
|
-
load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
|
509
|
-
Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
|
510
|
-
These artifact names give to `load` be reference objects or reference `key` string's from objects created by `current.checkpoint` / `current.model` / `current.huggingface_hub`.
|
511
|
-
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
|
512
|
-
the local filesystem. If the second element is None, the artifact will be unpacked in the current working directory.
|
513
|
-
If a string is provided, then the artifact corresponding to that name will be loaded in the current working directory.
|
514
|
-
|
515
|
-
temp_dir_root : str, default: None
|
516
|
-
The root directory under which `current.model.loaded` will store loaded models
|
517
|
-
"""
|
518
|
-
...
|
519
|
-
|
520
|
-
@typing.overload
|
521
|
-
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]]]:
|
522
|
-
"""
|
523
|
-
Specifies that the step will success under all circumstances.
|
524
|
-
|
525
|
-
The decorator will create an optional artifact, specified by `var`, which
|
526
|
-
contains the exception raised. You can use it to detect the presence
|
527
|
-
of errors, indicating that all happy-path artifacts produced by the step
|
528
|
-
are missing.
|
343
|
+
This decorator is used to run Ollama APIs as Metaflow task sidecars.
|
529
344
|
|
345
|
+
User code call
|
346
|
+
--------------
|
347
|
+
@ollama(
|
348
|
+
models=[...],
|
349
|
+
...
|
350
|
+
)
|
530
351
|
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
print_exception : bool, default True
|
537
|
-
Determines whether or not the exception is printed to
|
538
|
-
stdout when caught.
|
539
|
-
"""
|
540
|
-
...
|
541
|
-
|
542
|
-
@typing.overload
|
543
|
-
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
544
|
-
...
|
545
|
-
|
546
|
-
@typing.overload
|
547
|
-
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
548
|
-
...
|
549
|
-
|
550
|
-
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):
|
551
|
-
"""
|
552
|
-
Specifies that the step will success under all circumstances.
|
352
|
+
Valid backend options
|
353
|
+
---------------------
|
354
|
+
- 'local': Run as a separate process on the local task machine.
|
355
|
+
- (TODO) 'managed': Outerbounds hosts and selects compute provider.
|
356
|
+
- (TODO) 'remote': Spin up separate instance to serve Ollama models.
|
553
357
|
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
are missing.
|
358
|
+
Valid model options
|
359
|
+
-------------------
|
360
|
+
Any model here https://ollama.com/search, e.g. 'llama3.2', 'llama3.3'
|
558
361
|
|
559
362
|
|
560
363
|
Parameters
|
561
364
|
----------
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
365
|
+
models: list[str]
|
366
|
+
List of Ollama containers running models in sidecars.
|
367
|
+
backend: str
|
368
|
+
Determines where and how to run the Ollama process.
|
369
|
+
force_pull: bool
|
370
|
+
Whether to run `ollama pull` no matter what, or first check the remote cache in Metaflow datastore for this model key.
|
371
|
+
cache_update_policy: str
|
372
|
+
Cache update policy: "auto", "force", or "never".
|
373
|
+
force_cache_update: bool
|
374
|
+
Simple override for "force" cache update policy.
|
375
|
+
debug: bool
|
376
|
+
Whether to turn on verbose debugging logs.
|
377
|
+
circuit_breaker_config: dict
|
378
|
+
Configuration for circuit breaker protection. Keys: failure_threshold, recovery_timeout, reset_timeout.
|
379
|
+
timeout_config: dict
|
380
|
+
Configuration for various operation timeouts. Keys: pull, stop, health_check, install, server_startup.
|
568
381
|
"""
|
569
382
|
...
|
570
383
|
|
571
384
|
@typing.overload
|
572
|
-
def
|
385
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
573
386
|
"""
|
574
|
-
|
575
|
-
|
576
|
-
Information in this decorator will augment any
|
577
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
578
|
-
you can use `@pypi_base` to set packages required by all
|
579
|
-
steps and use `@pypi` to specify step-specific overrides.
|
580
|
-
|
581
|
-
|
582
|
-
Parameters
|
583
|
-
----------
|
584
|
-
packages : Dict[str, str], default: {}
|
585
|
-
Packages to use for this step. The key is the name of the package
|
586
|
-
and the value is the version to use.
|
587
|
-
python : str, optional, default: None
|
588
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
589
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
387
|
+
Internal decorator to support Fast bakery
|
590
388
|
"""
|
591
389
|
...
|
592
390
|
|
593
391
|
@typing.overload
|
594
|
-
def
|
595
|
-
...
|
596
|
-
|
597
|
-
@typing.overload
|
598
|
-
def pypi(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
392
|
+
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
599
393
|
...
|
600
394
|
|
601
|
-
def
|
395
|
+
def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
602
396
|
"""
|
603
|
-
|
604
|
-
|
605
|
-
Information in this decorator will augment any
|
606
|
-
attributes set in the `@pyi_base` flow-level decorator. Hence,
|
607
|
-
you can use `@pypi_base` to set packages required by all
|
608
|
-
steps and use `@pypi` to specify step-specific overrides.
|
609
|
-
|
610
|
-
|
611
|
-
Parameters
|
612
|
-
----------
|
613
|
-
packages : Dict[str, str], default: {}
|
614
|
-
Packages to use for this step. The key is the name of the package
|
615
|
-
and the value is the version to use.
|
616
|
-
python : str, optional, default: None
|
617
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
618
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
397
|
+
Internal decorator to support Fast bakery
|
619
398
|
"""
|
620
399
|
...
|
621
400
|
|
@@ -708,6 +487,56 @@ def kubernetes(*, cpu: int = 1, memory: int = 4096, disk: int = 10240, image: ty
|
|
708
487
|
"""
|
709
488
|
...
|
710
489
|
|
490
|
+
def vllm(*, model: str, backend: str, openai_api_server: bool, debug: bool, card_refresh_interval: int, max_retries: int, retry_alert_frequency: int, engine_args: dict) -> 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]]]:
|
491
|
+
"""
|
492
|
+
This decorator is used to run vllm APIs as Metaflow task sidecars.
|
493
|
+
|
494
|
+
User code call
|
495
|
+
--------------
|
496
|
+
@vllm(
|
497
|
+
model="...",
|
498
|
+
...
|
499
|
+
)
|
500
|
+
|
501
|
+
Valid backend options
|
502
|
+
---------------------
|
503
|
+
- 'local': Run as a separate process on the local task machine.
|
504
|
+
|
505
|
+
Valid model options
|
506
|
+
-------------------
|
507
|
+
Any HuggingFace model identifier, e.g. 'meta-llama/Llama-3.2-1B'
|
508
|
+
|
509
|
+
NOTE: vLLM's OpenAI-compatible server serves ONE model per server instance.
|
510
|
+
If you need multiple models, you must create multiple @vllm decorators.
|
511
|
+
|
512
|
+
|
513
|
+
Parameters
|
514
|
+
----------
|
515
|
+
model: str
|
516
|
+
HuggingFace model identifier to be served by vLLM.
|
517
|
+
backend: str
|
518
|
+
Determines where and how to run the vLLM process.
|
519
|
+
openai_api_server: bool
|
520
|
+
Whether to use OpenAI-compatible API server mode (subprocess) instead of native engine.
|
521
|
+
Default is False (uses native engine).
|
522
|
+
Set to True for backward compatibility with existing code.
|
523
|
+
debug: bool
|
524
|
+
Whether to turn on verbose debugging logs.
|
525
|
+
card_refresh_interval: int
|
526
|
+
Interval in seconds for refreshing the vLLM status card.
|
527
|
+
Only used when openai_api_server=True.
|
528
|
+
max_retries: int
|
529
|
+
Maximum number of retries checking for vLLM server startup.
|
530
|
+
Only used when openai_api_server=True.
|
531
|
+
retry_alert_frequency: int
|
532
|
+
Frequency of alert logs for vLLM server startup retries.
|
533
|
+
Only used when openai_api_server=True.
|
534
|
+
engine_args : dict
|
535
|
+
Additional keyword arguments to pass to the vLLM engine.
|
536
|
+
For example, `tensor_parallel_size=2`.
|
537
|
+
"""
|
538
|
+
...
|
539
|
+
|
711
540
|
@typing.overload
|
712
541
|
def parallel(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
713
542
|
"""
|
@@ -727,52 +556,132 @@ def parallel(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None],
|
|
727
556
|
"""
|
728
557
|
...
|
729
558
|
|
730
|
-
|
559
|
+
@typing.overload
|
560
|
+
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]]]:
|
731
561
|
"""
|
732
|
-
|
562
|
+
Enables loading / saving of models within a step.
|
733
563
|
|
564
|
+
> Examples
|
565
|
+
- Saving Models
|
566
|
+
```python
|
567
|
+
@model
|
568
|
+
@step
|
569
|
+
def train(self):
|
570
|
+
# current.model.save returns a dictionary reference to the model saved
|
571
|
+
self.my_model = current.model.save(
|
572
|
+
path_to_my_model,
|
573
|
+
label="my_model",
|
574
|
+
metadata={
|
575
|
+
"epochs": 10,
|
576
|
+
"batch-size": 32,
|
577
|
+
"learning-rate": 0.001,
|
578
|
+
}
|
579
|
+
)
|
580
|
+
self.next(self.test)
|
734
581
|
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
@
|
747
|
-
def
|
748
|
-
|
749
|
-
|
582
|
+
@model(load="my_model")
|
583
|
+
@step
|
584
|
+
def test(self):
|
585
|
+
# `current.model.loaded` returns a dictionary of the loaded models
|
586
|
+
# where the key is the name of the artifact and the value is the path to the model
|
587
|
+
print(os.listdir(current.model.loaded["my_model"]))
|
588
|
+
self.next(self.end)
|
589
|
+
```
|
590
|
+
|
591
|
+
- Loading models
|
592
|
+
```python
|
593
|
+
@step
|
594
|
+
def train(self):
|
595
|
+
# current.model.load returns the path to the model loaded
|
596
|
+
checkpoint_path = current.model.load(
|
597
|
+
self.checkpoint_key,
|
598
|
+
)
|
599
|
+
model_path = current.model.load(
|
600
|
+
self.model,
|
601
|
+
)
|
602
|
+
self.next(self.test)
|
603
|
+
```
|
750
604
|
|
751
605
|
|
752
606
|
Parameters
|
753
607
|
----------
|
754
|
-
|
755
|
-
|
608
|
+
load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
|
609
|
+
Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
|
610
|
+
These artifact names give to `load` be reference objects or reference `key` string's from objects created by `current.checkpoint` / `current.model` / `current.huggingface_hub`.
|
611
|
+
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
|
612
|
+
the local filesystem. If the second element is None, the artifact will be unpacked in the current working directory.
|
613
|
+
If a string is provided, then the artifact corresponding to that name will be loaded in the current working directory.
|
614
|
+
|
615
|
+
temp_dir_root : str, default: None
|
616
|
+
The root directory under which `current.model.loaded` will store loaded models
|
756
617
|
"""
|
757
618
|
...
|
758
619
|
|
759
620
|
@typing.overload
|
760
|
-
def
|
621
|
+
def model(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
761
622
|
...
|
762
623
|
|
763
624
|
@typing.overload
|
764
|
-
def
|
625
|
+
def model(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
765
626
|
...
|
766
627
|
|
767
|
-
def
|
628
|
+
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):
|
768
629
|
"""
|
769
|
-
|
630
|
+
Enables loading / saving of models within a step.
|
631
|
+
|
632
|
+
> Examples
|
633
|
+
- Saving Models
|
634
|
+
```python
|
635
|
+
@model
|
636
|
+
@step
|
637
|
+
def train(self):
|
638
|
+
# current.model.save returns a dictionary reference to the model saved
|
639
|
+
self.my_model = current.model.save(
|
640
|
+
path_to_my_model,
|
641
|
+
label="my_model",
|
642
|
+
metadata={
|
643
|
+
"epochs": 10,
|
644
|
+
"batch-size": 32,
|
645
|
+
"learning-rate": 0.001,
|
646
|
+
}
|
647
|
+
)
|
648
|
+
self.next(self.test)
|
649
|
+
|
650
|
+
@model(load="my_model")
|
651
|
+
@step
|
652
|
+
def test(self):
|
653
|
+
# `current.model.loaded` returns a dictionary of the loaded models
|
654
|
+
# where the key is the name of the artifact and the value is the path to the model
|
655
|
+
print(os.listdir(current.model.loaded["my_model"]))
|
656
|
+
self.next(self.end)
|
657
|
+
```
|
658
|
+
|
659
|
+
- Loading models
|
660
|
+
```python
|
661
|
+
@step
|
662
|
+
def train(self):
|
663
|
+
# current.model.load returns the path to the model loaded
|
664
|
+
checkpoint_path = current.model.load(
|
665
|
+
self.checkpoint_key,
|
666
|
+
)
|
667
|
+
model_path = current.model.load(
|
668
|
+
self.model,
|
669
|
+
)
|
670
|
+
self.next(self.test)
|
671
|
+
```
|
770
672
|
|
771
673
|
|
772
674
|
Parameters
|
773
675
|
----------
|
774
|
-
|
775
|
-
|
676
|
+
load : Union[List[str],str,List[Tuple[str,Union[str,None]]]], default: None
|
677
|
+
Artifact name/s referencing the models/checkpoints to load. Artifact names refer to the names of the instance variables set to `self`.
|
678
|
+
These artifact names give to `load` be reference objects or reference `key` string's from objects created by `current.checkpoint` / `current.model` / `current.huggingface_hub`.
|
679
|
+
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
|
680
|
+
the local filesystem. If the second element is None, the artifact will be unpacked in the current working directory.
|
681
|
+
If a string is provided, then the artifact corresponding to that name will be loaded in the current working directory.
|
682
|
+
|
683
|
+
temp_dir_root : str, default: None
|
684
|
+
The root directory under which `current.model.loaded` will store loaded models
|
776
685
|
"""
|
777
686
|
...
|
778
687
|
|
@@ -923,42 +832,133 @@ def checkpoint(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None
|
|
923
832
|
"""
|
924
833
|
...
|
925
834
|
|
835
|
+
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]]]:
|
836
|
+
"""
|
837
|
+
Specifies that this step should execute on DGX cloud.
|
838
|
+
|
839
|
+
|
840
|
+
Parameters
|
841
|
+
----------
|
842
|
+
gpu : int
|
843
|
+
Number of GPUs to use.
|
844
|
+
gpu_type : str
|
845
|
+
Type of Nvidia GPU to use.
|
846
|
+
queue_timeout : int
|
847
|
+
Time to keep the job in NVCF's queue.
|
848
|
+
"""
|
849
|
+
...
|
850
|
+
|
926
851
|
@typing.overload
|
927
|
-
def
|
852
|
+
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]]]:
|
928
853
|
"""
|
929
|
-
Specifies
|
930
|
-
|
854
|
+
Specifies the number of times the task corresponding
|
855
|
+
to a step needs to be retried.
|
856
|
+
|
857
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
858
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
859
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
860
|
+
|
861
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
862
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
863
|
+
ensuring that the flow execution can continue.
|
931
864
|
|
932
865
|
|
933
866
|
Parameters
|
934
867
|
----------
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
868
|
+
times : int, default 3
|
869
|
+
Number of times to retry this task.
|
870
|
+
minutes_between_retries : int, default 2
|
871
|
+
Number of minutes between retries.
|
939
872
|
"""
|
940
873
|
...
|
941
874
|
|
942
875
|
@typing.overload
|
943
|
-
def
|
876
|
+
def retry(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
944
877
|
...
|
945
878
|
|
946
879
|
@typing.overload
|
947
|
-
def
|
880
|
+
def retry(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
881
|
+
...
|
882
|
+
|
883
|
+
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):
|
884
|
+
"""
|
885
|
+
Specifies the number of times the task corresponding
|
886
|
+
to a step needs to be retried.
|
887
|
+
|
888
|
+
This decorator is useful for handling transient errors, such as networking issues.
|
889
|
+
If your task contains operations that can't be retried safely, e.g. database updates,
|
890
|
+
it is advisable to annotate it with `@retry(times=0)`.
|
891
|
+
|
892
|
+
This can be used in conjunction with the `@catch` decorator. The `@catch`
|
893
|
+
decorator will execute a no-op task after all retries have been exhausted,
|
894
|
+
ensuring that the flow execution can continue.
|
895
|
+
|
896
|
+
|
897
|
+
Parameters
|
898
|
+
----------
|
899
|
+
times : int, default 3
|
900
|
+
Number of times to retry this task.
|
901
|
+
minutes_between_retries : int, default 2
|
902
|
+
Number of minutes between retries.
|
903
|
+
"""
|
904
|
+
...
|
905
|
+
|
906
|
+
@typing.overload
|
907
|
+
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]]]:
|
908
|
+
"""
|
909
|
+
Specifies the Conda environment for the step.
|
910
|
+
|
911
|
+
Information in this decorator will augment any
|
912
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
913
|
+
you can use `@conda_base` to set packages required by all
|
914
|
+
steps and use `@conda` to specify step-specific overrides.
|
915
|
+
|
916
|
+
|
917
|
+
Parameters
|
918
|
+
----------
|
919
|
+
packages : Dict[str, str], default {}
|
920
|
+
Packages to use for this step. The key is the name of the package
|
921
|
+
and the value is the version to use.
|
922
|
+
libraries : Dict[str, str], default {}
|
923
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
924
|
+
python : str, optional, default None
|
925
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
926
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
927
|
+
disabled : bool, default False
|
928
|
+
If set to True, disables @conda.
|
929
|
+
"""
|
930
|
+
...
|
931
|
+
|
932
|
+
@typing.overload
|
933
|
+
def conda(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
934
|
+
...
|
935
|
+
|
936
|
+
@typing.overload
|
937
|
+
def conda(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
948
938
|
...
|
949
939
|
|
950
|
-
def
|
940
|
+
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):
|
951
941
|
"""
|
952
|
-
Specifies
|
953
|
-
|
942
|
+
Specifies the Conda environment for the step.
|
943
|
+
|
944
|
+
Information in this decorator will augment any
|
945
|
+
attributes set in the `@conda_base` flow-level decorator. Hence,
|
946
|
+
you can use `@conda_base` to set packages required by all
|
947
|
+
steps and use `@conda` to specify step-specific overrides.
|
954
948
|
|
955
949
|
|
956
950
|
Parameters
|
957
951
|
----------
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
952
|
+
packages : Dict[str, str], default {}
|
953
|
+
Packages to use for this step. The key is the name of the package
|
954
|
+
and the value is the version to use.
|
955
|
+
libraries : Dict[str, str], default {}
|
956
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
957
|
+
python : str, optional, default None
|
958
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
959
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
960
|
+
disabled : bool, default False
|
961
|
+
If set to True, disables @conda.
|
962
962
|
"""
|
963
963
|
...
|
964
964
|
|
@@ -1042,145 +1042,6 @@ def huggingface_hub(*, temp_dir_root: typing.Optional[str] = None, load: typing.
|
|
1042
1042
|
"""
|
1043
1043
|
...
|
1044
1044
|
|
1045
|
-
def nvct(*, gpu: int, gpu_type: 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]]]:
|
1046
|
-
"""
|
1047
|
-
Specifies that this step should execute on DGX cloud.
|
1048
|
-
|
1049
|
-
|
1050
|
-
Parameters
|
1051
|
-
----------
|
1052
|
-
gpu : int
|
1053
|
-
Number of GPUs to use.
|
1054
|
-
gpu_type : str
|
1055
|
-
Type of Nvidia GPU to use.
|
1056
|
-
"""
|
1057
|
-
...
|
1058
|
-
|
1059
|
-
@typing.overload
|
1060
|
-
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]]]:
|
1061
|
-
"""
|
1062
|
-
Specifies a timeout for your step.
|
1063
|
-
|
1064
|
-
This decorator is useful if this step may hang indefinitely.
|
1065
|
-
|
1066
|
-
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
1067
|
-
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
1068
|
-
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
1069
|
-
|
1070
|
-
Note that all the values specified in parameters are added together so if you specify
|
1071
|
-
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
1072
|
-
|
1073
|
-
|
1074
|
-
Parameters
|
1075
|
-
----------
|
1076
|
-
seconds : int, default 0
|
1077
|
-
Number of seconds to wait prior to timing out.
|
1078
|
-
minutes : int, default 0
|
1079
|
-
Number of minutes to wait prior to timing out.
|
1080
|
-
hours : int, default 0
|
1081
|
-
Number of hours to wait prior to timing out.
|
1082
|
-
"""
|
1083
|
-
...
|
1084
|
-
|
1085
|
-
@typing.overload
|
1086
|
-
def timeout(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1087
|
-
...
|
1088
|
-
|
1089
|
-
@typing.overload
|
1090
|
-
def timeout(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1091
|
-
...
|
1092
|
-
|
1093
|
-
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):
|
1094
|
-
"""
|
1095
|
-
Specifies a timeout for your step.
|
1096
|
-
|
1097
|
-
This decorator is useful if this step may hang indefinitely.
|
1098
|
-
|
1099
|
-
This can be used in conjunction with the `@retry` decorator as well as the `@catch` decorator.
|
1100
|
-
A timeout is considered to be an exception thrown by the step. It will cause the step to be
|
1101
|
-
retried if needed and the exception will be caught by the `@catch` decorator, if present.
|
1102
|
-
|
1103
|
-
Note that all the values specified in parameters are added together so if you specify
|
1104
|
-
60 seconds and 1 hour, the decorator will have an effective timeout of 1 hour and 1 minute.
|
1105
|
-
|
1106
|
-
|
1107
|
-
Parameters
|
1108
|
-
----------
|
1109
|
-
seconds : int, default 0
|
1110
|
-
Number of seconds to wait prior to timing out.
|
1111
|
-
minutes : int, default 0
|
1112
|
-
Number of minutes to wait prior to timing out.
|
1113
|
-
hours : int, default 0
|
1114
|
-
Number of hours to wait prior to timing out.
|
1115
|
-
"""
|
1116
|
-
...
|
1117
|
-
|
1118
|
-
@typing.overload
|
1119
|
-
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]]]:
|
1120
|
-
"""
|
1121
|
-
Creates a human-readable report, a Metaflow Card, after this step completes.
|
1122
|
-
|
1123
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
1124
|
-
|
1125
|
-
|
1126
|
-
Parameters
|
1127
|
-
----------
|
1128
|
-
type : str, default 'default'
|
1129
|
-
Card type.
|
1130
|
-
id : str, optional, default None
|
1131
|
-
If multiple cards are present, use this id to identify this card.
|
1132
|
-
options : Dict[str, Any], default {}
|
1133
|
-
Options passed to the card. The contents depend on the card type.
|
1134
|
-
timeout : int, default 45
|
1135
|
-
Interrupt reporting if it takes more than this many seconds.
|
1136
|
-
"""
|
1137
|
-
...
|
1138
|
-
|
1139
|
-
@typing.overload
|
1140
|
-
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1141
|
-
...
|
1142
|
-
|
1143
|
-
@typing.overload
|
1144
|
-
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1145
|
-
...
|
1146
|
-
|
1147
|
-
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):
|
1148
|
-
"""
|
1149
|
-
Creates a human-readable report, a Metaflow Card, after this step completes.
|
1150
|
-
|
1151
|
-
Note that you may add multiple `@card` decorators in a step with different parameters.
|
1152
|
-
|
1153
|
-
|
1154
|
-
Parameters
|
1155
|
-
----------
|
1156
|
-
type : str, default 'default'
|
1157
|
-
Card type.
|
1158
|
-
id : str, optional, default None
|
1159
|
-
If multiple cards are present, use this id to identify this card.
|
1160
|
-
options : Dict[str, Any], default {}
|
1161
|
-
Options passed to the card. The contents depend on the card type.
|
1162
|
-
timeout : int, default 45
|
1163
|
-
Interrupt reporting if it takes more than this many seconds.
|
1164
|
-
"""
|
1165
|
-
...
|
1166
|
-
|
1167
|
-
@typing.overload
|
1168
|
-
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1169
|
-
"""
|
1170
|
-
Internal decorator to support Fast bakery
|
1171
|
-
"""
|
1172
|
-
...
|
1173
|
-
|
1174
|
-
@typing.overload
|
1175
|
-
def fast_bakery_internal(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1176
|
-
...
|
1177
|
-
|
1178
|
-
def fast_bakery_internal(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None):
|
1179
|
-
"""
|
1180
|
-
Internal decorator to support Fast bakery
|
1181
|
-
"""
|
1182
|
-
...
|
1183
|
-
|
1184
1045
|
@typing.overload
|
1185
1046
|
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]]]:
|
1186
1047
|
"""
|
@@ -1261,164 +1122,142 @@ def resources(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None]
|
|
1261
1122
|
...
|
1262
1123
|
|
1263
1124
|
@typing.overload
|
1264
|
-
def
|
1125
|
+
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]]]:
|
1265
1126
|
"""
|
1266
|
-
Specifies the
|
1127
|
+
Specifies that the step will success under all circumstances.
|
1267
1128
|
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
```
|
1273
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1274
|
-
```
|
1275
|
-
This decorator respects the @project decorator and triggers the flow
|
1276
|
-
when upstream runs within the same namespace complete successfully
|
1129
|
+
The decorator will create an optional artifact, specified by `var`, which
|
1130
|
+
contains the exception raised. You can use it to detect the presence
|
1131
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
1132
|
+
are missing.
|
1277
1133
|
|
1278
|
-
Additionally, you can specify project aware upstream flow dependencies
|
1279
|
-
by specifying the fully qualified project_flow_name.
|
1280
|
-
```
|
1281
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1282
|
-
```
|
1283
|
-
or
|
1284
|
-
```
|
1285
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1286
|
-
```
|
1287
1134
|
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1135
|
+
Parameters
|
1136
|
+
----------
|
1137
|
+
var : str, optional, default None
|
1138
|
+
Name of the artifact in which to store the caught exception.
|
1139
|
+
If not specified, the exception is not stored.
|
1140
|
+
print_exception : bool, default True
|
1141
|
+
Determines whether or not the exception is printed to
|
1142
|
+
stdout when caught.
|
1143
|
+
"""
|
1144
|
+
...
|
1145
|
+
|
1146
|
+
@typing.overload
|
1147
|
+
def catch(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1148
|
+
...
|
1149
|
+
|
1150
|
+
@typing.overload
|
1151
|
+
def catch(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1152
|
+
...
|
1153
|
+
|
1154
|
+
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):
|
1155
|
+
"""
|
1156
|
+
Specifies that the step will success under all circumstances.
|
1293
1157
|
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
- `prod.staging`
|
1158
|
+
The decorator will create an optional artifact, specified by `var`, which
|
1159
|
+
contains the exception raised. You can use it to detect the presence
|
1160
|
+
of errors, indicating that all happy-path artifacts produced by the step
|
1161
|
+
are missing.
|
1299
1162
|
|
1300
1163
|
|
1301
1164
|
Parameters
|
1302
1165
|
----------
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1166
|
+
var : str, optional, default None
|
1167
|
+
Name of the artifact in which to store the caught exception.
|
1168
|
+
If not specified, the exception is not stored.
|
1169
|
+
print_exception : bool, default True
|
1170
|
+
Determines whether or not the exception is printed to
|
1171
|
+
stdout when caught.
|
1309
1172
|
"""
|
1310
1173
|
...
|
1311
1174
|
|
1312
1175
|
@typing.overload
|
1313
|
-
def
|
1176
|
+
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]]]:
|
1177
|
+
"""
|
1178
|
+
Specifies environment variables to be set prior to the execution of a step.
|
1179
|
+
|
1180
|
+
|
1181
|
+
Parameters
|
1182
|
+
----------
|
1183
|
+
vars : Dict[str, str], default {}
|
1184
|
+
Dictionary of environment variables to set.
|
1185
|
+
"""
|
1186
|
+
...
|
1187
|
+
|
1188
|
+
@typing.overload
|
1189
|
+
def environment(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1190
|
+
...
|
1191
|
+
|
1192
|
+
@typing.overload
|
1193
|
+
def environment(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1314
1194
|
...
|
1315
1195
|
|
1316
|
-
def
|
1196
|
+
def environment(f: typing.Union[typing.Callable[[FlowSpecDerived, StepFlag], None], typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None], None] = None, *, vars: typing.Dict[str, str] = {}):
|
1317
1197
|
"""
|
1318
|
-
Specifies
|
1319
|
-
|
1320
|
-
```
|
1321
|
-
@trigger_on_finish(flow='FooFlow')
|
1322
|
-
```
|
1323
|
-
or
|
1324
|
-
```
|
1325
|
-
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1326
|
-
```
|
1327
|
-
This decorator respects the @project decorator and triggers the flow
|
1328
|
-
when upstream runs within the same namespace complete successfully
|
1329
|
-
|
1330
|
-
Additionally, you can specify project aware upstream flow dependencies
|
1331
|
-
by specifying the fully qualified project_flow_name.
|
1332
|
-
```
|
1333
|
-
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1334
|
-
```
|
1335
|
-
or
|
1336
|
-
```
|
1337
|
-
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1338
|
-
```
|
1339
|
-
|
1340
|
-
You can also specify just the project or project branch (other values will be
|
1341
|
-
inferred from the current project or project branch):
|
1342
|
-
```
|
1343
|
-
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1344
|
-
```
|
1345
|
-
|
1346
|
-
Note that `branch` is typically one of:
|
1347
|
-
- `prod`
|
1348
|
-
- `user.bob`
|
1349
|
-
- `test.my_experiment`
|
1350
|
-
- `prod.staging`
|
1198
|
+
Specifies environment variables to be set prior to the execution of a step.
|
1351
1199
|
|
1352
1200
|
|
1353
1201
|
Parameters
|
1354
1202
|
----------
|
1355
|
-
|
1356
|
-
|
1357
|
-
flows : List[Union[str, Dict[str, str]]], default []
|
1358
|
-
Upstream flow dependencies for this flow.
|
1359
|
-
options : Dict[str, Any], default {}
|
1360
|
-
Backend-specific configuration for tuning eventing behavior.
|
1203
|
+
vars : Dict[str, str], default {}
|
1204
|
+
Dictionary of environment variables to set.
|
1361
1205
|
"""
|
1362
1206
|
...
|
1363
1207
|
|
1364
1208
|
@typing.overload
|
1365
|
-
def
|
1209
|
+
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]]]:
|
1366
1210
|
"""
|
1367
|
-
|
1368
|
-
|
1211
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
1212
|
+
|
1213
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
1369
1214
|
|
1370
1215
|
|
1371
1216
|
Parameters
|
1372
1217
|
----------
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
specified by this expression.
|
1382
|
-
timezone : str, optional, default None
|
1383
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1384
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1218
|
+
type : str, default 'default'
|
1219
|
+
Card type.
|
1220
|
+
id : str, optional, default None
|
1221
|
+
If multiple cards are present, use this id to identify this card.
|
1222
|
+
options : Dict[str, Any], default {}
|
1223
|
+
Options passed to the card. The contents depend on the card type.
|
1224
|
+
timeout : int, default 45
|
1225
|
+
Interrupt reporting if it takes more than this many seconds.
|
1385
1226
|
"""
|
1386
1227
|
...
|
1387
1228
|
|
1388
1229
|
@typing.overload
|
1389
|
-
def
|
1230
|
+
def card(f: typing.Callable[[FlowSpecDerived, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, StepFlag], None]:
|
1390
1231
|
...
|
1391
1232
|
|
1392
|
-
|
1233
|
+
@typing.overload
|
1234
|
+
def card(f: typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]) -> typing.Callable[[FlowSpecDerived, typing.Any, StepFlag], None]:
|
1235
|
+
...
|
1236
|
+
|
1237
|
+
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):
|
1393
1238
|
"""
|
1394
|
-
|
1395
|
-
|
1239
|
+
Creates a human-readable report, a Metaflow Card, after this step completes.
|
1240
|
+
|
1241
|
+
Note that you may add multiple `@card` decorators in a step with different parameters.
|
1396
1242
|
|
1397
1243
|
|
1398
1244
|
Parameters
|
1399
1245
|
----------
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
specified by this expression.
|
1409
|
-
timezone : str, optional, default None
|
1410
|
-
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1411
|
-
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1246
|
+
type : str, default 'default'
|
1247
|
+
Card type.
|
1248
|
+
id : str, optional, default None
|
1249
|
+
If multiple cards are present, use this id to identify this card.
|
1250
|
+
options : Dict[str, Any], default {}
|
1251
|
+
Options passed to the card. The contents depend on the card type.
|
1252
|
+
timeout : int, default 45
|
1253
|
+
Interrupt reporting if it takes more than this many seconds.
|
1412
1254
|
"""
|
1413
1255
|
...
|
1414
1256
|
|
1415
|
-
def
|
1257
|
+
def airflow_external_task_sensor(*, timeout: int, poke_interval: int, mode: str, exponential_backoff: bool, pool: str, soft_fail: bool, name: str, description: str, external_dag_id: str, external_task_ids: typing.List[str], allowed_states: typing.List[str], failed_states: typing.List[str], execution_delta: "datetime.timedelta", check_existence: bool) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1416
1258
|
"""
|
1417
|
-
The `@
|
1418
|
-
|
1419
|
-
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1420
|
-
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1421
|
-
starts only after all sensors finish.
|
1259
|
+
The `@airflow_external_task_sensor` decorator attaches a Airflow [ExternalTaskSensor](https://airflow.apache.org/docs/apache-airflow/stable/_api/airflow/sensors/external_task/index.html#airflow.sensors.external_task.ExternalTaskSensor) before the start step of the flow.
|
1260
|
+
This decorator only works when a flow is scheduled on Airflow and is compiled using `airflow create`. More than one `@airflow_external_task_sensor` can be added as a flow decorators. Adding more than one decorator will ensure that `start` step starts only after all sensors finish.
|
1422
1261
|
|
1423
1262
|
|
1424
1263
|
Parameters
|
@@ -1440,18 +1279,21 @@ def airflow_s3_key_sensor(*, timeout: int, poke_interval: int, mode: str, expone
|
|
1440
1279
|
Name of the sensor on Airflow
|
1441
1280
|
description : str
|
1442
1281
|
Description of sensor in the Airflow UI
|
1443
|
-
|
1444
|
-
The
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1282
|
+
external_dag_id : str
|
1283
|
+
The dag_id that contains the task you want to wait for.
|
1284
|
+
external_task_ids : List[str]
|
1285
|
+
The list of task_ids that you want to wait for.
|
1286
|
+
If None (default value) the sensor waits for the DAG. (Default: None)
|
1287
|
+
allowed_states : List[str]
|
1288
|
+
Iterable of allowed states, (Default: ['success'])
|
1289
|
+
failed_states : List[str]
|
1290
|
+
Iterable of failed or dis-allowed states. (Default: None)
|
1291
|
+
execution_delta : datetime.timedelta
|
1292
|
+
time difference with the previous execution to look at,
|
1293
|
+
the default is the same logical date as the current task or DAG. (Default: None)
|
1294
|
+
check_existence: bool
|
1295
|
+
Set to True to check if the external task exists or check if
|
1296
|
+
the DAG to wait for exists. (Default: True)
|
1455
1297
|
"""
|
1456
1298
|
...
|
1457
1299
|
|
@@ -1569,6 +1411,135 @@ def with_artifact_store(f: typing.Optional[typing.Type[FlowSpecDerived]] = None)
|
|
1569
1411
|
"""
|
1570
1412
|
...
|
1571
1413
|
|
1414
|
+
def project(*, name: str, branch: typing.Optional[str] = None, production: bool = False) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1415
|
+
"""
|
1416
|
+
Specifies what flows belong to the same project.
|
1417
|
+
|
1418
|
+
A project-specific namespace is created for all flows that
|
1419
|
+
use the same `@project(name)`.
|
1420
|
+
|
1421
|
+
|
1422
|
+
Parameters
|
1423
|
+
----------
|
1424
|
+
name : str
|
1425
|
+
Project name. Make sure that the name is unique amongst all
|
1426
|
+
projects that use the same production scheduler. The name may
|
1427
|
+
contain only lowercase alphanumeric characters and underscores.
|
1428
|
+
|
1429
|
+
branch : Optional[str], default None
|
1430
|
+
The branch to use. If not specified, the branch is set to
|
1431
|
+
`user.<username>` unless `production` is set to `True`. This can
|
1432
|
+
also be set on the command line using `--branch` as a top-level option.
|
1433
|
+
It is an error to specify `branch` in the decorator and on the command line.
|
1434
|
+
|
1435
|
+
production : bool, default False
|
1436
|
+
Whether or not the branch is the production branch. This can also be set on the
|
1437
|
+
command line using `--production` as a top-level option. It is an error to specify
|
1438
|
+
`production` in the decorator and on the command line.
|
1439
|
+
The project branch name will be:
|
1440
|
+
- if `branch` is specified:
|
1441
|
+
- if `production` is True: `prod.<branch>`
|
1442
|
+
- if `production` is False: `test.<branch>`
|
1443
|
+
- if `branch` is not specified:
|
1444
|
+
- if `production` is True: `prod`
|
1445
|
+
- if `production` is False: `user.<username>`
|
1446
|
+
"""
|
1447
|
+
...
|
1448
|
+
|
1449
|
+
@typing.overload
|
1450
|
+
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]]:
|
1451
|
+
"""
|
1452
|
+
Specifies the Conda environment for all steps of the flow.
|
1453
|
+
|
1454
|
+
Use `@conda_base` to set common libraries required by all
|
1455
|
+
steps and use `@conda` to specify step-specific additions.
|
1456
|
+
|
1457
|
+
|
1458
|
+
Parameters
|
1459
|
+
----------
|
1460
|
+
packages : Dict[str, str], default {}
|
1461
|
+
Packages to use for this flow. The key is the name of the package
|
1462
|
+
and the value is the version to use.
|
1463
|
+
libraries : Dict[str, str], default {}
|
1464
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1465
|
+
python : str, optional, default None
|
1466
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1467
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1468
|
+
disabled : bool, default False
|
1469
|
+
If set to True, disables Conda.
|
1470
|
+
"""
|
1471
|
+
...
|
1472
|
+
|
1473
|
+
@typing.overload
|
1474
|
+
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1475
|
+
...
|
1476
|
+
|
1477
|
+
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):
|
1478
|
+
"""
|
1479
|
+
Specifies the Conda environment for all steps of the flow.
|
1480
|
+
|
1481
|
+
Use `@conda_base` to set common libraries required by all
|
1482
|
+
steps and use `@conda` to specify step-specific additions.
|
1483
|
+
|
1484
|
+
|
1485
|
+
Parameters
|
1486
|
+
----------
|
1487
|
+
packages : Dict[str, str], default {}
|
1488
|
+
Packages to use for this flow. The key is the name of the package
|
1489
|
+
and the value is the version to use.
|
1490
|
+
libraries : Dict[str, str], default {}
|
1491
|
+
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1492
|
+
python : str, optional, default None
|
1493
|
+
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1494
|
+
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1495
|
+
disabled : bool, default False
|
1496
|
+
If set to True, disables Conda.
|
1497
|
+
"""
|
1498
|
+
...
|
1499
|
+
|
1500
|
+
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]]:
|
1501
|
+
"""
|
1502
|
+
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)
|
1503
|
+
before the start step of the flow. This decorator only works when a flow is scheduled on Airflow
|
1504
|
+
and is compiled using `airflow create`. More than one `@airflow_s3_key_sensor` can be
|
1505
|
+
added as a flow decorators. Adding more than one decorator will ensure that `start` step
|
1506
|
+
starts only after all sensors finish.
|
1507
|
+
|
1508
|
+
|
1509
|
+
Parameters
|
1510
|
+
----------
|
1511
|
+
timeout : int
|
1512
|
+
Time, in seconds before the task times out and fails. (Default: 3600)
|
1513
|
+
poke_interval : int
|
1514
|
+
Time in seconds that the job should wait in between each try. (Default: 60)
|
1515
|
+
mode : str
|
1516
|
+
How the sensor operates. Options are: { poke | reschedule }. (Default: "poke")
|
1517
|
+
exponential_backoff : bool
|
1518
|
+
allow progressive longer waits between pokes by using exponential backoff algorithm. (Default: True)
|
1519
|
+
pool : str
|
1520
|
+
the slot pool this task should run in,
|
1521
|
+
slot pools are a way to limit concurrency for certain tasks. (Default:None)
|
1522
|
+
soft_fail : bool
|
1523
|
+
Set to true to mark the task as SKIPPED on failure. (Default: False)
|
1524
|
+
name : str
|
1525
|
+
Name of the sensor on Airflow
|
1526
|
+
description : str
|
1527
|
+
Description of sensor in the Airflow UI
|
1528
|
+
bucket_key : Union[str, List[str]]
|
1529
|
+
The key(s) being waited on. Supports full s3:// style url or relative path from root level.
|
1530
|
+
When it's specified as a full s3:// url, please leave `bucket_name` as None
|
1531
|
+
bucket_name : str
|
1532
|
+
Name of the S3 bucket. Only needed when bucket_key is not provided as a full s3:// url.
|
1533
|
+
When specified, all the keys passed to bucket_key refers to this bucket. (Default:None)
|
1534
|
+
wildcard_match : bool
|
1535
|
+
whether the bucket_key should be interpreted as a Unix wildcard pattern. (Default: False)
|
1536
|
+
aws_conn_id : str
|
1537
|
+
a reference to the s3 connection on Airflow. (Default: None)
|
1538
|
+
verify : bool
|
1539
|
+
Whether or not to verify SSL certificates for S3 connection. (Default: None)
|
1540
|
+
"""
|
1541
|
+
...
|
1542
|
+
|
1572
1543
|
@typing.overload
|
1573
1544
|
def pypi_base(*, packages: typing.Dict[str, str] = {}, python: typing.Optional[str] = None) -> typing.Callable[[typing.Type[FlowSpecDerived]], typing.Type[FlowSpecDerived]]:
|
1574
1545
|
"""
|
@@ -1610,81 +1581,155 @@ def pypi_base(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, packag
|
|
1610
1581
|
"""
|
1611
1582
|
...
|
1612
1583
|
|
1613
|
-
|
1584
|
+
@typing.overload
|
1585
|
+
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]]:
|
1614
1586
|
"""
|
1615
|
-
Specifies
|
1587
|
+
Specifies the flow(s) that this flow depends on.
|
1616
1588
|
|
1617
|
-
|
1618
|
-
|
1589
|
+
```
|
1590
|
+
@trigger_on_finish(flow='FooFlow')
|
1591
|
+
```
|
1592
|
+
or
|
1593
|
+
```
|
1594
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1595
|
+
```
|
1596
|
+
This decorator respects the @project decorator and triggers the flow
|
1597
|
+
when upstream runs within the same namespace complete successfully
|
1598
|
+
|
1599
|
+
Additionally, you can specify project aware upstream flow dependencies
|
1600
|
+
by specifying the fully qualified project_flow_name.
|
1601
|
+
```
|
1602
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1603
|
+
```
|
1604
|
+
or
|
1605
|
+
```
|
1606
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1607
|
+
```
|
1608
|
+
|
1609
|
+
You can also specify just the project or project branch (other values will be
|
1610
|
+
inferred from the current project or project branch):
|
1611
|
+
```
|
1612
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1613
|
+
```
|
1614
|
+
|
1615
|
+
Note that `branch` is typically one of:
|
1616
|
+
- `prod`
|
1617
|
+
- `user.bob`
|
1618
|
+
- `test.my_experiment`
|
1619
|
+
- `prod.staging`
|
1619
1620
|
|
1620
1621
|
|
1621
1622
|
Parameters
|
1622
1623
|
----------
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1624
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
1625
|
+
Upstream flow dependency for this flow.
|
1626
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
1627
|
+
Upstream flow dependencies for this flow.
|
1628
|
+
options : Dict[str, Any], default {}
|
1629
|
+
Backend-specific configuration for tuning eventing behavior.
|
1630
|
+
"""
|
1631
|
+
...
|
1632
|
+
|
1633
|
+
@typing.overload
|
1634
|
+
def trigger_on_finish(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1635
|
+
...
|
1636
|
+
|
1637
|
+
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] = {}):
|
1638
|
+
"""
|
1639
|
+
Specifies the flow(s) that this flow depends on.
|
1627
1640
|
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1632
|
-
|
1641
|
+
```
|
1642
|
+
@trigger_on_finish(flow='FooFlow')
|
1643
|
+
```
|
1644
|
+
or
|
1645
|
+
```
|
1646
|
+
@trigger_on_finish(flows=['FooFlow', 'BarFlow'])
|
1647
|
+
```
|
1648
|
+
This decorator respects the @project decorator and triggers the flow
|
1649
|
+
when upstream runs within the same namespace complete successfully
|
1633
1650
|
|
1634
|
-
|
1635
|
-
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1651
|
+
Additionally, you can specify project aware upstream flow dependencies
|
1652
|
+
by specifying the fully qualified project_flow_name.
|
1653
|
+
```
|
1654
|
+
@trigger_on_finish(flow='my_project.branch.my_branch.FooFlow')
|
1655
|
+
```
|
1656
|
+
or
|
1657
|
+
```
|
1658
|
+
@trigger_on_finish(flows=['my_project.branch.my_branch.FooFlow', 'BarFlow'])
|
1659
|
+
```
|
1660
|
+
|
1661
|
+
You can also specify just the project or project branch (other values will be
|
1662
|
+
inferred from the current project or project branch):
|
1663
|
+
```
|
1664
|
+
@trigger_on_finish(flow={"name": "FooFlow", "project": "my_project", "project_branch": "branch"})
|
1665
|
+
```
|
1666
|
+
|
1667
|
+
Note that `branch` is typically one of:
|
1668
|
+
- `prod`
|
1669
|
+
- `user.bob`
|
1670
|
+
- `test.my_experiment`
|
1671
|
+
- `prod.staging`
|
1672
|
+
|
1673
|
+
|
1674
|
+
Parameters
|
1675
|
+
----------
|
1676
|
+
flow : Union[str, Dict[str, str]], optional, default None
|
1677
|
+
Upstream flow dependency for this flow.
|
1678
|
+
flows : List[Union[str, Dict[str, str]]], default []
|
1679
|
+
Upstream flow dependencies for this flow.
|
1680
|
+
options : Dict[str, Any], default {}
|
1681
|
+
Backend-specific configuration for tuning eventing behavior.
|
1645
1682
|
"""
|
1646
1683
|
...
|
1647
1684
|
|
1648
|
-
|
1685
|
+
@typing.overload
|
1686
|
+
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]]:
|
1649
1687
|
"""
|
1650
|
-
|
1651
|
-
|
1688
|
+
Specifies the times when the flow should be run when running on a
|
1689
|
+
production scheduler.
|
1652
1690
|
|
1653
1691
|
|
1654
1692
|
Parameters
|
1655
1693
|
----------
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1694
|
+
hourly : bool, default False
|
1695
|
+
Run the workflow hourly.
|
1696
|
+
daily : bool, default True
|
1697
|
+
Run the workflow daily.
|
1698
|
+
weekly : bool, default False
|
1699
|
+
Run the workflow weekly.
|
1700
|
+
cron : str, optional, default None
|
1701
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1702
|
+
specified by this expression.
|
1703
|
+
timezone : str, optional, default None
|
1704
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1705
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1706
|
+
"""
|
1707
|
+
...
|
1708
|
+
|
1709
|
+
@typing.overload
|
1710
|
+
def schedule(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1711
|
+
...
|
1712
|
+
|
1713
|
+
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):
|
1714
|
+
"""
|
1715
|
+
Specifies the times when the flow should be run when running on a
|
1716
|
+
production scheduler.
|
1717
|
+
|
1718
|
+
|
1719
|
+
Parameters
|
1720
|
+
----------
|
1721
|
+
hourly : bool, default False
|
1722
|
+
Run the workflow hourly.
|
1723
|
+
daily : bool, default True
|
1724
|
+
Run the workflow daily.
|
1725
|
+
weekly : bool, default False
|
1726
|
+
Run the workflow weekly.
|
1727
|
+
cron : str, optional, default None
|
1728
|
+
Run the workflow at [a custom Cron schedule](https://docs.aws.amazon.com/eventbridge/latest/userguide/scheduled-events.html#cron-expressions)
|
1729
|
+
specified by this expression.
|
1730
|
+
timezone : str, optional, default None
|
1731
|
+
Timezone on which the schedule runs (default: None). Currently supported only for Argo workflows,
|
1732
|
+
which accepts timezones in [IANA format](https://nodatime.org/TimeZones).
|
1688
1733
|
"""
|
1689
1734
|
...
|
1690
1735
|
|
@@ -1781,56 +1826,5 @@ def trigger(f: typing.Optional[typing.Type[FlowSpecDerived]] = None, *, event: t
|
|
1781
1826
|
"""
|
1782
1827
|
...
|
1783
1828
|
|
1784
|
-
@typing.overload
|
1785
|
-
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]]:
|
1786
|
-
"""
|
1787
|
-
Specifies the Conda environment for all steps of the flow.
|
1788
|
-
|
1789
|
-
Use `@conda_base` to set common libraries required by all
|
1790
|
-
steps and use `@conda` to specify step-specific additions.
|
1791
|
-
|
1792
|
-
|
1793
|
-
Parameters
|
1794
|
-
----------
|
1795
|
-
packages : Dict[str, str], default {}
|
1796
|
-
Packages to use for this flow. The key is the name of the package
|
1797
|
-
and the value is the version to use.
|
1798
|
-
libraries : Dict[str, str], default {}
|
1799
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1800
|
-
python : str, optional, default None
|
1801
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1802
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1803
|
-
disabled : bool, default False
|
1804
|
-
If set to True, disables Conda.
|
1805
|
-
"""
|
1806
|
-
...
|
1807
|
-
|
1808
|
-
@typing.overload
|
1809
|
-
def conda_base(f: typing.Type[FlowSpecDerived]) -> typing.Type[FlowSpecDerived]:
|
1810
|
-
...
|
1811
|
-
|
1812
|
-
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):
|
1813
|
-
"""
|
1814
|
-
Specifies the Conda environment for all steps of the flow.
|
1815
|
-
|
1816
|
-
Use `@conda_base` to set common libraries required by all
|
1817
|
-
steps and use `@conda` to specify step-specific additions.
|
1818
|
-
|
1819
|
-
|
1820
|
-
Parameters
|
1821
|
-
----------
|
1822
|
-
packages : Dict[str, str], default {}
|
1823
|
-
Packages to use for this flow. The key is the name of the package
|
1824
|
-
and the value is the version to use.
|
1825
|
-
libraries : Dict[str, str], default {}
|
1826
|
-
Supported for backward compatibility. When used with packages, packages will take precedence.
|
1827
|
-
python : str, optional, default None
|
1828
|
-
Version of Python to use, e.g. '3.7.4'. A default value of None implies
|
1829
|
-
that the version used will correspond to the version of the Python interpreter used to start the run.
|
1830
|
-
disabled : bool, default False
|
1831
|
-
If set to True, disables Conda.
|
1832
|
-
"""
|
1833
|
-
...
|
1834
|
-
|
1835
1829
|
pkg_name: str
|
1836
1830
|
|