zenml-nightly 0.58.2.dev20240617__py3-none-any.whl → 0.58.2.dev20240619__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.
- zenml/VERSION +1 -1
- zenml/_hub/client.py +8 -5
- zenml/actions/base_action.py +8 -10
- zenml/artifact_stores/base_artifact_store.py +20 -15
- zenml/artifact_stores/local_artifact_store.py +3 -2
- zenml/artifacts/artifact_config.py +34 -19
- zenml/artifacts/external_artifact.py +18 -8
- zenml/artifacts/external_artifact_config.py +14 -6
- zenml/artifacts/unmaterialized_artifact.py +2 -11
- zenml/cli/__init__.py +6 -0
- zenml/cli/artifact.py +20 -2
- zenml/cli/served_model.py +0 -1
- zenml/cli/server.py +3 -3
- zenml/cli/utils.py +36 -40
- zenml/cli/web_login.py +2 -2
- zenml/client.py +198 -24
- zenml/client_lazy_loader.py +20 -14
- zenml/config/base_settings.py +5 -6
- zenml/config/build_configuration.py +1 -1
- zenml/config/compiler.py +3 -3
- zenml/config/docker_settings.py +27 -28
- zenml/config/global_config.py +33 -37
- zenml/config/pipeline_configurations.py +8 -11
- zenml/config/pipeline_run_configuration.py +6 -2
- zenml/config/pipeline_spec.py +3 -4
- zenml/config/resource_settings.py +8 -9
- zenml/config/schedule.py +16 -20
- zenml/config/secret_reference_mixin.py +6 -3
- zenml/config/secrets_store_config.py +16 -23
- zenml/config/server_config.py +50 -46
- zenml/config/settings_resolver.py +1 -1
- zenml/config/source.py +45 -35
- zenml/config/step_configurations.py +53 -31
- zenml/config/step_run_info.py +3 -0
- zenml/config/store_config.py +20 -19
- zenml/config/strict_base_model.py +2 -6
- zenml/constants.py +26 -2
- zenml/container_registries/base_container_registry.py +3 -2
- zenml/container_registries/default_container_registry.py +3 -3
- zenml/event_hub/base_event_hub.py +1 -1
- zenml/event_sources/base_event_source.py +11 -16
- zenml/exceptions.py +4 -0
- zenml/integrations/airflow/__init__.py +2 -6
- zenml/integrations/airflow/flavors/airflow_orchestrator_flavor.py +6 -7
- zenml/integrations/airflow/orchestrators/airflow_orchestrator.py +13 -249
- zenml/integrations/airflow/orchestrators/dag_generator.py +5 -3
- zenml/integrations/argilla/flavors/argilla_annotator_flavor.py +5 -4
- zenml/integrations/aws/__init__.py +1 -1
- zenml/integrations/aws/flavors/aws_container_registry_flavor.py +3 -2
- zenml/integrations/aws/flavors/sagemaker_orchestrator_flavor.py +11 -5
- zenml/integrations/aws/flavors/sagemaker_step_operator_flavor.py +6 -2
- zenml/integrations/aws/service_connectors/aws_service_connector.py +5 -4
- zenml/integrations/aws/step_operators/sagemaker_step_operator.py +1 -1
- zenml/integrations/azure/flavors/azureml_step_operator_flavor.py +4 -4
- zenml/integrations/azure/service_connectors/azure_service_connector.py +4 -3
- zenml/integrations/azure/step_operators/azureml_step_operator.py +2 -1
- zenml/integrations/bentoml/steps/bentoml_deployer.py +1 -1
- zenml/integrations/bitbucket/plugins/event_sources/bitbucket_webhook_event_source.py +8 -12
- zenml/integrations/comet/flavors/comet_experiment_tracker_flavor.py +1 -1
- zenml/integrations/constants.py +0 -1
- zenml/integrations/deepchecks/__init__.py +1 -0
- zenml/integrations/evidently/__init__.py +5 -3
- zenml/integrations/evidently/column_mapping.py +11 -3
- zenml/integrations/evidently/data_validators/evidently_data_validator.py +21 -3
- zenml/integrations/evidently/metrics.py +5 -6
- zenml/integrations/evidently/tests.py +5 -6
- zenml/integrations/facets/models.py +2 -6
- zenml/integrations/feast/__init__.py +3 -1
- zenml/integrations/feast/feature_stores/feast_feature_store.py +0 -23
- zenml/integrations/gcp/__init__.py +1 -1
- zenml/integrations/gcp/flavors/vertex_orchestrator_flavor.py +1 -1
- zenml/integrations/gcp/flavors/vertex_step_operator_flavor.py +1 -1
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +234 -103
- zenml/integrations/gcp/service_connectors/gcp_service_connector.py +57 -42
- zenml/integrations/gcp/step_operators/vertex_step_operator.py +1 -0
- zenml/integrations/github/code_repositories/github_code_repository.py +1 -1
- zenml/integrations/github/plugins/event_sources/github_webhook_event_source.py +9 -13
- zenml/integrations/great_expectations/__init__.py +1 -1
- zenml/integrations/great_expectations/data_validators/ge_data_validator.py +44 -44
- zenml/integrations/great_expectations/flavors/great_expectations_data_validator_flavor.py +35 -2
- zenml/integrations/great_expectations/ge_store_backend.py +24 -11
- zenml/integrations/great_expectations/materializers/ge_materializer.py +3 -3
- zenml/integrations/great_expectations/utils.py +5 -5
- zenml/integrations/huggingface/__init__.py +3 -0
- zenml/integrations/huggingface/flavors/huggingface_model_deployer_flavor.py +1 -1
- zenml/integrations/huggingface/steps/__init__.py +3 -0
- zenml/integrations/huggingface/steps/accelerate_runner.py +149 -0
- zenml/integrations/huggingface/steps/huggingface_deployer.py +2 -2
- zenml/integrations/hyperai/flavors/hyperai_orchestrator_flavor.py +1 -1
- zenml/integrations/hyperai/service_connectors/hyperai_service_connector.py +4 -3
- zenml/integrations/kubeflow/__init__.py +1 -1
- zenml/integrations/kubeflow/flavors/kubeflow_orchestrator_flavor.py +48 -81
- zenml/integrations/kubeflow/orchestrators/kubeflow_orchestrator.py +295 -245
- zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +1 -1
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +11 -2
- zenml/integrations/kubernetes/pod_settings.py +17 -31
- zenml/integrations/kubernetes/service_connectors/kubernetes_service_connector.py +8 -7
- zenml/integrations/label_studio/__init__.py +1 -3
- zenml/integrations/label_studio/annotators/label_studio_annotator.py +3 -4
- zenml/integrations/label_studio/flavors/label_studio_annotator_flavor.py +2 -2
- zenml/integrations/langchain/__init__.py +5 -1
- zenml/integrations/langchain/materializers/document_materializer.py +44 -8
- zenml/integrations/mlflow/__init__.py +9 -3
- zenml/integrations/mlflow/experiment_trackers/mlflow_experiment_tracker.py +1 -1
- zenml/integrations/mlflow/flavors/mlflow_experiment_tracker_flavor.py +29 -37
- zenml/integrations/mlflow/model_registries/mlflow_model_registry.py +4 -4
- zenml/integrations/mlflow/steps/mlflow_deployer.py +1 -1
- zenml/integrations/neptune/flavors/neptune_experiment_tracker_flavor.py +1 -1
- zenml/integrations/neural_prophet/__init__.py +5 -1
- zenml/integrations/pigeon/flavors/pigeon_annotator_flavor.py +1 -1
- zenml/integrations/s3/flavors/s3_artifact_store_flavor.py +9 -8
- zenml/integrations/seldon/seldon_client.py +52 -67
- zenml/integrations/seldon/services/seldon_deployment.py +3 -3
- zenml/integrations/seldon/steps/seldon_deployer.py +4 -4
- zenml/integrations/skypilot/flavors/skypilot_orchestrator_base_vm_config.py +15 -5
- zenml/integrations/skypilot_aws/__init__.py +1 -1
- zenml/integrations/skypilot_aws/flavors/skypilot_orchestrator_aws_vm_flavor.py +1 -1
- zenml/integrations/skypilot_azure/__init__.py +1 -1
- zenml/integrations/skypilot_azure/flavors/skypilot_orchestrator_azure_vm_flavor.py +1 -1
- zenml/integrations/skypilot_gcp/__init__.py +2 -1
- zenml/integrations/skypilot_gcp/flavors/skypilot_orchestrator_gcp_vm_flavor.py +1 -1
- zenml/integrations/skypilot_lambda/flavors/skypilot_orchestrator_lambda_vm_flavor.py +2 -2
- zenml/integrations/spark/flavors/spark_step_operator_flavor.py +1 -1
- zenml/integrations/spark/step_operators/spark_step_operator.py +2 -0
- zenml/integrations/tekton/__init__.py +1 -1
- zenml/integrations/tekton/flavors/tekton_orchestrator_flavor.py +66 -23
- zenml/integrations/tekton/orchestrators/tekton_orchestrator.py +547 -233
- zenml/integrations/tensorboard/__init__.py +1 -12
- zenml/integrations/tensorboard/services/tensorboard_service.py +3 -5
- zenml/integrations/tensorboard/visualizers/tensorboard_visualizer.py +6 -6
- zenml/integrations/tensorflow/__init__.py +2 -10
- zenml/integrations/tensorflow/materializers/keras_materializer.py +17 -9
- zenml/integrations/wandb/flavors/wandb_experiment_tracker_flavor.py +9 -14
- zenml/integrations/whylogs/flavors/whylogs_data_validator_flavor.py +1 -1
- zenml/lineage_graph/lineage_graph.py +1 -1
- zenml/logging/step_logging.py +15 -7
- zenml/materializers/built_in_materializer.py +3 -3
- zenml/materializers/pydantic_materializer.py +2 -2
- zenml/metadata/lazy_load.py +4 -4
- zenml/metadata/metadata_types.py +64 -4
- zenml/model/model.py +79 -54
- zenml/model_deployers/base_model_deployer.py +14 -12
- zenml/model_registries/base_model_registry.py +17 -15
- zenml/models/__init__.py +79 -206
- zenml/models/v2/base/base.py +54 -41
- zenml/models/v2/base/base_plugin_flavor.py +2 -6
- zenml/models/v2/base/filter.py +91 -76
- zenml/models/v2/base/page.py +2 -12
- zenml/models/v2/base/scoped.py +4 -7
- zenml/models/v2/core/api_key.py +22 -8
- zenml/models/v2/core/artifact.py +2 -2
- zenml/models/v2/core/artifact_version.py +74 -40
- zenml/models/v2/core/code_repository.py +37 -10
- zenml/models/v2/core/component.py +65 -16
- zenml/models/v2/core/device.py +14 -4
- zenml/models/v2/core/event_source.py +1 -2
- zenml/models/v2/core/flavor.py +74 -8
- zenml/models/v2/core/logs.py +68 -8
- zenml/models/v2/core/model.py +8 -4
- zenml/models/v2/core/model_version.py +25 -6
- zenml/models/v2/core/model_version_artifact.py +51 -21
- zenml/models/v2/core/model_version_pipeline_run.py +45 -13
- zenml/models/v2/core/pipeline.py +37 -72
- zenml/models/v2/core/pipeline_build.py +29 -17
- zenml/models/v2/core/pipeline_deployment.py +18 -6
- zenml/models/v2/core/pipeline_namespace.py +113 -0
- zenml/models/v2/core/pipeline_run.py +50 -22
- zenml/models/v2/core/run_metadata.py +59 -36
- zenml/models/v2/core/schedule.py +37 -24
- zenml/models/v2/core/secret.py +31 -12
- zenml/models/v2/core/service.py +64 -36
- zenml/models/v2/core/service_account.py +24 -11
- zenml/models/v2/core/service_connector.py +219 -44
- zenml/models/v2/core/stack.py +45 -17
- zenml/models/v2/core/step_run.py +28 -8
- zenml/models/v2/core/tag.py +8 -4
- zenml/models/v2/core/trigger.py +2 -2
- zenml/models/v2/core/trigger_execution.py +1 -0
- zenml/models/v2/core/user.py +18 -21
- zenml/models/v2/core/workspace.py +13 -3
- zenml/models/v2/misc/build_item.py +3 -3
- zenml/models/v2/misc/external_user.py +2 -6
- zenml/models/v2/misc/hub_plugin_models.py +9 -9
- zenml/models/v2/misc/loaded_visualization.py +2 -2
- zenml/models/v2/misc/service_connector_type.py +8 -17
- zenml/models/v2/misc/user_auth.py +7 -2
- zenml/new/pipelines/build_utils.py +3 -3
- zenml/new/pipelines/pipeline.py +17 -13
- zenml/new/pipelines/run_utils.py +103 -1
- zenml/orchestrators/base_orchestrator.py +10 -7
- zenml/orchestrators/local_docker/local_docker_orchestrator.py +1 -1
- zenml/orchestrators/step_launcher.py +28 -4
- zenml/orchestrators/step_runner.py +3 -6
- zenml/orchestrators/utils.py +1 -1
- zenml/plugins/base_plugin_flavor.py +6 -10
- zenml/plugins/plugin_flavor_registry.py +3 -7
- zenml/secret/base_secret.py +7 -8
- zenml/service_connectors/docker_service_connector.py +4 -3
- zenml/service_connectors/service_connector.py +5 -12
- zenml/service_connectors/service_connector_registry.py +2 -4
- zenml/services/container/container_service.py +1 -1
- zenml/services/container/container_service_endpoint.py +1 -1
- zenml/services/local/local_service.py +1 -1
- zenml/services/local/local_service_endpoint.py +1 -1
- zenml/services/service.py +16 -10
- zenml/services/service_type.py +4 -5
- zenml/services/terraform/terraform_service.py +1 -1
- zenml/stack/flavor.py +1 -5
- zenml/stack/flavor_registry.py +4 -4
- zenml/stack/stack.py +4 -1
- zenml/stack/stack_component.py +55 -31
- zenml/step_operators/step_operator_entrypoint_configuration.py +1 -0
- zenml/steps/base_step.py +34 -28
- zenml/steps/entrypoint_function_utils.py +3 -5
- zenml/steps/utils.py +12 -14
- zenml/utils/cuda_utils.py +50 -0
- zenml/utils/deprecation_utils.py +18 -20
- zenml/utils/dict_utils.py +1 -1
- zenml/utils/filesync_model.py +65 -28
- zenml/utils/function_utils.py +260 -0
- zenml/utils/json_utils.py +131 -0
- zenml/utils/mlstacks_utils.py +2 -2
- zenml/utils/pipeline_docker_image_builder.py +9 -0
- zenml/utils/pydantic_utils.py +270 -62
- zenml/utils/secret_utils.py +65 -12
- zenml/utils/source_utils.py +2 -2
- zenml/utils/typed_model.py +5 -3
- zenml/utils/typing_utils.py +243 -0
- zenml/utils/yaml_utils.py +1 -1
- zenml/zen_server/auth.py +2 -2
- zenml/zen_server/cloud_utils.py +6 -6
- zenml/zen_server/deploy/base_provider.py +1 -1
- zenml/zen_server/deploy/deployment.py +6 -8
- zenml/zen_server/deploy/docker/docker_zen_server.py +3 -4
- zenml/zen_server/deploy/local/local_provider.py +0 -1
- zenml/zen_server/deploy/local/local_zen_server.py +6 -6
- zenml/zen_server/deploy/terraform/terraform_zen_server.py +4 -6
- zenml/zen_server/exceptions.py +4 -1
- zenml/zen_server/feature_gate/zenml_cloud_feature_gate.py +1 -1
- zenml/zen_server/pipeline_deployment/utils.py +48 -68
- zenml/zen_server/rbac/models.py +2 -5
- zenml/zen_server/rbac/utils.py +11 -14
- zenml/zen_server/routers/auth_endpoints.py +2 -2
- zenml/zen_server/routers/pipeline_builds_endpoints.py +1 -1
- zenml/zen_server/routers/runs_endpoints.py +1 -1
- zenml/zen_server/routers/secrets_endpoints.py +3 -2
- zenml/zen_server/routers/server_endpoints.py +1 -1
- zenml/zen_server/routers/steps_endpoints.py +1 -1
- zenml/zen_server/routers/workspaces_endpoints.py +1 -1
- zenml/zen_stores/base_zen_store.py +46 -9
- zenml/zen_stores/migrations/utils.py +42 -46
- zenml/zen_stores/migrations/versions/0701da9951a0_added_service_table.py +1 -1
- zenml/zen_stores/migrations/versions/1041bc644e0d_remove_secrets_manager.py +5 -3
- zenml/zen_stores/migrations/versions/10a907dad202_delete_mlmd_tables.py +1 -1
- zenml/zen_stores/migrations/versions/26b776ad583e_redesign_artifacts.py +8 -10
- zenml/zen_stores/migrations/versions/37835ce041d2_optimizing_database.py +3 -3
- zenml/zen_stores/migrations/versions/46506f72f0ed_add_server_settings.py +10 -12
- zenml/zen_stores/migrations/versions/5994f9ad0489_introduce_role_permissions.py +3 -2
- zenml/zen_stores/migrations/versions/6917bce75069_add_pipeline_run_unique_constraint.py +4 -4
- zenml/zen_stores/migrations/versions/728c6369cfaa_add_name_column_to_input_artifact_pk.py +3 -2
- zenml/zen_stores/migrations/versions/743ec82b1b3c_update_size_of_build_images.py +2 -2
- zenml/zen_stores/migrations/versions/7500f434b71c_remove_shared_columns.py +3 -2
- zenml/zen_stores/migrations/versions/7834208cc3f6_artifact_project_scoping.py +8 -7
- zenml/zen_stores/migrations/versions/7b651bf6822e_track_secrets_in_db.py +6 -4
- zenml/zen_stores/migrations/versions/7e4a481d17f7_add_identity_table.py +2 -2
- zenml/zen_stores/migrations/versions/7f603e583dd7_fixed_migration.py +1 -1
- zenml/zen_stores/migrations/versions/a39c4184c8ce_remove_secrets_manager_flavors.py +2 -2
- zenml/zen_stores/migrations/versions/a91762e6be36_artifact_version_table.py +4 -4
- zenml/zen_stores/migrations/versions/alembic_start.py +1 -1
- zenml/zen_stores/migrations/versions/fbd7f18ced1e_increase_step_run_field_lengths.py +4 -4
- zenml/zen_stores/rest_zen_store.py +109 -49
- zenml/zen_stores/schemas/api_key_schemas.py +1 -1
- zenml/zen_stores/schemas/artifact_schemas.py +8 -8
- zenml/zen_stores/schemas/artifact_visualization_schemas.py +3 -3
- zenml/zen_stores/schemas/code_repository_schemas.py +1 -1
- zenml/zen_stores/schemas/component_schemas.py +8 -3
- zenml/zen_stores/schemas/device_schemas.py +8 -6
- zenml/zen_stores/schemas/event_source_schemas.py +3 -4
- zenml/zen_stores/schemas/flavor_schemas.py +5 -3
- zenml/zen_stores/schemas/model_schemas.py +26 -1
- zenml/zen_stores/schemas/pipeline_build_schemas.py +1 -1
- zenml/zen_stores/schemas/pipeline_deployment_schemas.py +4 -4
- zenml/zen_stores/schemas/pipeline_run_schemas.py +6 -6
- zenml/zen_stores/schemas/pipeline_schemas.py +5 -2
- zenml/zen_stores/schemas/run_metadata_schemas.py +2 -2
- zenml/zen_stores/schemas/secret_schemas.py +8 -5
- zenml/zen_stores/schemas/server_settings_schemas.py +3 -1
- zenml/zen_stores/schemas/service_connector_schemas.py +1 -1
- zenml/zen_stores/schemas/service_schemas.py +11 -2
- zenml/zen_stores/schemas/stack_schemas.py +1 -1
- zenml/zen_stores/schemas/step_run_schemas.py +11 -11
- zenml/zen_stores/schemas/tag_schemas.py +6 -2
- zenml/zen_stores/schemas/trigger_schemas.py +2 -2
- zenml/zen_stores/schemas/user_schemas.py +2 -2
- zenml/zen_stores/schemas/workspace_schemas.py +3 -1
- zenml/zen_stores/secrets_stores/aws_secrets_store.py +19 -20
- zenml/zen_stores/secrets_stores/azure_secrets_store.py +17 -20
- zenml/zen_stores/secrets_stores/base_secrets_store.py +79 -12
- zenml/zen_stores/secrets_stores/gcp_secrets_store.py +17 -20
- zenml/zen_stores/secrets_stores/hashicorp_secrets_store.py +4 -8
- zenml/zen_stores/secrets_stores/service_connector_secrets_store.py +10 -7
- zenml/zen_stores/secrets_stores/sql_secrets_store.py +5 -6
- zenml/zen_stores/sql_zen_store.py +196 -120
- zenml/zen_stores/zen_store_interface.py +33 -0
- {zenml_nightly-0.58.2.dev20240617.dist-info → zenml_nightly-0.58.2.dev20240619.dist-info}/METADATA +9 -7
- {zenml_nightly-0.58.2.dev20240617.dist-info → zenml_nightly-0.58.2.dev20240619.dist-info}/RECORD +309 -306
- zenml/integrations/kubeflow/utils.py +0 -95
- zenml/models/v2/base/internal.py +0 -37
- zenml/models/v2/base/update.py +0 -44
- {zenml_nightly-0.58.2.dev20240617.dist-info → zenml_nightly-0.58.2.dev20240619.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.58.2.dev20240617.dist-info → zenml_nightly-0.58.2.dev20240619.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.58.2.dev20240617.dist-info → zenml_nightly-0.58.2.dev20240619.dist-info}/entry_points.txt +0 -0
@@ -15,6 +15,8 @@
|
|
15
15
|
|
16
16
|
from typing import TYPE_CHECKING, Any, Dict, Optional, Type, Union
|
17
17
|
|
18
|
+
from pydantic import Field
|
19
|
+
|
18
20
|
from zenml.config.base_settings import BaseSettings
|
19
21
|
from zenml.integrations.aws import (
|
20
22
|
AWS_RESOURCE_TYPE,
|
@@ -58,7 +60,9 @@ class SagemakerStepOperatorSettings(BaseSettings):
|
|
58
60
|
|
59
61
|
instance_type: Optional[str] = None
|
60
62
|
experiment_name: Optional[str] = None
|
61
|
-
input_data_s3_uri: Optional[Union[str, Dict[str, str]]] =
|
63
|
+
input_data_s3_uri: Optional[Union[str, Dict[str, str]]] = Field(
|
64
|
+
default=None, union_mode="left_to_right"
|
65
|
+
)
|
62
66
|
estimator_args: Dict[str, Any] = {}
|
63
67
|
|
64
68
|
_deprecation_validator = deprecation_utils.deprecate_pydantic_attributes(
|
@@ -66,7 +70,7 @@ class SagemakerStepOperatorSettings(BaseSettings):
|
|
66
70
|
)
|
67
71
|
|
68
72
|
|
69
|
-
class SagemakerStepOperatorConfig(
|
73
|
+
class SagemakerStepOperatorConfig(
|
70
74
|
BaseStepOperatorConfig, SagemakerStepOperatorSettings
|
71
75
|
):
|
72
76
|
"""Config for the Sagemaker step operator.
|
@@ -37,7 +37,7 @@ from aws_profile_manager import Common # type: ignore[import-untyped]
|
|
37
37
|
from botocore.client import BaseClient
|
38
38
|
from botocore.exceptions import BotoCoreError, ClientError
|
39
39
|
from botocore.signers import RequestSigner
|
40
|
-
from pydantic import Field
|
40
|
+
from pydantic import Field
|
41
41
|
|
42
42
|
from zenml.constants import (
|
43
43
|
DOCKER_REGISTRY_RESOURCE_TYPE,
|
@@ -65,6 +65,7 @@ from zenml.service_connectors.service_connector import (
|
|
65
65
|
ServiceConnector,
|
66
66
|
)
|
67
67
|
from zenml.utils.enum_utils import StrEnum
|
68
|
+
from zenml.utils.secret_utils import PlainSerializedSecretStr
|
68
69
|
|
69
70
|
logger = get_logger(__name__)
|
70
71
|
|
@@ -77,11 +78,11 @@ BOTO3_SESSION_EXPIRATION_BUFFER = 15 # 15 minutes
|
|
77
78
|
class AWSSecretKey(AuthenticationConfig):
|
78
79
|
"""AWS secret key credentials."""
|
79
80
|
|
80
|
-
aws_access_key_id:
|
81
|
+
aws_access_key_id: PlainSerializedSecretStr = Field(
|
81
82
|
title="AWS Access Key ID",
|
82
83
|
description="An AWS access key ID associated with an AWS account or IAM user.",
|
83
84
|
)
|
84
|
-
aws_secret_access_key:
|
85
|
+
aws_secret_access_key: PlainSerializedSecretStr = Field(
|
85
86
|
title="AWS Secret Access Key",
|
86
87
|
)
|
87
88
|
|
@@ -89,7 +90,7 @@ class AWSSecretKey(AuthenticationConfig):
|
|
89
90
|
class STSToken(AWSSecretKey):
|
90
91
|
"""AWS STS token."""
|
91
92
|
|
92
|
-
aws_session_token:
|
93
|
+
aws_session_token: PlainSerializedSecretStr = Field(
|
93
94
|
title="AWS Session Token",
|
94
95
|
)
|
95
96
|
|
@@ -38,7 +38,7 @@ class AzureMLStepOperatorSettings(BaseSettings):
|
|
38
38
|
environment_name: Optional[str] = None
|
39
39
|
|
40
40
|
|
41
|
-
class AzureMLStepOperatorConfig(
|
41
|
+
class AzureMLStepOperatorConfig(
|
42
42
|
BaseStepOperatorConfig, AzureMLStepOperatorSettings
|
43
43
|
):
|
44
44
|
"""Config for the AzureML step operator.
|
@@ -64,9 +64,9 @@ class AzureMLStepOperatorConfig( # type: ignore[misc] # https://github.com/pyda
|
|
64
64
|
|
65
65
|
# Service principal authentication
|
66
66
|
# https://docs.microsoft.com/en-us/azure/machine-learning/how-to-setup-authentication#configure-a-service-principal
|
67
|
-
tenant_id: Optional[str] = SecretField()
|
68
|
-
service_principal_id: Optional[str] = SecretField()
|
69
|
-
service_principal_password: Optional[str] = SecretField()
|
67
|
+
tenant_id: Optional[str] = SecretField(default=None)
|
68
|
+
service_principal_id: Optional[str] = SecretField(default=None)
|
69
|
+
service_principal_password: Optional[str] = SecretField(default=None)
|
70
70
|
|
71
71
|
@property
|
72
72
|
def is_remote(self) -> bool:
|
@@ -28,7 +28,7 @@ from azure.mgmt.containerservice import ContainerServiceClient
|
|
28
28
|
from azure.mgmt.resource import SubscriptionClient
|
29
29
|
from azure.mgmt.storage import StorageManagementClient
|
30
30
|
from azure.storage.blob import BlobServiceClient
|
31
|
-
from pydantic import Field
|
31
|
+
from pydantic import Field
|
32
32
|
|
33
33
|
from zenml.constants import (
|
34
34
|
DOCKER_REGISTRY_RESOURCE_TYPE,
|
@@ -56,6 +56,7 @@ from zenml.service_connectors.service_connector import (
|
|
56
56
|
ServiceConnector,
|
57
57
|
)
|
58
58
|
from zenml.utils.enum_utils import StrEnum
|
59
|
+
from zenml.utils.secret_utils import PlainSerializedSecretStr
|
59
60
|
|
60
61
|
logger = get_logger(__name__)
|
61
62
|
|
@@ -103,7 +104,7 @@ class AzureBaseConfig(AuthenticationConfig):
|
|
103
104
|
class AzureClientSecret(AuthenticationConfig):
|
104
105
|
"""Azure client secret credentials."""
|
105
106
|
|
106
|
-
client_secret:
|
107
|
+
client_secret: PlainSerializedSecretStr = Field(
|
107
108
|
title="Service principal client secret",
|
108
109
|
description="The client secret of the service principal",
|
109
110
|
)
|
@@ -126,7 +127,7 @@ class AzureClientConfig(AzureBaseConfig):
|
|
126
127
|
class AzureAccessToken(AuthenticationConfig):
|
127
128
|
"""Azure access token credentials."""
|
128
129
|
|
129
|
-
token:
|
130
|
+
token: PlainSerializedSecretStr = Field(
|
130
131
|
title="Azure Access Token",
|
131
132
|
description="The Azure access token to use for authentication",
|
132
133
|
)
|
@@ -252,7 +252,7 @@ class AzureMLStepOperator(BaseStepOperator):
|
|
252
252
|
"source_files",
|
253
253
|
]
|
254
254
|
docker_settings = info.config.docker_settings
|
255
|
-
ignored_docker_fields = docker_settings.
|
255
|
+
ignored_docker_fields = docker_settings.model_fields_set.intersection(
|
256
256
|
unused_docker_fields
|
257
257
|
)
|
258
258
|
|
@@ -297,4 +297,5 @@ class AzureMLStepOperator(BaseStepOperator):
|
|
297
297
|
run = experiment.submit(config=run_config)
|
298
298
|
|
299
299
|
run.display_name = info.run_name
|
300
|
+
info.force_write_logs()
|
300
301
|
run.wait_for_completion(show_output=True)
|
@@ -129,7 +129,7 @@ def bentoml_model_deployer_step(
|
|
129
129
|
|
130
130
|
# fetch existing services with same pipeline name, step name and model name
|
131
131
|
existing_services = model_deployer.find_model_server(
|
132
|
-
config=predictor_cfg.
|
132
|
+
config=predictor_cfg.model_dump(),
|
133
133
|
service_type=BentoMLDeploymentService.SERVICE_TYPE,
|
134
134
|
)
|
135
135
|
|
@@ -16,7 +16,7 @@
|
|
16
16
|
from typing import Any, Dict, List, Optional, Type, Union
|
17
17
|
from uuid import UUID
|
18
18
|
|
19
|
-
from pydantic import BaseModel,
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field
|
20
20
|
|
21
21
|
from zenml.enums import SecretScope
|
22
22
|
from zenml.event_sources.base_event import (
|
@@ -59,9 +59,9 @@ class BitbucketEventType(StrEnum):
|
|
59
59
|
class User(BaseModel):
|
60
60
|
"""Bitbucket User."""
|
61
61
|
|
62
|
-
name: Optional[str]
|
63
|
-
email: Optional[str]
|
64
|
-
username: Optional[str]
|
62
|
+
name: Optional[str] = None
|
63
|
+
email: Optional[str] = None
|
64
|
+
username: Optional[str] = None
|
65
65
|
|
66
66
|
|
67
67
|
class Commit(BaseModel):
|
@@ -85,8 +85,8 @@ class Repository(BaseModel):
|
|
85
85
|
class PushChange(BaseModel):
|
86
86
|
"""Bitbucket Push Change."""
|
87
87
|
|
88
|
-
new: Optional[Dict[str, Any]]
|
89
|
-
old: Optional[Dict[str, Any]]
|
88
|
+
new: Optional[Dict[str, Any]] = None
|
89
|
+
old: Optional[Dict[str, Any]] = None
|
90
90
|
commits: List[Commit]
|
91
91
|
|
92
92
|
|
@@ -102,11 +102,7 @@ class BitbucketEvent(BaseEvent):
|
|
102
102
|
actor: User
|
103
103
|
repository: Repository
|
104
104
|
push: Push
|
105
|
-
|
106
|
-
class Config:
|
107
|
-
"""Pydantic configuration class."""
|
108
|
-
|
109
|
-
extra = Extra.allow
|
105
|
+
model_config = ConfigDict(extra="allow")
|
110
106
|
|
111
107
|
@property
|
112
108
|
def branch(self) -> Optional[str]:
|
@@ -418,7 +414,7 @@ class BitbucketWebhookEventSourceHandler(BaseWebhookEventSourceHandler):
|
|
418
414
|
if config.rotate_secret:
|
419
415
|
# In case the secret is being rotated
|
420
416
|
secret_key_value = random_str(12)
|
421
|
-
webhook_secret = SecretUpdate(
|
417
|
+
webhook_secret = SecretUpdate(
|
422
418
|
values={"webhook_secret": secret_key_value}
|
423
419
|
)
|
424
420
|
self.zen_store.update_secret(
|
@@ -50,7 +50,7 @@ class CometExperimentTrackerSettings(BaseSettings):
|
|
50
50
|
settings: Dict[str, Any] = {}
|
51
51
|
|
52
52
|
|
53
|
-
class CometExperimentTrackerConfig(
|
53
|
+
class CometExperimentTrackerConfig(
|
54
54
|
BaseExperimentTrackerConfig, CometExperimentTrackerSettings
|
55
55
|
):
|
56
56
|
"""Config for the Comet experiment tracker.
|
zenml/integrations/constants.py
CHANGED
@@ -41,6 +41,7 @@ class DeepchecksIntegration(Integration):
|
|
41
41
|
"pandas<2.0.0",
|
42
42
|
"opencv-python==4.5.5.64", # pin to same version
|
43
43
|
"opencv-python-headless==4.5.5.64", # pin to same version
|
44
|
+
"tenacity!=8.4.0", # https://github.com/jd/tenacity/issues/471
|
44
45
|
]
|
45
46
|
APT_PACKAGES = ["ffmpeg", "libsm6", "libxext6"]
|
46
47
|
|
@@ -31,10 +31,9 @@ from zenml.integrations.constants import EVIDENTLY
|
|
31
31
|
from zenml.integrations.integration import Integration
|
32
32
|
from zenml.stack import Flavor
|
33
33
|
|
34
|
-
|
35
34
|
# Fix numba errors in Docker and suppress logs and deprecation warning spam
|
36
35
|
try:
|
37
|
-
from numba.core.errors import ( # type: ignore[import-
|
36
|
+
from numba.core.errors import ( # type: ignore[import-not-found]
|
38
37
|
NumbaDeprecationWarning,
|
39
38
|
NumbaPendingDeprecationWarning,
|
40
39
|
)
|
@@ -54,7 +53,10 @@ class EvidentlyIntegration(Integration):
|
|
54
53
|
"""[Evidently](https://github.com/evidentlyai/evidently) integration for ZenML."""
|
55
54
|
|
56
55
|
NAME = EVIDENTLY
|
57
|
-
REQUIREMENTS = [
|
56
|
+
REQUIREMENTS = [
|
57
|
+
"evidently>=0.4.16,<=0.4.22",
|
58
|
+
"tenacity!=8.4.0", # https://github.com/jd/tenacity/issues/471
|
59
|
+
]
|
58
60
|
|
59
61
|
@classmethod
|
60
62
|
def flavors(cls) -> List[Type[Flavor]]:
|
@@ -16,7 +16,7 @@
|
|
16
16
|
from typing import List, Optional, Sequence, Union
|
17
17
|
|
18
18
|
from evidently import ColumnMapping # type: ignore[import-untyped]
|
19
|
-
from pydantic import BaseModel
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field
|
20
20
|
|
21
21
|
|
22
22
|
class EvidentlyColumnMapping(BaseModel):
|
@@ -41,7 +41,9 @@ class EvidentlyColumnMapping(BaseModel):
|
|
41
41
|
"""
|
42
42
|
|
43
43
|
target: Optional[str] = None
|
44
|
-
prediction: Optional[Union[str, Sequence[str]]] =
|
44
|
+
prediction: Optional[Union[str, Sequence[str]]] = Field(
|
45
|
+
default="prediction", union_mode="left_to_right"
|
46
|
+
)
|
45
47
|
datetime: Optional[str] = None
|
46
48
|
id: Optional[str] = None
|
47
49
|
numerical_features: Optional[List[str]] = None
|
@@ -49,9 +51,15 @@ class EvidentlyColumnMapping(BaseModel):
|
|
49
51
|
datetime_features: Optional[List[str]] = None
|
50
52
|
target_names: Optional[List[str]] = None
|
51
53
|
task: Optional[str] = None
|
52
|
-
pos_label: Optional[Union[str, int]] =
|
54
|
+
pos_label: Optional[Union[str, int]] = Field(
|
55
|
+
default=1, union_mode="left_to_right"
|
56
|
+
)
|
53
57
|
text_features: Optional[List[str]] = None
|
54
58
|
|
59
|
+
model_config = ConfigDict(
|
60
|
+
validate_assignment=True,
|
61
|
+
)
|
62
|
+
|
55
63
|
def to_evidently_column_mapping(self) -> ColumnMapping:
|
56
64
|
"""Convert this Pydantic object to an Evidently ColumnMapping object.
|
57
65
|
|
@@ -118,14 +118,16 @@ class EvidentlyDataValidator(BaseDataValidator):
|
|
118
118
|
return options
|
119
119
|
|
120
120
|
@staticmethod
|
121
|
-
def
|
122
|
-
"""
|
121
|
+
def _set_nltk_data_path() -> None:
|
122
|
+
"""Set the NLTK data path to the current working directory.
|
123
|
+
|
124
|
+
This is necessary because the default download directory is not writable
|
125
|
+
in some Docker containers.
|
123
126
|
|
124
127
|
Raises:
|
125
128
|
ImportError: if NLTK is not installed.
|
126
129
|
"""
|
127
130
|
try:
|
128
|
-
import nltk # type: ignore[import-untyped]
|
129
131
|
from nltk.data import ( # type: ignore[import-untyped]
|
130
132
|
path as nltk_path,
|
131
133
|
)
|
@@ -138,8 +140,23 @@ class EvidentlyDataValidator(BaseDataValidator):
|
|
138
140
|
# Configure NLTK to use the current working directory to download and
|
139
141
|
# lookup data. This is necessary because the default download directory
|
140
142
|
# is not writable in some Docker containers.
|
143
|
+
os.environ["NLTK_DATA"] = os.getcwd()
|
141
144
|
nltk_path.append(os.getcwd())
|
142
145
|
|
146
|
+
@staticmethod
|
147
|
+
def _download_nltk_data() -> None:
|
148
|
+
"""Download NLTK data for text metrics and tests.
|
149
|
+
|
150
|
+
Raises:
|
151
|
+
ImportError: if NLTK is not installed.
|
152
|
+
"""
|
153
|
+
try:
|
154
|
+
import nltk # type: ignore[import-untyped]
|
155
|
+
except ImportError:
|
156
|
+
raise ImportError(
|
157
|
+
"NLTK is not installed. Please install NLTK to use "
|
158
|
+
"Evidently text metrics and tests."
|
159
|
+
)
|
143
160
|
# Download NLTK data. We need this later on for the Evidently text report.
|
144
161
|
nltk.download("words", download_dir=os.getcwd())
|
145
162
|
nltk.download("wordnet", download_dir=os.getcwd())
|
@@ -196,6 +213,7 @@ class EvidentlyDataValidator(BaseDataValidator):
|
|
196
213
|
Returns:
|
197
214
|
The Evidently Report as JSON object and as HTML.
|
198
215
|
"""
|
216
|
+
self._set_nltk_data_path()
|
199
217
|
if download_nltk_data:
|
200
218
|
self._download_nltk_data()
|
201
219
|
|
@@ -33,7 +33,7 @@ from evidently.metrics.base_metric import ( # type: ignore[import-untyped]
|
|
33
33
|
from evidently.utils.generators import ( # type: ignore[import-untyped]
|
34
34
|
BaseGenerator,
|
35
35
|
)
|
36
|
-
from pydantic import BaseModel, Field
|
36
|
+
from pydantic import BaseModel, ConfigDict, Field
|
37
37
|
|
38
38
|
from zenml.logger import get_logger
|
39
39
|
from zenml.utils import source_utils
|
@@ -75,7 +75,9 @@ class EvidentlyMetricConfig(BaseModel):
|
|
75
75
|
class_path: str
|
76
76
|
parameters: Dict[str, Any] = Field(default_factory=dict)
|
77
77
|
is_generator: bool = False
|
78
|
-
columns: Optional[Union[str, List[str]]] =
|
78
|
+
columns: Optional[Union[str, List[str]]] = Field(
|
79
|
+
default=None, union_mode="left_to_right"
|
80
|
+
)
|
79
81
|
skip_id_column: bool = False
|
80
82
|
|
81
83
|
@staticmethod
|
@@ -359,7 +361,4 @@ class EvidentlyMetricConfig(BaseModel):
|
|
359
361
|
f"`{self.class_path}`: {str(e)}"
|
360
362
|
)
|
361
363
|
|
362
|
-
|
363
|
-
"""Pydantic config class."""
|
364
|
-
|
365
|
-
extra = "forbid"
|
364
|
+
model_config = ConfigDict(extra="forbid")
|
@@ -33,7 +33,7 @@ from evidently.tests.base_test import ( # type: ignore[import-untyped]
|
|
33
33
|
from evidently.utils.generators import ( # type: ignore[import-untyped]
|
34
34
|
BaseGenerator,
|
35
35
|
)
|
36
|
-
from pydantic import BaseModel, Field
|
36
|
+
from pydantic import BaseModel, ConfigDict, Field
|
37
37
|
|
38
38
|
from zenml.logger import get_logger
|
39
39
|
from zenml.utils import source_utils
|
@@ -73,7 +73,9 @@ class EvidentlyTestConfig(BaseModel):
|
|
73
73
|
class_path: str
|
74
74
|
parameters: Dict[str, Any] = Field(default_factory=dict)
|
75
75
|
is_generator: bool = False
|
76
|
-
columns: Optional[Union[str, List[str]]] =
|
76
|
+
columns: Optional[Union[str, List[str]]] = Field(
|
77
|
+
default=None, union_mode="left_to_right"
|
78
|
+
)
|
77
79
|
|
78
80
|
@staticmethod
|
79
81
|
def get_test_class(test_name: str) -> Union[Test, TestPreset]:
|
@@ -343,7 +345,4 @@ class EvidentlyTestConfig(BaseModel):
|
|
343
345
|
f"`{self.class_path}`: {str(e)}"
|
344
346
|
)
|
345
347
|
|
346
|
-
|
347
|
-
"""Pydantic config class."""
|
348
|
-
|
349
|
-
extra = "forbid"
|
348
|
+
model_config = ConfigDict(extra="forbid")
|
@@ -16,7 +16,7 @@
|
|
16
16
|
from typing import Dict, List, Union
|
17
17
|
|
18
18
|
import pandas as pd
|
19
|
-
from pydantic import BaseModel
|
19
|
+
from pydantic import BaseModel, ConfigDict
|
20
20
|
|
21
21
|
|
22
22
|
class FacetsComparison(BaseModel):
|
@@ -31,8 +31,4 @@ class FacetsComparison(BaseModel):
|
|
31
31
|
"""
|
32
32
|
|
33
33
|
datasets: List[Dict[str, Union[str, pd.DataFrame]]]
|
34
|
-
|
35
|
-
class Config:
|
36
|
-
"""Pydantic config."""
|
37
|
-
|
38
|
-
arbitrary_types_allowed = True
|
34
|
+
model_config = ConfigDict(arbitrary_types_allowed=True)
|
@@ -31,7 +31,9 @@ class FeastIntegration(Integration):
|
|
31
31
|
"""Definition of Feast integration for ZenML."""
|
32
32
|
|
33
33
|
NAME = FEAST
|
34
|
-
|
34
|
+
# click is added to keep the feast click version
|
35
|
+
# in sync with ZenML's click
|
36
|
+
REQUIREMENTS = ["feast<=0.37.1", "click>=8.0.1,<8.1.4"]
|
35
37
|
|
36
38
|
@classmethod
|
37
39
|
def flavors(cls) -> List[Type[Flavor]]:
|
@@ -16,7 +16,6 @@
|
|
16
16
|
from typing import Any, Dict, List, Union, cast
|
17
17
|
|
18
18
|
import pandas as pd
|
19
|
-
import redis
|
20
19
|
from feast import FeatureStore # type: ignore
|
21
20
|
from feast.infra.registry.base_registry import BaseRegistry # type: ignore
|
22
21
|
|
@@ -41,23 +40,6 @@ class FeastFeatureStore(BaseFeatureStore):
|
|
41
40
|
"""
|
42
41
|
return cast(FeastFeatureStoreConfig, self._config)
|
43
42
|
|
44
|
-
def _validate_connection(self) -> None:
|
45
|
-
"""Validates the connection to the feature store.
|
46
|
-
|
47
|
-
Raises:
|
48
|
-
ConnectionError: If the online component (Redis) is not available.
|
49
|
-
"""
|
50
|
-
client = redis.Redis(
|
51
|
-
host=self.config.online_host, port=self.config.online_port
|
52
|
-
)
|
53
|
-
try:
|
54
|
-
client.ping()
|
55
|
-
except redis.exceptions.ConnectionError as e:
|
56
|
-
raise redis.exceptions.ConnectionError(
|
57
|
-
"Could not connect to feature store's online component. "
|
58
|
-
"Please make sure that Redis is running."
|
59
|
-
) from e
|
60
|
-
|
61
43
|
def get_historical_features(
|
62
44
|
self,
|
63
45
|
entity_df: Union[pd.DataFrame, str],
|
@@ -104,7 +86,6 @@ class FeastFeatureStore(BaseFeatureStore):
|
|
104
86
|
Returns:
|
105
87
|
The latest online feature data as a dictionary.
|
106
88
|
"""
|
107
|
-
self._validate_connection()
|
108
89
|
fs = FeatureStore(repo_path=self.config.feast_repo)
|
109
90
|
|
110
91
|
return fs.get_online_features( # type: ignore[no-any-return]
|
@@ -122,7 +103,6 @@ class FeastFeatureStore(BaseFeatureStore):
|
|
122
103
|
Returns:
|
123
104
|
The data sources' names.
|
124
105
|
"""
|
125
|
-
self._validate_connection()
|
126
106
|
fs = FeatureStore(repo_path=self.config.feast_repo)
|
127
107
|
return [ds.name for ds in fs.list_data_sources()]
|
128
108
|
|
@@ -135,7 +115,6 @@ class FeastFeatureStore(BaseFeatureStore):
|
|
135
115
|
Returns:
|
136
116
|
The entity names.
|
137
117
|
"""
|
138
|
-
self._validate_connection()
|
139
118
|
fs = FeatureStore(repo_path=self.config.feast_repo)
|
140
119
|
return [ds.name for ds in fs.list_entities()]
|
141
120
|
|
@@ -148,7 +127,6 @@ class FeastFeatureStore(BaseFeatureStore):
|
|
148
127
|
Returns:
|
149
128
|
The feature service names.
|
150
129
|
"""
|
151
|
-
self._validate_connection()
|
152
130
|
fs = FeatureStore(repo_path=self.config.feast_repo)
|
153
131
|
return [ds.name for ds in fs.list_feature_services()]
|
154
132
|
|
@@ -161,7 +139,6 @@ class FeastFeatureStore(BaseFeatureStore):
|
|
161
139
|
Returns:
|
162
140
|
The feature view names.
|
163
141
|
"""
|
164
|
-
self._validate_connection()
|
165
142
|
fs = FeatureStore(repo_path=self.config.feast_repo)
|
166
143
|
return [ds.name for ds in fs.list_feature_views()]
|
167
144
|
|
@@ -68,7 +68,7 @@ class VertexOrchestratorSettings(BaseSettings):
|
|
68
68
|
)
|
69
69
|
|
70
70
|
|
71
|
-
class VertexOrchestratorConfig(
|
71
|
+
class VertexOrchestratorConfig(
|
72
72
|
BaseOrchestratorConfig,
|
73
73
|
GoogleCredentialsConfigMixin,
|
74
74
|
VertexOrchestratorSettings,
|
@@ -61,7 +61,7 @@ class VertexStepOperatorSettings(BaseSettings):
|
|
61
61
|
boot_disk_type: str = "pd-ssd"
|
62
62
|
|
63
63
|
|
64
|
-
class VertexStepOperatorConfig(
|
64
|
+
class VertexStepOperatorConfig(
|
65
65
|
BaseStepOperatorConfig,
|
66
66
|
GoogleCredentialsConfigMixin,
|
67
67
|
VertexStepOperatorSettings,
|