ob-metaflow-stubs 6.0.3.186__py2.py3-none-any.whl → 6.0.3.188rc0__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 +1074 -1062
- metaflow-stubs/cards.pyi +1 -1
- metaflow-stubs/cli.pyi +1 -1
- metaflow-stubs/cli_components/__init__.pyi +1 -1
- metaflow-stubs/cli_components/utils.pyi +1 -1
- metaflow-stubs/client/__init__.pyi +1 -1
- metaflow-stubs/client/core.pyi +5 -5
- metaflow-stubs/client/filecache.pyi +2 -2
- metaflow-stubs/events.pyi +2 -2
- metaflow-stubs/exception.pyi +1 -1
- metaflow-stubs/flowspec.pyi +3 -3
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +2 -2
- metaflow-stubs/info_file.pyi +1 -1
- metaflow-stubs/metadata_provider/__init__.pyi +1 -1
- metaflow-stubs/metadata_provider/heartbeat.pyi +1 -1
- metaflow-stubs/metadata_provider/metadata.pyi +1 -1
- metaflow-stubs/metadata_provider/util.pyi +1 -1
- metaflow-stubs/metaflow_config.pyi +1 -1
- metaflow-stubs/metaflow_current.pyi +56 -56
- metaflow-stubs/metaflow_git.pyi +1 -1
- metaflow-stubs/mf_extensions/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/async_cards.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/deco_injection_mixin.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/card_utils/extra_components.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/checkpoint_lister.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/cards/lineage_card.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/checkpoint_storage.pyi +4 -4
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/constructors.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/core.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/decorator.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/exceptions.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/final_api.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/checkpoints/lineage.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/context.pyi +2 -2
- 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 +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/exceptions.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/task_utils.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastore/utils.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/datastructures.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/exceptions.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/hf_hub/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/hf_hub/decorator.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/core.pyi +3 -3
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/exceptions.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/modeling_utils/model_storage.pyi +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/flowspec_utils.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/general.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/identity_utils.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/base.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/serialization_handler/tar.pyi +1 -1
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/__init__.pyi +22 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_state_machine.pyi +119 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_vendor/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_vendor/spinner/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_vendor/spinner/spinners.pyi +19 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/app_cli.pyi +126 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/app_config.pyi +98 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/capsule.pyi +233 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/cli_to_config.pyi +17 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/click_importer.pyi +12 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/code_package/__init__.pyi +12 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/code_package/code_packager.pyi +242 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/dependencies.pyi +50 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/experimental/__init__.pyi +27 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/perimeters.pyi +30 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/secrets.pyi +46 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/utils.pyi +91 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/validations.pyi +24 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/aws/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/aws/assume_role_decorator.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/async_cards.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/card_utilities/injector.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/checkpoint_datastores/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/checkpoint_datastores/coreweave.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/checkpoint_datastores/nebius.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/__init__.pyi +6 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/baker.pyi +51 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/docker_environment.pyi +65 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/fast_bakery.pyi +74 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/kubernetes/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/kubernetes/pod_killer.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/constants.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/exceptions.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/ollama.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/ollama/status_card.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/snowflake/snowflake.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/profilers/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/profilers/gpu.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/remote_config.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/toplevel/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/toplevel/global_aliases_for_metaflow_package.pyi +1 -1
- metaflow-stubs/multicore_utils.pyi +1 -1
- metaflow-stubs/ob_internal.pyi +3 -1
- metaflow-stubs/parameters.pyi +2 -2
- metaflow-stubs/plugins/__init__.pyi +11 -11
- metaflow-stubs/plugins/airflow/__init__.pyi +1 -1
- metaflow-stubs/plugins/airflow/airflow_utils.pyi +1 -1
- metaflow-stubs/plugins/airflow/exception.pyi +1 -1
- metaflow-stubs/plugins/airflow/sensors/__init__.pyi +1 -1
- metaflow-stubs/plugins/airflow/sensors/base_sensor.pyi +1 -1
- metaflow-stubs/plugins/airflow/sensors/external_task_sensor.pyi +1 -1
- metaflow-stubs/plugins/airflow/sensors/s3_sensor.pyi +1 -1
- metaflow-stubs/plugins/argo/__init__.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_client.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_events.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_workflows.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +2 -2
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +1 -1
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +2 -2
- metaflow-stubs/plugins/aws/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/aws_client.pyi +1 -1
- metaflow-stubs/plugins/aws/aws_utils.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +1 -1
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/aws/step_functions/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/event_bridge_client.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/schedule_decorator.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/step_functions.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/step_functions_client.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer.pyi +1 -1
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +1 -1
- metaflow-stubs/plugins/azure/__init__.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_credential.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/azure/azure_utils.pyi +1 -1
- metaflow-stubs/plugins/azure/blob_service_client_factory.pyi +1 -1
- metaflow-stubs/plugins/azure/includefile_support.pyi +1 -1
- metaflow-stubs/plugins/cards/__init__.pyi +1 -1
- metaflow-stubs/plugins/cards/card_client.pyi +2 -2
- metaflow-stubs/plugins/cards/card_creator.pyi +1 -1
- metaflow-stubs/plugins/cards/card_datastore.pyi +1 -1
- metaflow-stubs/plugins/cards/card_decorator.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/__init__.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/basic.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/card.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/components.pyi +2 -2
- metaflow-stubs/plugins/cards/card_modules/convert_to_native_type.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/renderer_tools.pyi +1 -1
- metaflow-stubs/plugins/cards/card_modules/test_cards.pyi +1 -1
- metaflow-stubs/plugins/cards/card_resolver.pyi +1 -1
- metaflow-stubs/plugins/cards/component_serializer.pyi +1 -1
- metaflow-stubs/plugins/cards/exception.pyi +1 -1
- metaflow-stubs/plugins/catch_decorator.pyi +2 -2
- metaflow-stubs/plugins/datatools/__init__.pyi +1 -1
- metaflow-stubs/plugins/datatools/local.pyi +1 -1
- metaflow-stubs/plugins/datatools/s3/__init__.pyi +1 -1
- metaflow-stubs/plugins/datatools/s3/s3.pyi +2 -2
- metaflow-stubs/plugins/datatools/s3/s3tail.pyi +1 -1
- metaflow-stubs/plugins/datatools/s3/s3util.pyi +1 -1
- metaflow-stubs/plugins/debug_logger.pyi +1 -1
- metaflow-stubs/plugins/debug_monitor.pyi +1 -1
- metaflow-stubs/plugins/environment_decorator.pyi +1 -1
- metaflow-stubs/plugins/events_decorator.pyi +1 -1
- metaflow-stubs/plugins/frameworks/__init__.pyi +1 -1
- metaflow-stubs/plugins/frameworks/pytorch.pyi +1 -1
- metaflow-stubs/plugins/gcp/__init__.pyi +1 -1
- metaflow-stubs/plugins/gcp/gcp_secret_manager_secrets_provider.pyi +2 -2
- metaflow-stubs/plugins/gcp/gs_exceptions.pyi +1 -1
- metaflow-stubs/plugins/gcp/gs_storage_client_factory.pyi +1 -1
- metaflow-stubs/plugins/gcp/gs_utils.pyi +1 -1
- metaflow-stubs/plugins/gcp/includefile_support.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/__init__.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kube_utils.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kubernetes.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kubernetes_client.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kubernetes_decorator.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/kubernetes_jobsets.pyi +1 -1
- metaflow-stubs/plugins/kubernetes/spot_monitor_sidecar.pyi +1 -1
- metaflow-stubs/plugins/ollama/__init__.pyi +2 -2
- metaflow-stubs/plugins/parallel_decorator.pyi +1 -1
- metaflow-stubs/plugins/perimeters.pyi +1 -1
- metaflow-stubs/plugins/project_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/conda_environment.pyi +3 -3
- metaflow-stubs/plugins/pypi/parsers.pyi +1 -1
- metaflow-stubs/plugins/pypi/pypi_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/pypi_environment.pyi +1 -1
- metaflow-stubs/plugins/pypi/utils.pyi +1 -1
- metaflow-stubs/plugins/resources_decorator.pyi +1 -1
- metaflow-stubs/plugins/retry_decorator.pyi +1 -1
- metaflow-stubs/plugins/secrets/__init__.pyi +1 -1
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +1 -1
- metaflow-stubs/plugins/secrets/secrets_decorator.pyi +1 -1
- metaflow-stubs/plugins/snowflake/__init__.pyi +1 -1
- metaflow-stubs/plugins/storage_executor.pyi +1 -1
- metaflow-stubs/plugins/test_unbounded_foreach_decorator.pyi +2 -2
- metaflow-stubs/plugins/timeout_decorator.pyi +2 -2
- metaflow-stubs/plugins/torchtune/__init__.pyi +1 -1
- metaflow-stubs/plugins/uv/__init__.pyi +1 -1
- metaflow-stubs/plugins/uv/uv_environment.pyi +2 -2
- metaflow-stubs/profilers/__init__.pyi +1 -1
- metaflow-stubs/pylint_wrapper.pyi +1 -1
- metaflow-stubs/runner/__init__.pyi +1 -1
- metaflow-stubs/runner/deployer.pyi +28 -28
- metaflow-stubs/runner/deployer_impl.pyi +1 -1
- metaflow-stubs/runner/metaflow_runner.pyi +1 -1
- metaflow-stubs/runner/nbdeploy.pyi +1 -1
- metaflow-stubs/runner/nbrun.pyi +1 -1
- metaflow-stubs/runner/subprocess_manager.pyi +1 -1
- metaflow-stubs/runner/utils.pyi +1 -1
- metaflow-stubs/system/__init__.pyi +1 -1
- metaflow-stubs/system/system_logger.pyi +2 -2
- metaflow-stubs/system/system_monitor.pyi +1 -1
- metaflow-stubs/tagging_util.pyi +1 -1
- metaflow-stubs/tuple_util.pyi +1 -1
- metaflow-stubs/user_configs/__init__.pyi +1 -1
- metaflow-stubs/user_configs/config_decorators.pyi +3 -3
- metaflow-stubs/user_configs/config_options.pyi +1 -1
- metaflow-stubs/user_configs/config_parameters.pyi +5 -5
- {ob_metaflow_stubs-6.0.3.186.dist-info → ob_metaflow_stubs-6.0.3.188rc0.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-6.0.3.188rc0.dist-info/RECORD +239 -0
- ob_metaflow_stubs-6.0.3.186.dist-info/RECORD +0 -216
- {ob_metaflow_stubs-6.0.3.186.dist-info → ob_metaflow_stubs-6.0.3.188rc0.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-6.0.3.186.dist-info → ob_metaflow_stubs-6.0.3.188rc0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.15.18.1+obcheckpoint(0.2.4);ob(v1) #
|
4
|
+
# Generated on 2025-07-03T01:34:48.332432 #
|
5
|
+
######################################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
if typing.TYPE_CHECKING:
|
11
|
+
import typing
|
12
|
+
|
13
|
+
from .cli_to_config import build_config_from_options as build_config_from_options
|
14
|
+
|
15
|
+
CODE_PACKAGE_PREFIX: str
|
16
|
+
|
17
|
+
CAPSULE_DEBUG: bool
|
18
|
+
|
19
|
+
class classproperty(property, metaclass=type):
|
20
|
+
def __get__(self, owner_self, owner_cls):
|
21
|
+
...
|
22
|
+
...
|
23
|
+
|
24
|
+
class AppConfigError(Exception, metaclass=type):
|
25
|
+
"""
|
26
|
+
Exception raised when app configuration is invalid.
|
27
|
+
"""
|
28
|
+
...
|
29
|
+
|
30
|
+
class AuthType(object, metaclass=type):
|
31
|
+
@classmethod
|
32
|
+
def enums(cls):
|
33
|
+
...
|
34
|
+
@property
|
35
|
+
def default(cls):
|
36
|
+
...
|
37
|
+
...
|
38
|
+
|
39
|
+
class AppConfig(object, metaclass=type):
|
40
|
+
"""
|
41
|
+
Class representing an Outerbounds App configuration.
|
42
|
+
"""
|
43
|
+
def __init__(self, config_dict: typing.Dict[str, typing.Any]):
|
44
|
+
"""
|
45
|
+
Initialize configuration from a dictionary.
|
46
|
+
"""
|
47
|
+
...
|
48
|
+
def set_state(self, key, value):
|
49
|
+
...
|
50
|
+
def get_state(self, key, default = None):
|
51
|
+
...
|
52
|
+
def dump_state(self):
|
53
|
+
...
|
54
|
+
def get(self, key: str, default: typing.Any = None) -> typing.Any:
|
55
|
+
"""
|
56
|
+
Get a configuration value by key.
|
57
|
+
"""
|
58
|
+
...
|
59
|
+
def validate(self):
|
60
|
+
"""
|
61
|
+
Validate the configuration against the schema.
|
62
|
+
"""
|
63
|
+
...
|
64
|
+
def set_deploy_defaults(self, packaging_directory: str):
|
65
|
+
"""
|
66
|
+
Set default values for fields that are not provided.
|
67
|
+
"""
|
68
|
+
...
|
69
|
+
def to_dict(self) -> typing.Dict[str, typing.Any]:
|
70
|
+
"""
|
71
|
+
Return the configuration as a dictionary.
|
72
|
+
"""
|
73
|
+
...
|
74
|
+
def to_yaml(self) -> str:
|
75
|
+
"""
|
76
|
+
Return the configuration as a YAML string.
|
77
|
+
"""
|
78
|
+
...
|
79
|
+
def to_json(self) -> str:
|
80
|
+
"""
|
81
|
+
Return the configuration as a JSON string.
|
82
|
+
"""
|
83
|
+
...
|
84
|
+
@classmethod
|
85
|
+
def from_file(cls, file_path: str) -> "AppConfig":
|
86
|
+
"""
|
87
|
+
Create a configuration from a file.
|
88
|
+
"""
|
89
|
+
...
|
90
|
+
def update_from_cli_options(self, options):
|
91
|
+
"""
|
92
|
+
Update configuration from CLI options using the same logic as build_config_from_options.
|
93
|
+
This ensures consistent handling of CLI options whether they come from a config file
|
94
|
+
or direct CLI input.
|
95
|
+
"""
|
96
|
+
...
|
97
|
+
...
|
98
|
+
|
@@ -0,0 +1,233 @@
|
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.15.18.1+obcheckpoint(0.2.4);ob(v1) #
|
4
|
+
# Generated on 2025-07-03T01:34:48.336079 #
|
5
|
+
######################################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
if typing.TYPE_CHECKING:
|
11
|
+
import metaflow.mf_extensions.outerbounds.plugins.apps.core._state_machine
|
12
|
+
import typing
|
13
|
+
import metaflow.mf_extensions.outerbounds.plugins.apps.core.app_config
|
14
|
+
import metaflow.mf_extensions.outerbounds.plugins.apps.core.capsule
|
15
|
+
|
16
|
+
from .utils import TODOException as TODOException
|
17
|
+
from .utils import safe_requests_wrapper as safe_requests_wrapper
|
18
|
+
from .utils import MaximumRetriesExceeded as MaximumRetriesExceeded
|
19
|
+
from .app_config import AppConfig as AppConfig
|
20
|
+
from .app_config import AuthType as AuthType
|
21
|
+
from . import experimental as experimental
|
22
|
+
from ._state_machine import CapsuleWorkerSemanticStatus as CapsuleWorkerSemanticStatus
|
23
|
+
from ._state_machine import WorkerStatus as WorkerStatus
|
24
|
+
from ._state_machine import CapsuleStatus as CapsuleStatus
|
25
|
+
from ._state_machine import DEPLOYMENT_READY_CONDITIONS as DEPLOYMENT_READY_CONDITIONS
|
26
|
+
|
27
|
+
CAPSULE_DEBUG: bool
|
28
|
+
|
29
|
+
class CapsuleStateMachine(object, metaclass=type):
|
30
|
+
"""
|
31
|
+
- Every capsule create call will return a `identifier` and a `version` of the object.
|
32
|
+
- Each update call will return a new version.
|
33
|
+
- The status.currentlyServedVersion will be the version that is currently serving traffic.
|
34
|
+
- The status.updateInProgress will be True if an upgrade is in progress.
|
35
|
+
|
36
|
+
CapsuleState Transition:
|
37
|
+
- Every capsule create call will return a `identifier` and a `version` of the object.
|
38
|
+
- Happy Path:
|
39
|
+
- First time Create :
|
40
|
+
- wait for status.updateInProgress to be set to False
|
41
|
+
- (interleved) Poll the worker endpoints to check their status
|
42
|
+
- showcase how many workers are coming up if things are on the cli side.
|
43
|
+
- If the user has set some flag like `--dont-wait-to-fully-finish` then we check the `status.currentlyServedVersion` to see if even one replica is ready to
|
44
|
+
serve traffic.
|
45
|
+
- once the status.updateInProgress is set to False, it means that the replicas are ready
|
46
|
+
- Upgrade:
|
47
|
+
- wait for status.updateInProgress to be set to False
|
48
|
+
- (interleved) Poll the worker endpoints to check their status and signal the user the number replicas coming up
|
49
|
+
- If the user has set some flag like `--dont-wait-to-fully-finish` then we check the `status.currentlyServedVersion` to see if even one replica is ready to
|
50
|
+
serve traffic.
|
51
|
+
- Unhappy Path:
|
52
|
+
- First time Create :
|
53
|
+
- wait for status.updateInProgress to be set to False,
|
54
|
+
- (interleved) Poll the workers to check their status.
|
55
|
+
- If the worker pertaining the current deployment instance version is crashlooping then crash the deployment process with the error messages and logs.
|
56
|
+
- Upgrade:
|
57
|
+
- wait for status.updateInProgress to be set to False,
|
58
|
+
- (interleved) Poll the workers to check their status.
|
59
|
+
- If the worker pertaining the current deployment instance version is crashlooping then crash the deployment process with the error messages and logs.
|
60
|
+
"""
|
61
|
+
def __init__(self, capsule_id: str, current_deployment_instance_version: str):
|
62
|
+
...
|
63
|
+
def get_status_trail(self):
|
64
|
+
...
|
65
|
+
def add_status(self, status: metaflow.mf_extensions.outerbounds.plugins.apps.core._state_machine.CapsuleStatus):
|
66
|
+
...
|
67
|
+
@property
|
68
|
+
def current_status(self):
|
69
|
+
...
|
70
|
+
@property
|
71
|
+
def out_of_cluster_url(self):
|
72
|
+
...
|
73
|
+
@property
|
74
|
+
def in_cluster_url(self):
|
75
|
+
...
|
76
|
+
@property
|
77
|
+
def update_in_progress(self):
|
78
|
+
...
|
79
|
+
@property
|
80
|
+
def currently_served_version(self):
|
81
|
+
...
|
82
|
+
@property
|
83
|
+
def ready_to_serve_traffic(self):
|
84
|
+
...
|
85
|
+
@property
|
86
|
+
def available_replicas(self):
|
87
|
+
...
|
88
|
+
def report_current_status(self, logger):
|
89
|
+
...
|
90
|
+
def save_debug_info(self, state_dir: str):
|
91
|
+
...
|
92
|
+
...
|
93
|
+
|
94
|
+
class CapsuleWorkersStateMachine(object, metaclass=type):
|
95
|
+
def __init__(self, capsule_id: str, end_state_capsule_version: str, deployment_mode: str = 'at_least_one_running', minimum_replicas: int = 1):
|
96
|
+
...
|
97
|
+
def get_status_trail(self):
|
98
|
+
...
|
99
|
+
def add_status(self, worker_list_response: typing.List[metaflow.mf_extensions.outerbounds.plugins.apps.core._state_machine.WorkerStatus]):
|
100
|
+
"""
|
101
|
+
worker_list_response: List[Dict[str, Any]]
|
102
|
+
[
|
103
|
+
{
|
104
|
+
"workerId": "c-4pqikm-659dd9ccdc-5hcwz",
|
105
|
+
"phase": "Running",
|
106
|
+
"activity": 0,
|
107
|
+
"activityDataAvailable": false,
|
108
|
+
"version": "0xhgaewiqb"
|
109
|
+
},
|
110
|
+
{
|
111
|
+
"workerId": "c-4pqikm-b8559688b-xk2jh",
|
112
|
+
"phase": "Pending",
|
113
|
+
"activity": 0,
|
114
|
+
"activityDataAvailable": false,
|
115
|
+
"version": "421h48qh95"
|
116
|
+
}
|
117
|
+
]
|
118
|
+
"""
|
119
|
+
...
|
120
|
+
def save_debug_info(self, state_dir: str):
|
121
|
+
...
|
122
|
+
def report_current_status(self, logger):
|
123
|
+
...
|
124
|
+
@property
|
125
|
+
def current_status(self) -> typing.List[metaflow.mf_extensions.outerbounds.plugins.apps.core._state_machine.WorkerStatus]:
|
126
|
+
...
|
127
|
+
def current_version_deployment_status(self) -> metaflow.mf_extensions.outerbounds.plugins.apps.core._state_machine.CapsuleWorkerSemanticStatus:
|
128
|
+
...
|
129
|
+
@property
|
130
|
+
def is_crashlooping(self) -> bool:
|
131
|
+
...
|
132
|
+
...
|
133
|
+
|
134
|
+
class CapsuleInput(object, metaclass=type):
|
135
|
+
@classmethod
|
136
|
+
def construct_exec_command(cls, commands: list):
|
137
|
+
...
|
138
|
+
@classmethod
|
139
|
+
def from_app_config(self, app_config: metaflow.mf_extensions.outerbounds.plugins.apps.core.app_config.AppConfig):
|
140
|
+
...
|
141
|
+
...
|
142
|
+
|
143
|
+
class CapsuleApiException(Exception, metaclass=type):
|
144
|
+
def __init__(self, url: str, method: str, status_code: int, text: str, message: typing.Optional[str] = None):
|
145
|
+
...
|
146
|
+
def __str__(self):
|
147
|
+
...
|
148
|
+
...
|
149
|
+
|
150
|
+
class CapsuleDeploymentException(Exception, metaclass=type):
|
151
|
+
def __init__(self, capsule_id: str, message: str):
|
152
|
+
...
|
153
|
+
def __str__(self):
|
154
|
+
...
|
155
|
+
...
|
156
|
+
|
157
|
+
class CapsuleApi(object, metaclass=type):
|
158
|
+
def __init__(self, base_url: str, perimeter: str, logger_fn = None):
|
159
|
+
...
|
160
|
+
def create(self, capsule_input: dict):
|
161
|
+
...
|
162
|
+
def get(self, capsule_id: str):
|
163
|
+
...
|
164
|
+
def list(self):
|
165
|
+
...
|
166
|
+
def delete(self, capsule_id: str):
|
167
|
+
...
|
168
|
+
def get_workers(self, capsule_id: str) -> typing.List[typing.Dict[str, typing.Any]]:
|
169
|
+
...
|
170
|
+
def logs(self, capsule_id: str, worker_id: str, previous: bool = False) -> typing.List[str]:
|
171
|
+
...
|
172
|
+
...
|
173
|
+
|
174
|
+
def list_and_filter_capsules(capsule_api: CapsuleApi, project, branch, name, tags, auth_type, capsule_id):
|
175
|
+
...
|
176
|
+
|
177
|
+
class CapsuleInfo(tuple, metaclass=type):
|
178
|
+
"""
|
179
|
+
CapsuleInfo(info, workers)
|
180
|
+
"""
|
181
|
+
@staticmethod
|
182
|
+
def __new__(_cls, info, workers):
|
183
|
+
"""
|
184
|
+
Create new instance of CapsuleInfo(info, workers)
|
185
|
+
"""
|
186
|
+
...
|
187
|
+
def __repr__(self):
|
188
|
+
"""
|
189
|
+
Return a nicely formatted representation string
|
190
|
+
"""
|
191
|
+
...
|
192
|
+
def __getnewargs__(self):
|
193
|
+
"""
|
194
|
+
Return self as a plain tuple. Used by copy and pickle.
|
195
|
+
"""
|
196
|
+
...
|
197
|
+
...
|
198
|
+
|
199
|
+
class CapsuleDeployer(object, metaclass=type):
|
200
|
+
def __init__(self, app_config: metaflow.mf_extensions.outerbounds.plugins.apps.core.app_config.AppConfig, base_url: str, create_timeout: int = 300, debug_dir: typing.Optional[str] = None, success_terminal_state_condition: str = 'at_least_one_running', readiness_wait_time: int = 20, logger_fn = None):
|
201
|
+
...
|
202
|
+
@property
|
203
|
+
def url(self):
|
204
|
+
...
|
205
|
+
@property
|
206
|
+
def capsule_api(self):
|
207
|
+
...
|
208
|
+
@property
|
209
|
+
def capsule_type(self):
|
210
|
+
...
|
211
|
+
@property
|
212
|
+
def name(self):
|
213
|
+
...
|
214
|
+
def create_input(self):
|
215
|
+
...
|
216
|
+
@property
|
217
|
+
def current_deployment_instance_version(self):
|
218
|
+
"""
|
219
|
+
The backend `create` call returns a version of the object that will be
|
220
|
+
"""
|
221
|
+
...
|
222
|
+
def create(self):
|
223
|
+
...
|
224
|
+
def get(self):
|
225
|
+
...
|
226
|
+
def get_workers(self):
|
227
|
+
...
|
228
|
+
def wait_for_terminal_state(self):
|
229
|
+
"""
|
230
|
+
"""
|
231
|
+
...
|
232
|
+
...
|
233
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.15.18.1+obcheckpoint(0.2.4);ob(v1) #
|
4
|
+
# Generated on 2025-07-03T01:34:48.331800 #
|
5
|
+
######################################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
|
10
|
+
from . import experimental as experimental
|
11
|
+
|
12
|
+
def build_config_from_options(options):
|
13
|
+
"""
|
14
|
+
Build an app configuration from CLI options.
|
15
|
+
"""
|
16
|
+
...
|
17
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.15.18.1+obcheckpoint(0.2.4);ob(v1) #
|
4
|
+
# Generated on 2025-07-03T01:34:48.331280 #
|
5
|
+
######################################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
|
10
|
+
from ......_vendor import click as metaflow_click
|
11
|
+
from ......_vendor import click as click
|
12
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.15.18.1+obcheckpoint(0.2.4);ob(v1) #
|
4
|
+
# Generated on 2025-07-03T01:34:48.334481 #
|
5
|
+
######################################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
|
10
|
+
from . import code_packager as code_packager
|
11
|
+
from .code_packager import CodePackager as CodePackager
|
12
|
+
|
@@ -0,0 +1,242 @@
|
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.15.18.1+obcheckpoint(0.2.4);ob(v1) #
|
4
|
+
# Generated on 2025-07-03T01:34:48.366381 #
|
5
|
+
######################################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
if typing.TYPE_CHECKING:
|
11
|
+
import typing
|
12
|
+
import metaflow.datastore.content_addressed_store
|
13
|
+
|
14
|
+
|
15
|
+
DATASTORE_SYSROOT_S3: None
|
16
|
+
|
17
|
+
DATASTORE_SYSROOT_AZURE: None
|
18
|
+
|
19
|
+
DATASTORE_SYSROOT_GS: None
|
20
|
+
|
21
|
+
DATASTORE_SYSROOT_LOCAL: None
|
22
|
+
|
23
|
+
CODE_PACKAGE_PREFIX: str
|
24
|
+
|
25
|
+
def walk_without_cycles(top_root):
|
26
|
+
...
|
27
|
+
|
28
|
+
def symlink_friendly_walk(root, exclude_hidden = True, suffixes = None):
|
29
|
+
...
|
30
|
+
|
31
|
+
class CodePackager(object, metaclass=type):
|
32
|
+
"""
|
33
|
+
A datastore-agnostic class for packaging code.
|
34
|
+
|
35
|
+
This class handles creating a code package (tarball) for deployment
|
36
|
+
and provides methods for storing and retrieving it using Metaflow's
|
37
|
+
ContentAddressedStore directly.
|
38
|
+
|
39
|
+
Usage examples:
|
40
|
+
```python
|
41
|
+
packager = CodePackager(
|
42
|
+
datastore_type: str = "s3",
|
43
|
+
datastore_root = None,
|
44
|
+
code_package_prefix = None,
|
45
|
+
)
|
46
|
+
|
47
|
+
package_url, package_key = packager.store(
|
48
|
+
paths_to_include = ["./"],
|
49
|
+
file_suffixes = [".py", ".txt", ".yaml", ".yml", ".json"],
|
50
|
+
)
|
51
|
+
|
52
|
+
package_url, package_key = packager.store(
|
53
|
+
package_create_fn = lambda: my_custom_package_create_fn(),
|
54
|
+
)
|
55
|
+
```
|
56
|
+
"""
|
57
|
+
def __init__(self, datastore_type: str = 's3', datastore_root: typing.Optional[str] = None, code_package_prefix: typing.Optional[str] = None):
|
58
|
+
"""
|
59
|
+
Initialize the CodePackager with datastore configuration.
|
60
|
+
|
61
|
+
Parameters
|
62
|
+
----------
|
63
|
+
datastore_type : str, default "s3"
|
64
|
+
The type of datastore to use: "s3", "azure", "gs", or "local"
|
65
|
+
datastore_root : str, optional
|
66
|
+
Root path for the datastore. If not provided, uses the default for the datastore type.
|
67
|
+
code_package_prefix : str, optional
|
68
|
+
The prefix to use for storing code packages in the content addressed store.
|
69
|
+
If not provided, uses the CODE_PACKAGE_PREFIX configuration value.
|
70
|
+
"""
|
71
|
+
...
|
72
|
+
def store(self, package_create_fn: typing.Optional[typing.Callable[[], bytes]] = None, paths_to_include: typing.Optional[typing.List[str]] = None, file_suffixes: typing.Optional[typing.List[str]] = None, metadata: typing.Optional[typing.Dict[str, typing.Any]] = None) -> typing.Tuple[str, str]:
|
73
|
+
"""
|
74
|
+
Create and store a code package using Metaflow's ContentAddressedStore.
|
75
|
+
|
76
|
+
This method can be called in two ways:
|
77
|
+
1. With paths_to_include and file_suffixes to use the default packaging
|
78
|
+
2. With a custom package_create_fn for custom packaging logic
|
79
|
+
|
80
|
+
Parameters
|
81
|
+
----------
|
82
|
+
package_create_fn : Callable[[], bytes], optional
|
83
|
+
A function that creates and returns a package as bytes.
|
84
|
+
This allows for custom packaging logic without dependency on specific objects.
|
85
|
+
paths_to_include : List[str], optional
|
86
|
+
List of paths to include in the package. Used by default_package_create.
|
87
|
+
file_suffixes : List[str], optional
|
88
|
+
List of file suffixes to include. Used by default_package_create.
|
89
|
+
metadata : Dict[str, Any], optional
|
90
|
+
Metadata to include in the package when using default_package_create.
|
91
|
+
|
92
|
+
Returns
|
93
|
+
-------
|
94
|
+
Tuple[str, str]
|
95
|
+
A tuple containing (package_url, package_key) that identifies the location
|
96
|
+
and content-addressed key of the stored package.
|
97
|
+
"""
|
98
|
+
...
|
99
|
+
@staticmethod
|
100
|
+
def get_content_addressed_store(datastore_type: str = 's3', datastore_root: typing.Optional[str] = None, prefix: typing.Optional[str] = None) -> metaflow.datastore.content_addressed_store.ContentAddressedStore:
|
101
|
+
"""
|
102
|
+
Get a ContentAddressedStore instance for the specified datastore.
|
103
|
+
|
104
|
+
Parameters
|
105
|
+
----------
|
106
|
+
datastore_type : str, default "s3"
|
107
|
+
Type of datastore: "s3", "azure", "gs", or "local"
|
108
|
+
datastore_root : str, optional
|
109
|
+
Root path for the datastore. If not provided, uses the default for the datastore type.
|
110
|
+
prefix : str, optional
|
111
|
+
Prefix to use when storing objects in the datastore.
|
112
|
+
If not provided, uses the CODE_PACKAGE_PREFIX configuration value.
|
113
|
+
|
114
|
+
Returns
|
115
|
+
-------
|
116
|
+
ContentAddressedStore
|
117
|
+
A ContentAddressedStore instance configured for the specified datastore
|
118
|
+
"""
|
119
|
+
...
|
120
|
+
@staticmethod
|
121
|
+
def get_download_cmd(package_url: str, datastore_type: str, python_cmd: str = 'python', target_file: str = 'job.tar', escape_quotes: bool = True) -> str:
|
122
|
+
"""
|
123
|
+
Generate a command to download the code package.
|
124
|
+
|
125
|
+
Parameters
|
126
|
+
----------
|
127
|
+
package_url : str
|
128
|
+
The URL of the package to download
|
129
|
+
datastore_type : str
|
130
|
+
The type of datastore (s3, azure, gs, local)
|
131
|
+
python_cmd : str, optional
|
132
|
+
The Python command to use
|
133
|
+
target_file : str, optional
|
134
|
+
The target file name to save the package as
|
135
|
+
escape_quotes : bool, optional
|
136
|
+
Whether to escape quotes in the command
|
137
|
+
|
138
|
+
Returns
|
139
|
+
-------
|
140
|
+
str
|
141
|
+
A shell command string to download the package
|
142
|
+
"""
|
143
|
+
...
|
144
|
+
def get_package_commands(self, code_package_url: str, python_cmd: str = 'python', target_file: str = 'job.tar', working_dir: str = 'metaflow', retries: int = 5, escape_quotes: bool = True) -> typing.List[str]:
|
145
|
+
"""
|
146
|
+
Get a complete list of shell commands to download and extract a code package.
|
147
|
+
|
148
|
+
This method generates a comprehensive set of shell commands for downloading
|
149
|
+
and extracting a code package, similar to MetaflowEnvironment.get_package_commands.
|
150
|
+
|
151
|
+
Parameters
|
152
|
+
----------
|
153
|
+
code_package_url : str
|
154
|
+
The URL of the code package to download
|
155
|
+
python_cmd : str, optional
|
156
|
+
The Python command to use
|
157
|
+
target_file : str, optional
|
158
|
+
The target file name to save the package as
|
159
|
+
working_dir : str, optional
|
160
|
+
The directory to create and extract the package into
|
161
|
+
retries : int, optional
|
162
|
+
Number of download retries to attempt
|
163
|
+
escape_quotes : bool, optional
|
164
|
+
Whether to escape quotes in the command
|
165
|
+
|
166
|
+
Returns
|
167
|
+
-------
|
168
|
+
List[str]
|
169
|
+
List of shell commands to execute
|
170
|
+
"""
|
171
|
+
...
|
172
|
+
@staticmethod
|
173
|
+
def directory_walker(root, exclude_hidden = True, suffixes = None) -> typing.List[typing.Tuple[str, str]]:
|
174
|
+
"""
|
175
|
+
Walk a directory and yield tuples of (file_path, relative_arcname) for files
|
176
|
+
that match the given suffix filters. It will follow symlinks, but not cycles.
|
177
|
+
|
178
|
+
This function is similar to MetaflowPackage._walk and handles symlinks safely.
|
179
|
+
|
180
|
+
Parameters
|
181
|
+
----------
|
182
|
+
root : str
|
183
|
+
The root directory to walk
|
184
|
+
exclude_hidden : bool, default True
|
185
|
+
Whether to exclude hidden files and directories (those starting with '.')
|
186
|
+
suffixes : List[str], optional
|
187
|
+
List of file suffixes to include (e.g. ['.py', '.txt'])
|
188
|
+
|
189
|
+
Returns
|
190
|
+
-------
|
191
|
+
List[Tuple[str, str]]
|
192
|
+
List of tuples (file_path, relative_arcname) where:
|
193
|
+
- file_path is the full path to the file
|
194
|
+
- relative_arcname is the path to use within the archive
|
195
|
+
"""
|
196
|
+
...
|
197
|
+
@staticmethod
|
198
|
+
def default_package_create(paths: typing.List[str], suffixes: typing.List[str], metadata: typing.Optional[typing.Dict[str, typing.Any]] = None) -> bytes:
|
199
|
+
"""
|
200
|
+
Create a default tarball package from specified paths.
|
201
|
+
|
202
|
+
Parameters
|
203
|
+
----------
|
204
|
+
paths : List[str]
|
205
|
+
List of paths to include in the package
|
206
|
+
suffixes : List[str]
|
207
|
+
List of file suffixes to include
|
208
|
+
metadata : Dict[str, Any], optional
|
209
|
+
Metadata to include in the package
|
210
|
+
|
211
|
+
Returns
|
212
|
+
-------
|
213
|
+
bytes
|
214
|
+
The binary content of the tarball
|
215
|
+
"""
|
216
|
+
...
|
217
|
+
@classmethod
|
218
|
+
def package_directory(cls, directory_path: str, suffixes: typing.Optional[typing.List[str]] = None, exclude_hidden: bool = True, metadata: typing.Optional[typing.Dict[str, typing.Any]] = None) -> bytes:
|
219
|
+
"""
|
220
|
+
Package a directory and all of its contents that match the given suffixes.
|
221
|
+
|
222
|
+
This is a convenience method that works similarly to MetaflowPackage._walk
|
223
|
+
to package a directory for deployment. Will default follow_symlinks.
|
224
|
+
|
225
|
+
Parameters
|
226
|
+
----------
|
227
|
+
directory_path : str
|
228
|
+
The directory to package
|
229
|
+
suffixes : List[str], optional
|
230
|
+
List of file suffixes to include (defaults to standard code extensions)
|
231
|
+
exclude_hidden : bool, default True
|
232
|
+
Whether to exclude hidden files and directories
|
233
|
+
metadata : Dict[str, Any], optional
|
234
|
+
Metadata to include in the package
|
235
|
+
Returns
|
236
|
+
-------
|
237
|
+
bytes
|
238
|
+
The binary content of the tarball
|
239
|
+
"""
|
240
|
+
...
|
241
|
+
...
|
242
|
+
|
@@ -0,0 +1,50 @@
|
|
1
|
+
######################################################################################################
|
2
|
+
# Auto-generated Metaflow stub file #
|
3
|
+
# MF version: 2.15.18.1+obcheckpoint(0.2.4);ob(v1) #
|
4
|
+
# Generated on 2025-07-03T01:34:48.333999 #
|
5
|
+
######################################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
if typing.TYPE_CHECKING:
|
11
|
+
import typing
|
12
|
+
import metaflow.mf_extensions.outerbounds.plugins.apps.core.app_config
|
13
|
+
import metaflow.mf_extensions.outerbounds.plugins.apps.core.dependencies
|
14
|
+
|
15
|
+
from .app_config import AppConfig as AppConfig
|
16
|
+
from .utils import TODOException as TODOException
|
17
|
+
from ......metaflow_config import get_pinned_conda_libs as get_pinned_conda_libs
|
18
|
+
|
19
|
+
DEFAULT_DATASTORE: str
|
20
|
+
|
21
|
+
KUBERNETES_CONTAINER_IMAGE: None
|
22
|
+
|
23
|
+
class BakingStatus(tuple, metaclass=type):
|
24
|
+
"""
|
25
|
+
BakingStatus(image_should_be_baked, python_path, resolved_image)
|
26
|
+
"""
|
27
|
+
@staticmethod
|
28
|
+
def __new__(_cls, image_should_be_baked, python_path, resolved_image):
|
29
|
+
"""
|
30
|
+
Create new instance of BakingStatus(image_should_be_baked, python_path, resolved_image)
|
31
|
+
"""
|
32
|
+
...
|
33
|
+
def __repr__(self):
|
34
|
+
"""
|
35
|
+
Return a nicely formatted representation string
|
36
|
+
"""
|
37
|
+
...
|
38
|
+
def __getnewargs__(self):
|
39
|
+
"""
|
40
|
+
Return self as a plain tuple. Used by copy and pickle.
|
41
|
+
"""
|
42
|
+
...
|
43
|
+
...
|
44
|
+
|
45
|
+
class ImageBakingException(Exception, metaclass=type):
|
46
|
+
...
|
47
|
+
|
48
|
+
def bake_deployment_image(app_config: metaflow.mf_extensions.outerbounds.plugins.apps.core.app_config.AppConfig, cache_file_path: str, logger: typing.Optional[typing.Callable[[str], typing.Any]] = None) -> BakingStatus:
|
49
|
+
...
|
50
|
+
|