ob-metaflow-stubs 6.0.3.188rc1__py2.py3-none-any.whl → 6.0.3.188rc3__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 +829 -824
- 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 +4 -4
- metaflow-stubs/generated_for.txt +1 -1
- metaflow-stubs/includefile.pyi +3 -3
- 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 +2 -2
- metaflow-stubs/metadata_provider/util.pyi +1 -1
- metaflow-stubs/metaflow_config.pyi +1 -1
- metaflow-stubs/metaflow_current.pyi +39 -26
- 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 +2 -2
- 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 +3 -3
- 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 +4 -4
- 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 +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 +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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- metaflow-stubs/mf_extensions/obcheckpoint/plugins/machine_learning_utilities/utils/tar_utils.pyi +2 -2
- 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 +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/__init__.pyi +12 -6
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_state_machine.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_vendor/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_vendor/spinner/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/_vendor/spinner/spinners.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/app_cli.pyi +4 -44
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/app_config.pyi +15 -30
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/capsule.pyi +4 -4
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/click_importer.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/code_package/__init__.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/code_package/code_packager.pyi +4 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/__init__.pyi +24 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/cli_generator.pyi +53 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/config_utils.pyi +426 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/schema_export.pyi +64 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/typed_configs.pyi +50 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/config/unified_config.pyi +241 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/dependencies.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/deployer.pyi +46 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/experimental/__init__.pyi +1 -11
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/perimeters.pyi +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/utils.pyi +4 -4
- 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 +2 -2
- 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 +1 -1
- metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/baker.pyi +4 -4
- metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/docker_environment.pyi +2 -2
- metaflow-stubs/mf_extensions/outerbounds/plugins/fast_bakery/fast_bakery.pyi +1 -1
- 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 +2 -1
- metaflow-stubs/multicore_utils.pyi +1 -1
- metaflow-stubs/ob_internal.pyi +2 -1
- metaflow-stubs/parameters.pyi +3 -3
- metaflow-stubs/plugins/__init__.pyi +8 -8
- 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 +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_decorator.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_deployer.pyi +3 -3
- metaflow-stubs/plugins/argo/argo_workflows_deployer_objects.pyi +3 -3
- metaflow-stubs/plugins/aws/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/aws_client.pyi +1 -1
- metaflow-stubs/plugins/aws/aws_utils.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch_client.pyi +1 -1
- metaflow-stubs/plugins/aws/batch/batch_decorator.pyi +1 -1
- metaflow-stubs/plugins/aws/secrets_manager/__init__.pyi +1 -1
- metaflow-stubs/plugins/aws/secrets_manager/aws_secrets_manager_secrets_provider.pyi +3 -3
- 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 +2 -2
- metaflow-stubs/plugins/aws/step_functions/step_functions_deployer_objects.pyi +2 -2
- metaflow-stubs/plugins/azure/__init__.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_credential.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_exceptions.pyi +1 -1
- metaflow-stubs/plugins/azure/azure_secret_manager_secrets_provider.pyi +3 -3
- 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 +1 -1
- 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 +3 -3
- 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 +3 -3
- 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 +2 -2
- 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 +1 -1
- metaflow-stubs/plugins/parallel_decorator.pyi +1 -1
- metaflow-stubs/plugins/perimeters.pyi +1 -1
- metaflow-stubs/plugins/project_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/__init__.pyi +2 -2
- metaflow-stubs/plugins/pypi/conda_decorator.pyi +1 -1
- metaflow-stubs/plugins/pypi/conda_environment.pyi +4 -4
- 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 +2 -2
- metaflow-stubs/plugins/secrets/inline_secrets_provider.pyi +2 -2
- 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 +5 -5
- metaflow-stubs/runner/deployer_impl.pyi +2 -2
- metaflow-stubs/runner/metaflow_runner.pyi +4 -4
- metaflow-stubs/runner/nbdeploy.pyi +1 -1
- metaflow-stubs/runner/nbrun.pyi +1 -1
- metaflow-stubs/runner/subprocess_manager.pyi +1 -1
- metaflow-stubs/runner/utils.pyi +2 -2
- metaflow-stubs/system/__init__.pyi +1 -1
- metaflow-stubs/system/system_logger.pyi +1 -1
- 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 +4 -4
- metaflow-stubs/user_configs/config_options.pyi +2 -2
- metaflow-stubs/user_configs/config_parameters.pyi +5 -5
- {ob_metaflow_stubs-6.0.3.188rc1.dist-info → ob_metaflow_stubs-6.0.3.188rc3.dist-info}/METADATA +1 -1
- ob_metaflow_stubs-6.0.3.188rc3.dist-info/RECORD +243 -0
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/cli_to_config.pyi +0 -17
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/secrets.pyi +0 -46
- metaflow-stubs/mf_extensions/outerbounds/plugins/apps/core/validations.pyi +0 -24
- ob_metaflow_stubs-6.0.3.188rc1.dist-info/RECORD +0 -239
- {ob_metaflow_stubs-6.0.3.188rc1.dist-info → ob_metaflow_stubs-6.0.3.188rc3.dist-info}/WHEEL +0 -0
- {ob_metaflow_stubs-6.0.3.188rc1.dist-info → ob_metaflow_stubs-6.0.3.188rc3.dist-info}/top_level.txt +0 -0
@@ -1,17 +1,17 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
3
|
# MF version: 2.15.18.1+obcheckpoint(0.2.4);ob(v1) #
|
4
|
-
# Generated on 2025-07-
|
4
|
+
# Generated on 2025-07-10T08:45:58.235863 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
9
9
|
import typing
|
10
10
|
if typing.TYPE_CHECKING:
|
11
|
+
import metaflow.mf_extensions.outerbounds.plugins.apps.core.app_config
|
12
|
+
import typing
|
11
13
|
import metaflow.mf_extensions.outerbounds.plugins.apps.core.capsule
|
12
14
|
import metaflow.mf_extensions.outerbounds.plugins.apps.core._state_machine
|
13
|
-
import typing
|
14
|
-
import metaflow.mf_extensions.outerbounds.plugins.apps.core.app_config
|
15
15
|
|
16
16
|
from .utils import TODOException as TODOException
|
17
17
|
from .utils import safe_requests_wrapper as safe_requests_wrapper
|
@@ -136,7 +136,7 @@ class CapsuleInput(object, metaclass=type):
|
|
136
136
|
def construct_exec_command(cls, commands: list):
|
137
137
|
...
|
138
138
|
@classmethod
|
139
|
-
def from_app_config(
|
139
|
+
def from_app_config(cls, app_config: metaflow.mf_extensions.outerbounds.plugins.apps.core.app_config.AppConfig):
|
140
140
|
...
|
141
141
|
...
|
142
142
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
3
|
# MF version: 2.15.18.1+obcheckpoint(0.2.4);ob(v1) #
|
4
|
-
# Generated on 2025-07-
|
4
|
+
# Generated on 2025-07-10T08:45:58.238907 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,7 +1,7 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
3
|
# MF version: 2.15.18.1+obcheckpoint(0.2.4);ob(v1) #
|
4
|
-
# Generated on 2025-07-
|
4
|
+
# Generated on 2025-07-10T08:45:58.240347 #
|
5
5
|
######################################################################################################
|
6
6
|
|
7
7
|
from __future__ import annotations
|
@@ -1,15 +1,15 @@
|
|
1
1
|
######################################################################################################
|
2
2
|
# Auto-generated Metaflow stub file #
|
3
3
|
# MF version: 2.15.18.1+obcheckpoint(0.2.4);ob(v1) #
|
4
|
-
# Generated on 2025-07-
|
4
|
+
# Generated on 2025-07-10T08:45:58.275116 #
|
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 metaflow.datastore.content_addressed_store
|
12
|
+
import typing
|
13
13
|
|
14
14
|
|
15
15
|
DATASTORE_SYSROOT_S3: None
|
@@ -20,6 +20,8 @@ DATASTORE_SYSROOT_GS: None
|
|
20
20
|
|
21
21
|
DATASTORE_SYSROOT_LOCAL: None
|
22
22
|
|
23
|
+
DEFAULT_FILE_SUFFIXES: list
|
24
|
+
|
23
25
|
CODE_PACKAGE_PREFIX: str
|
24
26
|
|
25
27
|
def walk_without_cycles(top_root):
|
@@ -0,0 +1,24 @@
|
|
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-10T08:45:58.239145 #
|
5
|
+
######################################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
|
10
|
+
from . import config_utils as config_utils
|
11
|
+
from . import unified_config as unified_config
|
12
|
+
from .unified_config import CoreConfig as CoreConfig
|
13
|
+
from . import cli_generator as cli_generator
|
14
|
+
from .cli_generator import auto_cli_options as auto_cli_options
|
15
|
+
from .config_utils import PureStringKVPairType as PureStringKVPairType
|
16
|
+
from .config_utils import JsonFriendlyKeyValuePairType as JsonFriendlyKeyValuePairType
|
17
|
+
from .config_utils import CommaSeparatedListType as CommaSeparatedListType
|
18
|
+
from .config_utils import MergingNotAllowedFieldsException as MergingNotAllowedFieldsException
|
19
|
+
from .config_utils import ConfigValidationFailedException as ConfigValidationFailedException
|
20
|
+
from .config_utils import RequiredFieldMissingException as RequiredFieldMissingException
|
21
|
+
from . import schema_export as schema_export
|
22
|
+
from . import typed_configs as typed_configs
|
23
|
+
from .typed_configs import TypedCoreConfig as TypedCoreConfig
|
24
|
+
|
@@ -0,0 +1,53 @@
|
|
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-10T08:45:58.273512 #
|
5
|
+
######################################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
if typing.TYPE_CHECKING:
|
11
|
+
import metaflow_extensions.outerbounds.plugins.apps.core.config.unified_config
|
12
|
+
|
13
|
+
from ......._vendor import click as click
|
14
|
+
from .unified_config import CoreConfig as CoreConfig
|
15
|
+
from .config_utils import CLIOption as CLIOption
|
16
|
+
from .config_utils import ConfigMeta as ConfigMeta
|
17
|
+
from .config_utils import PureStringKVPairType as PureStringKVPairType
|
18
|
+
from .config_utils import JsonFriendlyKeyValuePairType as JsonFriendlyKeyValuePairType
|
19
|
+
from .config_utils import CommaSeparatedListType as CommaSeparatedListType
|
20
|
+
|
21
|
+
class CLIGenerator(object, metaclass=type):
|
22
|
+
"""
|
23
|
+
Generates Click CLI options from CoreConfig dataclass.
|
24
|
+
"""
|
25
|
+
def __init__(self, config_class: type = metaflow_extensions.outerbounds.plugins.apps.core.config.unified_config.CoreConfig):
|
26
|
+
...
|
27
|
+
def generate_options(self):
|
28
|
+
"""
|
29
|
+
Generate all CLI options from the configuration class.
|
30
|
+
"""
|
31
|
+
...
|
32
|
+
def create_decorator(self, command_type: str = 'deploy') -> callable:
|
33
|
+
"""
|
34
|
+
Create a decorator that applies all CLI options to a command.
|
35
|
+
"""
|
36
|
+
...
|
37
|
+
...
|
38
|
+
|
39
|
+
def auto_cli_options(config_class: type = metaflow_extensions.outerbounds.plugins.apps.core.config.unified_config.CoreConfig, command_type: str = 'deploy'):
|
40
|
+
"""
|
41
|
+
Decorator that automatically adds CLI options from CoreConfig.
|
42
|
+
|
43
|
+
Args:
|
44
|
+
command_type: Type of command (e.g., "deploy", "list", "delete")
|
45
|
+
|
46
|
+
Usage:
|
47
|
+
@auto_cli_options("deploy")
|
48
|
+
def deploy_command(**kwargs):
|
49
|
+
config = CoreConfig.from_cli(kwargs)
|
50
|
+
# ... use config
|
51
|
+
"""
|
52
|
+
...
|
53
|
+
|
@@ -0,0 +1,426 @@
|
|
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-10T08:45:58.272554 #
|
5
|
+
######################################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
import metaflow
|
11
|
+
if typing.TYPE_CHECKING:
|
12
|
+
import metaflow._vendor.click.types
|
13
|
+
import typing
|
14
|
+
import metaflow.mf_extensions.outerbounds.plugins.apps.core.config.config_utils
|
15
|
+
|
16
|
+
from ......._vendor import click as click
|
17
|
+
|
18
|
+
class FieldBehavior(object, metaclass=type):
|
19
|
+
"""
|
20
|
+
Defines how configuration fields behave when merging values from multiple sources.
|
21
|
+
|
22
|
+
FieldBehavior controls the merging logic when the same field receives values from
|
23
|
+
different configuration sources (CLI options, config files, environment variables).
|
24
|
+
This is crucial for maintaining consistent and predictable configuration behavior
|
25
|
+
across different deployment scenarios.
|
26
|
+
|
27
|
+
The behavior system allows fine-grained control over how different types of fields
|
28
|
+
should handle conflicting values, ensuring that sensitive configuration (like
|
29
|
+
dependency specifications) cannot be accidentally overridden while still allowing
|
30
|
+
flexible configuration for runtime parameters.
|
31
|
+
|
32
|
+
Behavior Types:
|
33
|
+
|
34
|
+
UNION (Default):
|
35
|
+
- **For Primitive Types**: Override value takes precedence
|
36
|
+
- **For Lists**: Values are merged by extending the base list with override values
|
37
|
+
- **For Dictionaries**: Values are merged by updating base dict with override values
|
38
|
+
- **For Nested Objects**: Recursively merge nested configuration objects
|
39
|
+
|
40
|
+
Example:
|
41
|
+
```python
|
42
|
+
# Base config: {"tags": ["prod", "web"]}
|
43
|
+
# CLI config: {"tags": ["urgent"]}
|
44
|
+
# Result: {"tags": ["prod", "web", "urgent"]}
|
45
|
+
```
|
46
|
+
|
47
|
+
NOT_ALLOWED:
|
48
|
+
- CLI values cannot override config file values
|
49
|
+
- CLI values are only used if config file value is None
|
50
|
+
- Ensures critical configuration is only set in one place to avoid ambiguity.
|
51
|
+
|
52
|
+
Example:
|
53
|
+
```python
|
54
|
+
# Base config: {"dependencies": {"numpy": "1.21.0"}}
|
55
|
+
# CLI config: {"dependencies": {"numpy": "1.22.0"}}
|
56
|
+
# Result: Exception is raised
|
57
|
+
```
|
58
|
+
|
59
|
+
```python
|
60
|
+
# Base config: {"dependencies": {"pypi": null, "conda": null}}
|
61
|
+
# CLI config: {"dependencies": {"pypi": {"numpy": "1.22.0"}}}
|
62
|
+
# Result: {"dependencies": {"pypi": {"numpy": "1.22.0"}}} # since there is nothing in base config, the CLI config is used.
|
63
|
+
```
|
64
|
+
|
65
|
+
Integration with Merging:
|
66
|
+
The behavior is enforced by the `merge_field_values` function during configuration
|
67
|
+
merging. Each field's behavior is checked and the appropriate merging logic is applied.
|
68
|
+
"""
|
69
|
+
...
|
70
|
+
|
71
|
+
class CLIOption(object, metaclass=type):
|
72
|
+
"""
|
73
|
+
Metadata container for automatic CLI option generation from configuration fields.
|
74
|
+
|
75
|
+
CLIOption defines how a ConfigField should be exposed as a command-line option in the
|
76
|
+
generated CLI interface. It provides a declarative way to specify CLI parameter names,
|
77
|
+
help text, validation rules, and Click-specific behaviors without tightly coupling
|
78
|
+
configuration definitions to CLI implementation details.
|
79
|
+
|
80
|
+
This class bridges the gap between configuration field definitions and Click option
|
81
|
+
generation, allowing the same field definition to work seamlessly across different
|
82
|
+
interfaces (CLI, config files, programmatic usage).
|
83
|
+
|
84
|
+
Click Integration:
|
85
|
+
The CLIOption metadata is used by CLIGenerator to create Click options:
|
86
|
+
```python
|
87
|
+
@click.option("--port", "port", type=int, help="Application port")
|
88
|
+
```
|
89
|
+
|
90
|
+
This is automatically generated from:
|
91
|
+
```python
|
92
|
+
port = ConfigField(
|
93
|
+
cli_meta=CLIOption(
|
94
|
+
name="port",
|
95
|
+
cli_option_str="--port",
|
96
|
+
help="Application port"
|
97
|
+
),
|
98
|
+
field_type=int
|
99
|
+
)
|
100
|
+
```
|
101
|
+
|
102
|
+
|
103
|
+
Parameters
|
104
|
+
----------
|
105
|
+
name : str
|
106
|
+
Parameter name used in Click option and function signature (e.g., "my_foo").
|
107
|
+
cli_option_str : str
|
108
|
+
Command-line option string (e.g., "--foo", "--enable/--disable").
|
109
|
+
help : Optional[str], optional
|
110
|
+
Help text displayed in CLI help output.
|
111
|
+
short : Optional[str], optional
|
112
|
+
Short option character (e.g., "-f" for "--foo").
|
113
|
+
multiple : bool, optional
|
114
|
+
Whether the option accepts multiple values.
|
115
|
+
is_flag : bool, optional
|
116
|
+
Whether this is a boolean flag option.
|
117
|
+
choices : Optional[List[str]], optional
|
118
|
+
List of valid choices for the option.
|
119
|
+
default : Any, optional
|
120
|
+
Default value for the CLI option (separate from ConfigField default).
|
121
|
+
hidden : bool, optional
|
122
|
+
Whether to hide this option from CLI (config file only).
|
123
|
+
click_type : Optional[Any], optional
|
124
|
+
Custom Click type for specialized parsing (e.g., KeyValuePair).
|
125
|
+
"""
|
126
|
+
def __init__(self, name: str, cli_option_str: str, help: typing.Optional[str] = None, short: typing.Optional[str] = None, multiple: bool = False, is_flag: bool = False, choices: typing.Optional[typing.List[str]] = None, default: typing.Any = None, hidden: bool = False, click_type: typing.Optional[typing.Any] = None):
|
127
|
+
...
|
128
|
+
...
|
129
|
+
|
130
|
+
class ConfigField(object, metaclass=type):
|
131
|
+
"""
|
132
|
+
Descriptor for configuration fields with comprehensive metadata and behavior control.
|
133
|
+
|
134
|
+
ConfigField is a Python descriptor that provides a declarative way to define configuration
|
135
|
+
fields with rich metadata, validation, CLI integration, and merging behavior. It acts as
|
136
|
+
both a data descriptor (controlling get/set access) and a metadata container.
|
137
|
+
|
138
|
+
Key Functionality:
|
139
|
+
- **Descriptor Protocol**: Implements __get__, __set__, and __set_name__ to control
|
140
|
+
field access and automatically capture the field name during class creation.
|
141
|
+
- **Type Safety**: Optional strict type checking during value assignment.
|
142
|
+
- **CLI Integration**: Automatic CLI option generation via CLIOption metadata.
|
143
|
+
- **Validation**: Built-in validation functions and required field checks.
|
144
|
+
- **Merging Behavior**: Controls how values are merged from different sources (CLI, config files).
|
145
|
+
- **Default Values**: Supports both static defaults and callable defaults for dynamic initialization.
|
146
|
+
|
147
|
+
Merging Behaviors:
|
148
|
+
- **UNION**: Values from different sources are merged (lists extended, dicts updated).
|
149
|
+
- **NOT_ALLOWED**: Override values are ignored if base value exists.
|
150
|
+
|
151
|
+
Field Lifecycle:
|
152
|
+
1. **Definition**: Field is defined in a ConfigMeta-based class
|
153
|
+
2. **Registration**: __set_name__ is called to register the field name
|
154
|
+
3. **Initialization**: Field is initialized with None or nested config objects
|
155
|
+
4. **Population**: Values are set from CLI options, config files, or direct assignment
|
156
|
+
5. **Validation**: Validation functions are called during commit phase
|
157
|
+
6. **Default Application**: Default values are applied to None fields
|
158
|
+
|
159
|
+
Examples:
|
160
|
+
Basic field definition:
|
161
|
+
```python
|
162
|
+
name = ConfigField(
|
163
|
+
field_type=str,
|
164
|
+
required=True,
|
165
|
+
help="Application name",
|
166
|
+
example="myapp"
|
167
|
+
)
|
168
|
+
```
|
169
|
+
|
170
|
+
Field with CLI integration:
|
171
|
+
```python
|
172
|
+
port = ConfigField(
|
173
|
+
cli_meta=CLIOption(
|
174
|
+
name="port",
|
175
|
+
cli_option_str="--port",
|
176
|
+
help="Application port"
|
177
|
+
),
|
178
|
+
field_type=int,
|
179
|
+
required=True,
|
180
|
+
validation_fn=lambda x: 1 <= x <= 65535
|
181
|
+
)
|
182
|
+
```
|
183
|
+
|
184
|
+
Nested configuration field:
|
185
|
+
```python
|
186
|
+
resources = ConfigField(
|
187
|
+
field_type=ResourceConfig,
|
188
|
+
help="Resource configuration"
|
189
|
+
)
|
190
|
+
```
|
191
|
+
|
192
|
+
Parameters
|
193
|
+
----------
|
194
|
+
default : Any or Callable[["ConfigField"], Any], optional
|
195
|
+
Default value for the field. Can be a static value or a callable for dynamic defaults.
|
196
|
+
cli_meta : CLIOption, optional
|
197
|
+
CLIOption instance defining CLI option generation parameters.
|
198
|
+
field_type : type, optional
|
199
|
+
Expected type of the field value (used for validation and nesting).
|
200
|
+
required : bool, optional
|
201
|
+
Whether the field must have a non-None value after configuration.
|
202
|
+
help : str, optional
|
203
|
+
Help text describing the field's purpose.
|
204
|
+
behavior : str, optional
|
205
|
+
FieldBehavior controlling how values are merged from different sources.
|
206
|
+
example : Any, optional
|
207
|
+
Example value for documentation and schema generation.
|
208
|
+
strict_types : bool, optional
|
209
|
+
Whether to enforce type checking during value assignment.
|
210
|
+
validation_fn : callable, optional
|
211
|
+
Optional function to validate field values.
|
212
|
+
is_experimental : bool, optional
|
213
|
+
Whether this field is experimental (for documentation).
|
214
|
+
"""
|
215
|
+
def __init__(self, default: typing.Union[typing.Any, typing.Callable[["ConfigField"], typing.Any]] = None, cli_meta = None, field_type = None, required = False, help = None, behavior: str = 'union', example = None, strict_types = True, validation_fn: typing.Optional[typing.Callable] = None, is_experimental = False, parsing_fn: typing.Optional[typing.Callable] = None):
|
216
|
+
...
|
217
|
+
def fully_qualified_name(self):
|
218
|
+
...
|
219
|
+
def __set_name__(self, owner, name):
|
220
|
+
...
|
221
|
+
def __get__(self, instance, owner):
|
222
|
+
...
|
223
|
+
def __set__(self, instance, value):
|
224
|
+
...
|
225
|
+
def __str__(self) -> str:
|
226
|
+
...
|
227
|
+
...
|
228
|
+
|
229
|
+
class ConfigMeta(type, metaclass=type):
|
230
|
+
"""
|
231
|
+
Metaclass implementing the configuration system's class transformation layer.
|
232
|
+
|
233
|
+
This metaclass exists to solve the fundamental problem of creating a declarative configuration
|
234
|
+
system that can automatically generate runtime behavior from field definitions. Without a
|
235
|
+
metaclass, each configuration class would need to manually implement field discovery,
|
236
|
+
validation, CLI integration, and nested object handling, leading to boilerplate code and
|
237
|
+
inconsistent behavior across the system.
|
238
|
+
|
239
|
+
Technical Implementation:
|
240
|
+
|
241
|
+
During class creation (__new__), this metaclass intercepts the class namespace and performs
|
242
|
+
several critical transformations:
|
243
|
+
|
244
|
+
1. Field Discovery: Scans the class namespace for ConfigField instances and extracts their
|
245
|
+
metadata into a `_fields` registry. This registry becomes the source of truth for all
|
246
|
+
runtime operations including validation, CLI generation, and serialization.
|
247
|
+
|
248
|
+
2. Method Injection: Adds the `_get_field` method to enable programmatic access to field
|
249
|
+
metadata. This method is used throughout the system by validation functions, CLI
|
250
|
+
generators, and configuration mergers.
|
251
|
+
|
252
|
+
3. __init__ Override: Replaces the class's __init__ method with a standardized version that
|
253
|
+
handles three critical initialization phases:
|
254
|
+
- Field initialization to None (explicit defaulting happens later via apply_defaults)
|
255
|
+
- Nested config object instantiation for ConfigMeta-based field types
|
256
|
+
- Keyword argument processing for programmatic configuration
|
257
|
+
|
258
|
+
System Integration and Lifecycle:
|
259
|
+
|
260
|
+
The metaclass integrates with the broader configuration system through several key interfaces:
|
261
|
+
|
262
|
+
- populate_config_recursive: Uses the _fields registry to map external data sources
|
263
|
+
(CLI options, config files) to object attributes
|
264
|
+
- apply_defaults: Traverses the _fields registry to apply default values after population
|
265
|
+
- validate_config_meta: Uses field metadata to execute validation functions
|
266
|
+
- merge_field_values: Consults field behavior settings to determine merge strategies
|
267
|
+
- config_meta_to_dict: Converts instances back to dictionaries for serialization
|
268
|
+
|
269
|
+
Lifecycle Phases:
|
270
|
+
|
271
|
+
1. Class Definition: Metaclass transforms the class, creating _fields registry
|
272
|
+
2. Instance Creation: Auto-generated __init__ initializes fields and nested objects
|
273
|
+
3. Population: External systems use _fields to populate from CLI/config files
|
274
|
+
4. Validation: Field metadata drives validation and required field checking
|
275
|
+
5. Default Application: Fields with None values receive their defaults
|
276
|
+
6. Runtime Usage: Descriptor protocol provides controlled field access
|
277
|
+
|
278
|
+
Why a Metaclass:
|
279
|
+
|
280
|
+
The alternatives to a metaclass would be:
|
281
|
+
- Manual field registration in each class (error-prone, inconsistent)
|
282
|
+
- Inheritance-based approach (doesn't solve the field discovery problem)
|
283
|
+
- Decorator-based approach (requires manual application, less automatic)
|
284
|
+
- Runtime introspection (performance overhead, less reliable)
|
285
|
+
|
286
|
+
The metaclass provides automatic, consistent behavior while maintaining the declarative
|
287
|
+
syntax that makes configuration classes readable and maintainable.
|
288
|
+
|
289
|
+
Usage Pattern:
|
290
|
+
```python
|
291
|
+
class MyConfig(metaclass=ConfigMeta):
|
292
|
+
name = ConfigField(field_type=str, required=True)
|
293
|
+
port = ConfigField(field_type=int, default=8080)
|
294
|
+
resources = ConfigField(field_type=ResourceConfig)
|
295
|
+
```
|
296
|
+
"""
|
297
|
+
@staticmethod
|
298
|
+
def is_instance(value) -> bool:
|
299
|
+
...
|
300
|
+
@staticmethod
|
301
|
+
def __new__(mcs, name, bases, namespace):
|
302
|
+
...
|
303
|
+
...
|
304
|
+
|
305
|
+
def apply_defaults(config):
|
306
|
+
"""
|
307
|
+
Apply default values to any fields that are still None.
|
308
|
+
|
309
|
+
Args:
|
310
|
+
config: instance of a ConfigMeta object
|
311
|
+
"""
|
312
|
+
...
|
313
|
+
|
314
|
+
class ConfigValidationFailedException(Exception, metaclass=type):
|
315
|
+
def __init__(self, field_name: str, field_info: ConfigField, current_value, message: typing.Optional[str] = None):
|
316
|
+
...
|
317
|
+
...
|
318
|
+
|
319
|
+
class RequiredFieldMissingException(ConfigValidationFailedException, metaclass=type):
|
320
|
+
...
|
321
|
+
|
322
|
+
class MergingNotAllowedFieldsException(ConfigValidationFailedException, metaclass=type):
|
323
|
+
def __init__(self, field_name: str, field_info: ConfigField, current_value: typing.Any, override_value: typing.Any):
|
324
|
+
...
|
325
|
+
...
|
326
|
+
|
327
|
+
def validate_required_fields(config_instance):
|
328
|
+
...
|
329
|
+
|
330
|
+
def validate_config_meta(config_instance):
|
331
|
+
...
|
332
|
+
|
333
|
+
def config_meta_to_dict(config_instance) -> typing.Optional[typing.Dict[str, typing.Any]]:
|
334
|
+
"""
|
335
|
+
Convert a configuration instance to a nested dictionary.
|
336
|
+
|
337
|
+
Recursively converts ConfigMeta-based configuration instances to dictionaries,
|
338
|
+
handling nested config objects and preserving the structure.
|
339
|
+
|
340
|
+
Args:
|
341
|
+
config_instance: Instance of a ConfigMeta-based configuration class
|
342
|
+
|
343
|
+
Returns:
|
344
|
+
Nested dictionary representation of the configuration
|
345
|
+
|
346
|
+
Examples:
|
347
|
+
# Convert a config instance to dict
|
348
|
+
|
349
|
+
config_dict = to_dict(config)
|
350
|
+
|
351
|
+
# Result will be:
|
352
|
+
# {
|
353
|
+
# "name": "myapp",
|
354
|
+
# "port": 8000,
|
355
|
+
# "resources": {
|
356
|
+
# "cpu": "500m",
|
357
|
+
# "memory": "1Gi",
|
358
|
+
# "gpu": None,
|
359
|
+
# "disk": "20Gi"
|
360
|
+
# },
|
361
|
+
# "auth": None,
|
362
|
+
# ...
|
363
|
+
# }
|
364
|
+
"""
|
365
|
+
...
|
366
|
+
|
367
|
+
def merge_field_values(base_value: typing.Any, override_value: typing.Any, field_info, behavior: str) -> typing.Any:
|
368
|
+
"""
|
369
|
+
Merge individual field values based on behavior.
|
370
|
+
|
371
|
+
Args:
|
372
|
+
base_value: Value from base config
|
373
|
+
override_value: Value from override config
|
374
|
+
field_info: Field metadata
|
375
|
+
behavior: FieldBehavior for this field
|
376
|
+
|
377
|
+
Returns:
|
378
|
+
Merged value
|
379
|
+
"""
|
380
|
+
...
|
381
|
+
|
382
|
+
class JsonFriendlyKeyValuePair(metaflow._vendor.click.types.ParamType, metaclass=type):
|
383
|
+
def convert(self, value, param, ctx):
|
384
|
+
...
|
385
|
+
def __str__(self):
|
386
|
+
...
|
387
|
+
def __repr__(self):
|
388
|
+
...
|
389
|
+
...
|
390
|
+
|
391
|
+
class CommaSeparatedList(metaflow._vendor.click.types.ParamType, metaclass=type):
|
392
|
+
def convert(self, value, param, ctx):
|
393
|
+
...
|
394
|
+
def __str__(self):
|
395
|
+
...
|
396
|
+
def __repr__(self):
|
397
|
+
...
|
398
|
+
...
|
399
|
+
|
400
|
+
class PureStringKVPair(metaflow._vendor.click.types.ParamType, metaclass=type):
|
401
|
+
"""
|
402
|
+
Click type for key-value pairs (KEY=VALUE).
|
403
|
+
"""
|
404
|
+
def convert(self, value, param, ctx):
|
405
|
+
...
|
406
|
+
...
|
407
|
+
|
408
|
+
PureStringKVPairType: PureStringKVPair
|
409
|
+
|
410
|
+
CommaSeparatedListType: CommaSeparatedList
|
411
|
+
|
412
|
+
JsonFriendlyKeyValuePairType: JsonFriendlyKeyValuePair
|
413
|
+
|
414
|
+
def populate_config_recursive(config_instance, config_class, source_data, get_source_key_fn, get_source_value_fn):
|
415
|
+
"""
|
416
|
+
Recursively populate a config instance from source data.
|
417
|
+
|
418
|
+
Args:
|
419
|
+
config_instance: Config object to populate
|
420
|
+
config_class: Class of the config object
|
421
|
+
source_data: Source data (dict, CLI options, etc.)
|
422
|
+
get_source_key_fn: Function to get the source key for a field
|
423
|
+
get_source_value_fn: Function to get the value from source for a key
|
424
|
+
"""
|
425
|
+
...
|
426
|
+
|
@@ -0,0 +1,64 @@
|
|
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-10T08:45:58.273820 #
|
5
|
+
######################################################################################################
|
6
|
+
|
7
|
+
from __future__ import annotations
|
8
|
+
|
9
|
+
import typing
|
10
|
+
if typing.TYPE_CHECKING:
|
11
|
+
import typing
|
12
|
+
|
13
|
+
|
14
|
+
HAS_YAML: bool
|
15
|
+
|
16
|
+
def to_openapi_schema(config_class) -> typing.Dict[str, typing.Any]:
|
17
|
+
"""
|
18
|
+
Generate OpenAPI schema for a configuration class.
|
19
|
+
|
20
|
+
Args:
|
21
|
+
config_class: The configuration class to generate schema for
|
22
|
+
|
23
|
+
Returns:
|
24
|
+
OpenAPI schema dictionary
|
25
|
+
"""
|
26
|
+
...
|
27
|
+
|
28
|
+
def to_json_schema(config_class) -> typing.Dict[str, typing.Any]:
|
29
|
+
"""
|
30
|
+
Generate JSON schema for a configuration class.
|
31
|
+
|
32
|
+
Args:
|
33
|
+
config_class: The configuration class to generate schema for
|
34
|
+
|
35
|
+
Returns:
|
36
|
+
JSON schema dictionary
|
37
|
+
"""
|
38
|
+
...
|
39
|
+
|
40
|
+
def export_schema(config_class, filepath: str, schema_type: str = 'openapi', format: str = 'yaml'):
|
41
|
+
"""
|
42
|
+
Export configuration schema to file.
|
43
|
+
|
44
|
+
Args:
|
45
|
+
config_class: The configuration class to export schema for
|
46
|
+
filepath: Path to save the schema file
|
47
|
+
schema_type: Type of schema to generate ('openapi' or 'json')
|
48
|
+
format: Output format ('yaml' or 'json')
|
49
|
+
|
50
|
+
Examples:
|
51
|
+
# Export OpenAPI schema as YAML (default)
|
52
|
+
export_schema(CoreConfig, "schema.yaml")
|
53
|
+
|
54
|
+
# Export JSON schema as YAML
|
55
|
+
export_schema(CoreConfig, "schema.yaml", schema_type="json")
|
56
|
+
|
57
|
+
# Export OpenAPI schema as JSON
|
58
|
+
export_schema(CoreConfig, "schema.json", schema_type="openapi", format="json")
|
59
|
+
|
60
|
+
# Export JSON schema as JSON
|
61
|
+
export_schema(CoreConfig, "schema.json", schema_type="json", format="json")
|
62
|
+
"""
|
63
|
+
...
|
64
|
+
|