zenml-nightly 0.55.0.dev20240124__py3-none-any.whl → 0.72.0.dev20250116__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/__init__.py +9 -12
- zenml/actions/__init__.py +14 -0
- zenml/actions/base_action.py +682 -0
- zenml/actions/pipeline_run/__init__.py +0 -0
- zenml/actions/pipeline_run/pipeline_run_action.py +223 -0
- zenml/analytics/context.py +70 -15
- zenml/analytics/enums.py +21 -17
- zenml/analytics/models.py +1 -0
- zenml/analytics/utils.py +19 -7
- zenml/annotators/base_annotator.py +4 -3
- zenml/artifact_stores/base_artifact_store.py +155 -72
- zenml/artifact_stores/local_artifact_store.py +3 -2
- zenml/artifacts/artifact_config.py +67 -58
- zenml/artifacts/external_artifact.py +24 -39
- zenml/artifacts/external_artifact_config.py +27 -37
- zenml/artifacts/preexisting_data_materializer.py +90 -0
- zenml/artifacts/unmaterialized_artifact.py +2 -12
- zenml/artifacts/utils.py +521 -220
- zenml/cli/__init__.py +1511 -456
- zenml/cli/annotator.py +48 -14
- zenml/cli/artifact.py +22 -4
- zenml/cli/authorized_device.py +1 -0
- zenml/cli/base.py +185 -22
- zenml/cli/code_repository.py +1 -0
- zenml/cli/formatter.py +1 -1
- zenml/cli/integration.py +119 -24
- zenml/cli/login.py +1053 -0
- zenml/cli/model.py +42 -15
- zenml/cli/model_registry.py +1 -2
- zenml/cli/pipeline.py +168 -82
- zenml/cli/secret.py +1 -2
- zenml/cli/served_model.py +56 -26
- zenml/cli/server.py +486 -619
- zenml/cli/service_accounts.py +55 -14
- zenml/cli/service_connectors.py +97 -6
- zenml/cli/stack.py +821 -531
- zenml/cli/stack_components.py +15 -598
- zenml/cli/tag.py +1 -0
- zenml/cli/text_utils.py +36 -2
- zenml/cli/user_management.py +204 -6
- zenml/cli/utils.py +411 -290
- zenml/client.py +1742 -298
- zenml/client_lazy_loader.py +224 -0
- zenml/code_repositories/base_code_repository.py +5 -4
- zenml/code_repositories/git/local_git_repository_context.py +1 -0
- zenml/code_repositories/local_repository_context.py +1 -0
- zenml/config/__init__.py +2 -0
- zenml/config/base_settings.py +6 -6
- zenml/config/build_configuration.py +43 -17
- zenml/config/compiler.py +82 -49
- zenml/config/docker_settings.py +139 -83
- zenml/config/global_config.py +260 -234
- zenml/config/pipeline_configurations.py +32 -11
- zenml/config/pipeline_run_configuration.py +15 -3
- zenml/config/pipeline_spec.py +6 -6
- zenml/config/resource_settings.py +8 -9
- zenml/config/retry_config.py +27 -0
- zenml/config/schedule.py +27 -18
- zenml/config/secret_reference_mixin.py +8 -4
- zenml/config/secrets_store_config.py +16 -24
- zenml/config/server_config.py +434 -51
- zenml/config/settings_resolver.py +2 -1
- zenml/config/source.py +97 -31
- zenml/config/step_configurations.py +83 -39
- zenml/config/step_run_info.py +3 -0
- zenml/config/store_config.py +20 -54
- zenml/config/strict_base_model.py +2 -6
- zenml/console.py +0 -1
- zenml/constants.py +232 -74
- zenml/container_registries/azure_container_registry.py +1 -0
- zenml/container_registries/base_container_registry.py +7 -3
- zenml/container_registries/default_container_registry.py +4 -3
- zenml/container_registries/dockerhub_container_registry.py +1 -0
- zenml/container_registries/gcp_container_registry.py +1 -0
- zenml/container_registries/github_container_registry.py +2 -10
- zenml/data_validators/base_data_validator.py +2 -2
- zenml/entrypoints/base_entrypoint_configuration.py +76 -17
- zenml/entrypoints/pipeline_entrypoint_configuration.py +1 -0
- zenml/entrypoints/step_entrypoint_configuration.py +21 -2
- zenml/enums.py +91 -9
- zenml/environment.py +52 -319
- zenml/{steps/base_parameters.py → event_hub/__init__.py} +5 -7
- zenml/event_hub/base_event_hub.py +196 -0
- zenml/event_hub/event_hub.py +181 -0
- zenml/event_sources/__init__.py +14 -0
- zenml/{lineage_graph/edge.py → event_sources/base_event.py} +5 -7
- zenml/event_sources/base_event_source.py +695 -0
- zenml/event_sources/webhooks/__init__.py +14 -0
- zenml/event_sources/webhooks/base_webhook_event_source.py +231 -0
- zenml/exceptions.py +40 -41
- zenml/feature_stores/base_feature_store.py +4 -6
- zenml/hooks/hook_validators.py +3 -11
- zenml/image_builders/base_image_builder.py +5 -2
- zenml/image_builders/build_context.py +24 -80
- zenml/image_builders/local_image_builder.py +14 -6
- zenml/integrations/__init__.py +16 -4
- zenml/integrations/airflow/__init__.py +3 -5
- zenml/integrations/airflow/flavors/airflow_orchestrator_flavor.py +15 -7
- zenml/integrations/airflow/orchestrators/airflow_orchestrator.py +15 -252
- zenml/integrations/airflow/orchestrators/dag_generator.py +5 -3
- zenml/integrations/argilla/__init__.py +46 -0
- zenml/integrations/argilla/annotators/__init__.py +20 -0
- zenml/integrations/argilla/annotators/argilla_annotator.py +443 -0
- zenml/{post_execution → integrations/argilla/flavors}/__init__.py +9 -13
- zenml/integrations/argilla/flavors/argilla_annotator_flavor.py +150 -0
- zenml/integrations/aws/__init__.py +7 -3
- zenml/integrations/aws/container_registries/aws_container_registry.py +44 -8
- zenml/integrations/aws/flavors/__init__.py +6 -0
- zenml/integrations/aws/flavors/aws_container_registry_flavor.py +3 -2
- zenml/integrations/aws/flavors/aws_image_builder_flavor.py +146 -0
- zenml/integrations/aws/flavors/sagemaker_orchestrator_flavor.py +104 -16
- zenml/integrations/aws/flavors/sagemaker_step_operator_flavor.py +6 -2
- zenml/integrations/aws/image_builders/__init__.py +20 -0
- zenml/integrations/aws/image_builders/aws_image_builder.py +307 -0
- zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +421 -133
- zenml/integrations/aws/service_connectors/aws_service_connector.py +175 -48
- zenml/integrations/aws/step_operators/sagemaker_step_operator.py +1 -1
- zenml/integrations/azure/__init__.py +14 -5
- zenml/integrations/azure/azureml_utils.py +201 -0
- zenml/integrations/azure/flavors/__init__.py +11 -0
- zenml/integrations/azure/flavors/azureml.py +139 -0
- zenml/integrations/azure/flavors/azureml_orchestrator_flavor.py +166 -0
- zenml/integrations/azure/flavors/azureml_step_operator_flavor.py +71 -18
- zenml/integrations/azure/orchestrators/__init__.py +19 -0
- zenml/integrations/azure/orchestrators/azureml_orchestrator.py +583 -0
- zenml/integrations/azure/orchestrators/azureml_orchestrator_entrypoint_config.py +82 -0
- zenml/integrations/azure/service_connectors/azure_service_connector.py +15 -6
- zenml/integrations/azure/step_operators/azureml_step_operator.py +78 -173
- zenml/integrations/bentoml/__init__.py +1 -1
- zenml/integrations/bentoml/constants.py +1 -1
- zenml/integrations/bentoml/materializers/bentoml_bento_materializer.py +19 -31
- zenml/integrations/bentoml/model_deployers/bentoml_model_deployer.py +128 -239
- zenml/integrations/bentoml/services/__init__.py +15 -4
- zenml/integrations/bentoml/services/bentoml_container_deployment.py +399 -0
- zenml/integrations/bentoml/services/{bentoml_deployment.py → bentoml_local_deployment.py} +85 -43
- zenml/integrations/bentoml/services/deployment_type.py +23 -0
- zenml/integrations/bentoml/steps/bento_builder.py +2 -0
- zenml/integrations/bentoml/steps/bentoml_deployer.py +97 -47
- zenml/integrations/bitbucket/__init__.py +42 -0
- zenml/integrations/bitbucket/plugins/__init__.py +20 -0
- zenml/integrations/bitbucket/plugins/bitbucket_webhook_event_source_flavor.py +43 -0
- zenml/integrations/bitbucket/plugins/event_sources/__init__.py +0 -0
- zenml/integrations/bitbucket/plugins/event_sources/bitbucket_webhook_event_source.py +486 -0
- zenml/integrations/comet/__init__.py +49 -0
- zenml/integrations/{kserve/services → comet/experiment_trackers}/__init__.py +5 -6
- zenml/integrations/comet/experiment_trackers/comet_experiment_tracker.py +175 -0
- zenml/integrations/comet/flavors/__init__.py +24 -0
- zenml/integrations/comet/flavors/comet_experiment_tracker_flavor.py +129 -0
- zenml/integrations/constants.py +14 -2
- zenml/integrations/databricks/__init__.py +70 -0
- zenml/{lineage_graph → integrations/databricks/flavors}/__init__.py +14 -18
- zenml/integrations/databricks/flavors/databricks_model_deployer_flavor.py +118 -0
- zenml/integrations/databricks/flavors/databricks_orchestrator_flavor.py +174 -0
- zenml/integrations/{kserve → databricks}/model_deployers/__init__.py +5 -5
- zenml/integrations/databricks/model_deployers/databricks_model_deployer.py +249 -0
- zenml/integrations/databricks/orchestrators/__init__.py +20 -0
- zenml/integrations/databricks/orchestrators/databricks_orchestrator.py +501 -0
- zenml/integrations/databricks/orchestrators/databricks_orchestrator_entrypoint_config.py +97 -0
- zenml/integrations/databricks/services/__init__.py +19 -0
- zenml/integrations/databricks/services/databricks_deployment.py +407 -0
- zenml/integrations/{gcp/orchestrators/vertex_scheduler → databricks/utils}/__init__.py +2 -2
- zenml/integrations/databricks/utils/databricks_utils.py +87 -0
- zenml/integrations/deepchecks/__init__.py +30 -10
- zenml/integrations/deepchecks/data_validators/deepchecks_data_validator.py +59 -18
- zenml/integrations/deepchecks/materializers/deepchecks_dataset_materializer.py +3 -1
- zenml/integrations/deepchecks/materializers/deepchecks_results_materializer.py +3 -3
- zenml/integrations/deepchecks/validation_checks.py +62 -35
- zenml/integrations/discord/__init__.py +1 -0
- zenml/integrations/discord/steps/discord_alerter_ask_step.py +1 -0
- zenml/integrations/discord/steps/discord_alerter_post_step.py +1 -0
- zenml/integrations/evidently/__init__.py +22 -4
- zenml/integrations/evidently/column_mapping.py +11 -3
- zenml/integrations/evidently/data_validators/evidently_data_validator.py +24 -6
- zenml/integrations/evidently/metrics.py +7 -8
- zenml/integrations/evidently/tests.py +7 -8
- zenml/integrations/facets/__init__.py +22 -5
- zenml/integrations/facets/models.py +2 -7
- zenml/integrations/feast/__init__.py +19 -3
- zenml/integrations/feast/feature_stores/feast_feature_store.py +13 -32
- zenml/integrations/gcp/__init__.py +6 -6
- zenml/integrations/gcp/artifact_stores/gcp_artifact_store.py +6 -0
- zenml/integrations/gcp/flavors/gcp_artifact_store_flavor.py +1 -0
- zenml/integrations/gcp/flavors/vertex_orchestrator_flavor.py +24 -2
- zenml/integrations/gcp/flavors/vertex_step_operator_flavor.py +14 -1
- zenml/integrations/gcp/google_credentials_mixin.py +1 -1
- zenml/integrations/gcp/orchestrators/vertex_orchestrator.py +519 -296
- zenml/integrations/gcp/service_connectors/gcp_service_connector.py +788 -113
- zenml/integrations/gcp/step_operators/vertex_step_operator.py +9 -1
- zenml/integrations/github/__init__.py +15 -0
- zenml/integrations/github/code_repositories/github_code_repository.py +3 -2
- zenml/integrations/github/plugins/__init__.py +19 -0
- zenml/integrations/github/plugins/event_sources/__init__.py +0 -0
- zenml/integrations/github/plugins/event_sources/github_webhook_event_source.py +510 -0
- zenml/integrations/github/plugins/github_webhook_event_source_flavor.py +43 -0
- zenml/integrations/gitlab/code_repositories/gitlab_code_repository.py +7 -1
- zenml/integrations/great_expectations/__init__.py +22 -10
- zenml/integrations/great_expectations/data_validators/ge_data_validator.py +61 -57
- 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 +9 -9
- zenml/integrations/great_expectations/utils.py +5 -5
- zenml/integrations/huggingface/__init__.py +52 -1
- zenml/integrations/huggingface/flavors/__init__.py +26 -0
- zenml/integrations/huggingface/flavors/huggingface_model_deployer_flavor.py +130 -0
- zenml/integrations/huggingface/materializers/__init__.py +3 -0
- zenml/integrations/huggingface/materializers/huggingface_datasets_materializer.py +102 -19
- zenml/integrations/huggingface/materializers/huggingface_pt_model_materializer.py +18 -19
- zenml/integrations/huggingface/materializers/huggingface_t5_materializer.py +104 -0
- zenml/integrations/huggingface/materializers/huggingface_tf_model_materializer.py +18 -19
- zenml/integrations/huggingface/materializers/huggingface_tokenizer_materializer.py +13 -15
- zenml/integrations/huggingface/model_deployers/__init__.py +20 -0
- zenml/integrations/huggingface/model_deployers/huggingface_model_deployer.py +247 -0
- zenml/integrations/huggingface/services/__init__.py +19 -0
- zenml/integrations/huggingface/services/huggingface_deployment.py +292 -0
- zenml/integrations/huggingface/steps/__init__.py +21 -0
- zenml/integrations/huggingface/steps/accelerate_runner.py +166 -0
- zenml/integrations/huggingface/steps/huggingface_deployer.py +110 -0
- zenml/integrations/hyperai/__init__.py +53 -0
- zenml/integrations/hyperai/flavors/__init__.py +20 -0
- zenml/integrations/hyperai/flavors/hyperai_orchestrator_flavor.py +170 -0
- zenml/integrations/hyperai/orchestrators/__init__.py +21 -0
- zenml/integrations/hyperai/orchestrators/hyperai_orchestrator.py +510 -0
- zenml/integrations/hyperai/service_connectors/__init__.py +20 -0
- zenml/integrations/hyperai/service_connectors/hyperai_service_connector.py +375 -0
- zenml/integrations/integration.py +101 -47
- zenml/integrations/kaniko/flavors/kaniko_image_builder_flavor.py +6 -44
- zenml/integrations/kaniko/image_builders/kaniko_image_builder.py +9 -6
- zenml/integrations/kubeflow/__init__.py +4 -1
- zenml/integrations/kubeflow/flavors/kubeflow_orchestrator_flavor.py +67 -82
- zenml/integrations/kubeflow/orchestrators/kubeflow_orchestrator.py +306 -248
- zenml/integrations/kubernetes/__init__.py +6 -3
- zenml/integrations/kubernetes/flavors/__init__.py +8 -0
- zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +43 -2
- zenml/integrations/kubernetes/flavors/kubernetes_step_operator_flavor.py +166 -0
- zenml/integrations/kubernetes/orchestrators/kube_utils.py +67 -12
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +89 -21
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator_entrypoint.py +39 -7
- zenml/integrations/kubernetes/orchestrators/manifest_utils.py +42 -19
- zenml/integrations/kubernetes/pod_settings.py +21 -31
- zenml/integrations/kubernetes/serialization_utils.py +3 -3
- zenml/integrations/kubernetes/service_connectors/kubernetes_service_connector.py +14 -11
- zenml/integrations/kubernetes/step_operators/__init__.py +22 -0
- zenml/integrations/kubernetes/step_operators/kubernetes_step_operator.py +236 -0
- zenml/integrations/label_studio/__init__.py +1 -3
- zenml/integrations/label_studio/annotators/label_studio_annotator.py +46 -14
- zenml/integrations/label_studio/flavors/__init__.py +2 -0
- zenml/integrations/label_studio/flavors/label_studio_annotator_flavor.py +20 -5
- zenml/integrations/langchain/__init__.py +7 -1
- zenml/integrations/langchain/materializers/document_materializer.py +44 -8
- zenml/integrations/langchain/materializers/openai_embedding_materializer.py +28 -2
- zenml/integrations/lightgbm/__init__.py +1 -0
- zenml/integrations/lightgbm/materializers/lightgbm_booster_materializer.py +8 -15
- zenml/integrations/lightgbm/materializers/lightgbm_dataset_materializer.py +11 -16
- zenml/integrations/lightning/__init__.py +48 -0
- zenml/integrations/lightning/flavors/__init__.py +23 -0
- zenml/integrations/lightning/flavors/lightning_orchestrator_flavor.py +168 -0
- zenml/integrations/lightning/orchestrators/__init__.py +23 -0
- zenml/integrations/lightning/orchestrators/lightning_orchestrator.py +617 -0
- zenml/integrations/lightning/orchestrators/lightning_orchestrator_entrypoint.py +303 -0
- zenml/integrations/lightning/orchestrators/lightning_orchestrator_entrypoint_configuration.py +77 -0
- zenml/integrations/lightning/orchestrators/utils.py +67 -0
- zenml/integrations/mlflow/__init__.py +55 -8
- zenml/integrations/mlflow/experiment_trackers/mlflow_experiment_tracker.py +31 -13
- zenml/integrations/mlflow/flavors/mlflow_experiment_tracker_flavor.py +32 -37
- zenml/integrations/mlflow/model_deployers/mlflow_model_deployer.py +42 -233
- zenml/integrations/mlflow/model_registries/mlflow_model_registry.py +42 -49
- zenml/integrations/mlflow/services/mlflow_deployment.py +30 -5
- zenml/integrations/mlflow/steps/mlflow_deployer.py +25 -27
- zenml/integrations/mlflow/steps/mlflow_registry.py +3 -1
- zenml/integrations/modal/__init__.py +46 -0
- zenml/integrations/modal/flavors/__init__.py +26 -0
- zenml/integrations/modal/flavors/modal_step_operator_flavor.py +125 -0
- zenml/integrations/modal/step_operators/__init__.py +22 -0
- zenml/integrations/modal/step_operators/modal_step_operator.py +242 -0
- zenml/integrations/neptune/experiment_trackers/neptune_experiment_tracker.py +7 -5
- zenml/integrations/neptune/experiment_trackers/run_state.py +71 -55
- zenml/integrations/neptune/flavors/neptune_experiment_tracker_flavor.py +1 -1
- zenml/integrations/neural_prophet/__init__.py +6 -1
- zenml/integrations/numpy/__init__.py +32 -0
- zenml/integrations/{kserve/constants.py → numpy/materializers/__init__.py} +5 -4
- zenml/integrations/numpy/materializers/numpy_materializer.py +246 -0
- zenml/integrations/openai/__init__.py +1 -1
- zenml/integrations/openai/hooks/open_ai_failure_hook.py +39 -14
- zenml/{steps/external_artifact.py → integrations/pandas/__init__.py} +17 -11
- zenml/integrations/{kserve/custom_deployer → pandas/materializers}/__init__.py +5 -5
- zenml/integrations/pandas/materializers/pandas_materializer.py +192 -0
- zenml/integrations/pigeon/__init__.py +44 -0
- zenml/integrations/pigeon/annotators/__init__.py +20 -0
- zenml/integrations/pigeon/annotators/pigeon_annotator.py +330 -0
- zenml/integrations/{kserve → pigeon}/flavors/__init__.py +7 -7
- zenml/integrations/pigeon/flavors/pigeon_annotator_flavor.py +104 -0
- zenml/integrations/pillow/materializers/pillow_image_materializer.py +17 -20
- zenml/integrations/polars/__init__.py +1 -0
- zenml/integrations/polars/materializers/dataframe_materializer.py +26 -39
- zenml/integrations/prodigy/__init__.py +48 -0
- zenml/integrations/prodigy/annotators/__init__.py +20 -0
- zenml/integrations/prodigy/annotators/prodigy_annotator.py +275 -0
- zenml/integrations/prodigy/flavors/__init__.py +24 -0
- zenml/integrations/prodigy/flavors/prodigy_annotator_flavor.py +101 -0
- zenml/integrations/pycaret/__init__.py +6 -0
- zenml/integrations/pycaret/materializers/model_materializer.py +7 -22
- zenml/integrations/pytorch/materializers/base_pytorch_materializer.py +8 -2
- zenml/integrations/pytorch/materializers/pytorch_module_materializer.py +4 -1
- zenml/integrations/registry.py +38 -1
- zenml/integrations/s3/__init__.py +2 -3
- zenml/integrations/s3/artifact_stores/s3_artifact_store.py +191 -9
- zenml/integrations/s3/flavors/s3_artifact_store_flavor.py +22 -45
- zenml/integrations/s3/utils.py +39 -0
- zenml/integrations/seldon/__init__.py +18 -2
- zenml/integrations/seldon/model_deployers/seldon_model_deployer.py +19 -141
- zenml/integrations/seldon/secret_schemas/secret_schemas.py +2 -2
- zenml/integrations/seldon/seldon_client.py +55 -70
- zenml/integrations/seldon/services/seldon_deployment.py +4 -5
- zenml/integrations/seldon/steps/seldon_deployer.py +21 -20
- zenml/integrations/sklearn/__init__.py +1 -1
- zenml/integrations/skypilot/flavors/skypilot_orchestrator_base_vm_config.py +29 -7
- zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +47 -28
- zenml/integrations/skypilot/orchestrators/skypilot_orchestrator_entrypoint.py +2 -2
- zenml/integrations/skypilot_aws/__init__.py +3 -2
- zenml/integrations/skypilot_aws/flavors/skypilot_orchestrator_aws_vm_flavor.py +1 -1
- zenml/integrations/skypilot_azure/__init__.py +2 -4
- zenml/integrations/skypilot_azure/flavors/skypilot_orchestrator_azure_vm_flavor.py +1 -1
- zenml/integrations/skypilot_gcp/__init__.py +3 -2
- zenml/integrations/skypilot_gcp/flavors/skypilot_orchestrator_gcp_vm_flavor.py +1 -1
- zenml/integrations/skypilot_kubernetes/__init__.py +52 -0
- zenml/integrations/skypilot_kubernetes/flavors/__init__.py +26 -0
- zenml/integrations/skypilot_kubernetes/flavors/skypilot_orchestrator_kubernetes_vm_flavor.py +125 -0
- zenml/integrations/skypilot_kubernetes/orchestrators/__init__.py +25 -0
- zenml/integrations/skypilot_kubernetes/orchestrators/skypilot_kubernetes_vm_orchestrator.py +74 -0
- zenml/integrations/skypilot_lambda/__init__.py +50 -0
- zenml/integrations/{kserve/secret_schemas → skypilot_lambda/flavors}/__init__.py +9 -12
- zenml/integrations/skypilot_lambda/flavors/skypilot_orchestrator_lambda_vm_flavor.py +130 -0
- zenml/{lineage_graph/node → integrations/skypilot_lambda/orchestrators}/__init__.py +8 -15
- zenml/integrations/skypilot_lambda/orchestrators/skypilot_lambda_vm_orchestrator.py +92 -0
- zenml/integrations/slack/__init__.py +1 -0
- zenml/integrations/slack/alerters/slack_alerter.py +22 -2
- zenml/integrations/slack/flavors/__init__.py +2 -0
- zenml/integrations/slack/flavors/slack_alerter_flavor.py +13 -4
- zenml/integrations/slack/steps/slack_alerter_ask_step.py +1 -0
- zenml/integrations/slack/steps/slack_alerter_post_step.py +1 -0
- zenml/integrations/spark/flavors/spark_step_operator_flavor.py +2 -39
- zenml/integrations/spark/step_operators/kubernetes_step_operator.py +1 -0
- zenml/integrations/spark/step_operators/spark_entrypoint_configuration.py +1 -0
- zenml/integrations/spark/step_operators/spark_step_operator.py +2 -0
- zenml/integrations/tekton/__init__.py +2 -1
- zenml/integrations/tekton/flavors/tekton_orchestrator_flavor.py +66 -23
- zenml/integrations/tekton/orchestrators/tekton_orchestrator.py +549 -235
- zenml/integrations/tensorboard/__init__.py +1 -13
- zenml/integrations/tensorboard/services/tensorboard_service.py +3 -4
- zenml/integrations/tensorboard/visualizers/tensorboard_visualizer.py +66 -59
- zenml/integrations/tensorflow/__init__.py +10 -15
- zenml/integrations/tensorflow/materializers/keras_materializer.py +24 -27
- zenml/integrations/tensorflow/materializers/tf_dataset_materializer.py +9 -16
- zenml/integrations/vllm/__init__.py +50 -0
- zenml/integrations/vllm/flavors/__init__.py +21 -0
- zenml/integrations/vllm/flavors/vllm_model_deployer_flavor.py +91 -0
- zenml/integrations/vllm/model_deployers/__init__.py +19 -0
- zenml/integrations/vllm/model_deployers/vllm_model_deployer.py +263 -0
- zenml/integrations/vllm/services/__init__.py +19 -0
- zenml/integrations/vllm/services/vllm_deployment.py +206 -0
- zenml/integrations/wandb/__init__.py +1 -0
- zenml/integrations/wandb/flavors/wandb_experiment_tracker_flavor.py +21 -18
- zenml/integrations/whylogs/__init__.py +18 -2
- zenml/integrations/whylogs/data_validators/whylogs_data_validator.py +3 -3
- zenml/integrations/whylogs/flavors/whylogs_data_validator_flavor.py +1 -1
- zenml/integrations/whylogs/materializers/whylogs_materializer.py +14 -21
- zenml/integrations/xgboost/materializers/xgboost_booster_materializer.py +11 -22
- zenml/integrations/xgboost/materializers/xgboost_dmatrix_materializer.py +10 -19
- zenml/io/fileio.py +1 -0
- zenml/io/filesystem.py +2 -2
- zenml/io/local_filesystem.py +3 -3
- zenml/logger.py +41 -17
- zenml/logging/__init__.py +5 -0
- zenml/logging/step_logging.py +280 -32
- zenml/{new/steps → login}/__init__.py +4 -1
- zenml/login/credentials.py +370 -0
- zenml/login/credentials_store.py +638 -0
- zenml/{new/pipelines → login/pro}/__init__.py +4 -1
- zenml/login/pro/client.py +492 -0
- zenml/login/pro/constants.py +28 -0
- zenml/{zen_stores/schemas/identity_schemas.py → login/pro/models.py} +9 -11
- zenml/login/pro/organization/__init__.py +14 -0
- zenml/login/pro/organization/client.py +79 -0
- zenml/{lineage_graph/node/base_node.py → login/pro/organization/models.py} +13 -12
- zenml/{_hub → login/pro/tenant}/__init__.py +2 -2
- zenml/login/pro/tenant/client.py +92 -0
- zenml/login/pro/tenant/models.py +176 -0
- zenml/login/pro/utils.py +107 -0
- zenml/login/server_info.py +52 -0
- zenml/{cli → login}/web_login.py +71 -21
- zenml/materializers/__init__.py +2 -4
- zenml/materializers/base_materializer.py +180 -51
- zenml/materializers/built_in_materializer.py +50 -23
- zenml/materializers/cloudpickle_materializer.py +4 -5
- zenml/materializers/numpy_materializer.py +23 -233
- zenml/materializers/pandas_materializer.py +22 -174
- zenml/materializers/pydantic_materializer.py +2 -2
- zenml/materializers/service_materializer.py +12 -10
- zenml/materializers/structured_string_materializer.py +12 -6
- zenml/materializers/uuid_materializer.py +79 -0
- zenml/metadata/lazy_load.py +33 -17
- zenml/metadata/metadata_types.py +112 -3
- zenml/model/lazy_load.py +85 -4
- zenml/model/model.py +236 -226
- zenml/model/utils.py +99 -141
- zenml/model_deployers/base_model_deployer.py +319 -47
- zenml/model_registries/base_model_registry.py +17 -15
- zenml/models/__init__.py +254 -175
- zenml/models/v2/base/base.py +254 -112
- zenml/models/v2/base/base_plugin_flavor.py +76 -0
- zenml/models/v2/base/filter.py +530 -199
- zenml/models/v2/base/page.py +2 -12
- zenml/models/v2/base/scoped.py +292 -22
- zenml/models/v2/core/action.py +276 -0
- zenml/models/v2/core/action_flavor.py +57 -0
- zenml/models/v2/core/api_key.py +35 -12
- zenml/models/v2/core/artifact.py +126 -6
- zenml/models/v2/core/artifact_version.py +289 -65
- zenml/models/v2/core/artifact_visualization.py +10 -4
- zenml/models/v2/core/code_reference.py +13 -4
- zenml/models/v2/core/code_repository.py +39 -16
- zenml/models/v2/core/component.py +113 -61
- zenml/models/v2/core/device.py +25 -5
- zenml/models/v2/core/event_source.py +244 -0
- zenml/models/v2/core/event_source_flavor.py +67 -0
- zenml/models/v2/core/flavor.py +90 -27
- zenml/models/v2/core/logs.py +81 -12
- zenml/models/v2/core/model.py +91 -42
- zenml/models/v2/core/model_version.py +100 -55
- zenml/models/v2/core/model_version_artifact.py +96 -89
- zenml/models/v2/core/model_version_pipeline_run.py +86 -53
- zenml/models/v2/core/pipeline.py +205 -80
- zenml/models/v2/core/pipeline_build.py +110 -21
- zenml/models/v2/core/pipeline_deployment.py +101 -36
- zenml/models/v2/core/pipeline_run.py +545 -33
- zenml/models/v2/core/run_metadata.py +23 -181
- zenml/models/v2/core/run_template.py +439 -0
- zenml/models/v2/core/schedule.py +66 -29
- zenml/models/v2/core/secret.py +33 -21
- zenml/models/v2/core/server_settings.py +224 -0
- zenml/models/v2/core/service.py +500 -0
- zenml/models/v2/core/service_account.py +40 -15
- zenml/models/v2/core/service_connector.py +247 -49
- zenml/models/v2/core/stack.py +163 -70
- zenml/models/v2/core/step_run.py +210 -48
- zenml/models/v2/core/tag.py +21 -8
- zenml/models/v2/core/tag_resource.py +13 -4
- zenml/models/v2/core/trigger.py +422 -0
- zenml/models/v2/core/trigger_execution.py +119 -0
- zenml/models/v2/core/user.py +136 -69
- zenml/models/v2/core/workspace.py +26 -7
- zenml/models/v2/misc/auth_models.py +11 -2
- zenml/models/v2/misc/build_item.py +3 -3
- zenml/models/v2/misc/external_user.py +3 -6
- zenml/models/v2/misc/info_models.py +78 -0
- zenml/models/v2/misc/loaded_visualization.py +2 -2
- zenml/models/v2/misc/run_metadata.py +38 -0
- zenml/models/v2/misc/server_models.py +100 -0
- zenml/models/v2/misc/service_connector_type.py +9 -17
- zenml/models/v2/misc/stack_deployment.py +96 -0
- zenml/models/v2/misc/user_auth.py +7 -9
- zenml/orchestrators/__init__.py +4 -0
- zenml/orchestrators/base_orchestrator.py +136 -25
- zenml/orchestrators/containerized_orchestrator.py +1 -0
- zenml/orchestrators/dag_runner.py +18 -3
- zenml/orchestrators/input_utils.py +109 -48
- zenml/orchestrators/local/local_orchestrator.py +10 -0
- zenml/orchestrators/local_docker/local_docker_orchestrator.py +14 -42
- zenml/orchestrators/output_utils.py +16 -6
- zenml/orchestrators/publish_utils.py +12 -5
- zenml/orchestrators/step_launcher.py +142 -194
- zenml/orchestrators/step_run_utils.py +386 -0
- zenml/orchestrators/step_runner.py +181 -270
- zenml/orchestrators/utils.py +219 -84
- zenml/orchestrators/wheeled_orchestrator.py +147 -0
- zenml/pipelines/__init__.py +3 -16
- zenml/{new/pipelines → pipelines}/build_utils.py +287 -47
- zenml/{new/pipelines → pipelines}/pipeline_context.py +6 -2
- zenml/pipelines/pipeline_decorator.py +40 -64
- zenml/{new/pipelines/pipeline.py → pipelines/pipeline_definition.py} +376 -440
- zenml/pipelines/run_utils.py +358 -0
- zenml/plugins/__init__.py +0 -0
- zenml/plugins/base_plugin_flavor.py +88 -0
- zenml/plugins/plugin_flavor_registry.py +342 -0
- zenml/secret/base_secret.py +7 -8
- zenml/secret/schemas/basic_auth_secret_schema.py +0 -1
- zenml/service_connectors/docker_service_connector.py +19 -4
- zenml/service_connectors/service_connector.py +12 -14
- zenml/service_connectors/service_connector_registry.py +71 -55
- zenml/service_connectors/service_connector_utils.py +418 -0
- zenml/services/__init__.py +0 -2
- zenml/services/container/container_service.py +9 -6
- zenml/services/container/container_service_endpoint.py +1 -1
- zenml/services/container/entrypoint.py +3 -2
- zenml/services/local/local_daemon_entrypoint.py +9 -6
- zenml/services/local/local_service.py +1 -1
- zenml/services/local/local_service_endpoint.py +1 -1
- zenml/services/service.py +222 -130
- zenml/services/service_status.py +2 -1
- zenml/services/service_type.py +6 -5
- zenml/stack/flavor.py +25 -18
- zenml/stack/flavor_registry.py +4 -4
- zenml/stack/stack.py +20 -131
- zenml/stack/stack_component.py +136 -110
- zenml/stack/utils.py +36 -15
- zenml/stack_deployments/__init__.py +14 -0
- zenml/stack_deployments/aws_stack_deployment.py +320 -0
- zenml/stack_deployments/azure_stack_deployment.py +315 -0
- zenml/stack_deployments/gcp_stack_deployment.py +315 -0
- zenml/stack_deployments/stack_deployment.py +232 -0
- zenml/stack_deployments/utils.py +48 -0
- zenml/step_operators/step_operator_entrypoint_configuration.py +2 -1
- zenml/steps/__init__.py +3 -9
- zenml/steps/base_step.py +172 -315
- zenml/{new/steps → steps}/decorated_step.py +1 -0
- zenml/steps/entrypoint_function_utils.py +33 -93
- zenml/{new/steps → steps}/step_context.py +70 -50
- zenml/steps/step_decorator.py +47 -93
- zenml/steps/step_invocation.py +22 -60
- zenml/steps/utils.py +161 -48
- zenml/types.py +14 -1
- zenml/utils/archivable.py +178 -0
- zenml/utils/callback_registry.py +71 -0
- zenml/utils/code_repository_utils.py +1 -0
- zenml/utils/code_utils.py +346 -0
- zenml/utils/cuda_utils.py +50 -0
- zenml/utils/dashboard_utils.py +67 -21
- zenml/utils/deprecation_utils.py +22 -24
- zenml/utils/dict_utils.py +22 -0
- zenml/utils/docker_utils.py +34 -5
- zenml/utils/downloaded_repository_context.py +1 -0
- zenml/utils/env_utils.py +55 -1
- zenml/utils/filesync_model.py +65 -28
- zenml/utils/function_utils.py +260 -0
- zenml/utils/integration_utils.py +1 -0
- zenml/utils/json_utils.py +131 -0
- zenml/utils/materializer_utils.py +1 -1
- zenml/utils/metadata_utils.py +368 -0
- zenml/utils/notebook_utils.py +136 -0
- zenml/utils/package_utils.py +89 -0
- zenml/utils/pagination_utils.py +9 -7
- zenml/utils/pipeline_docker_image_builder.py +152 -149
- zenml/utils/pydantic_utils.py +276 -66
- zenml/utils/requirements_utils.py +71 -0
- zenml/utils/secret_utils.py +66 -12
- zenml/utils/settings_utils.py +2 -1
- zenml/utils/singleton.py +15 -3
- zenml/utils/source_code_utils.py +1 -0
- zenml/utils/source_utils.py +236 -14
- zenml/utils/string_utils.py +140 -0
- zenml/utils/typed_model.py +5 -3
- zenml/utils/typing_utils.py +223 -0
- zenml/utils/visualization_utils.py +5 -3
- zenml/utils/yaml_utils.py +1 -1
- zenml/zen_server/auth.py +387 -55
- zenml/zen_server/cache.py +208 -0
- zenml/zen_server/cloud_utils.py +253 -0
- zenml/zen_server/csrf.py +91 -0
- zenml/zen_server/dashboard/assets/404-Dfq64Boz.js +1 -0
- zenml/zen_server/dashboard/assets/@radix-DeK6qiuw.js +85 -0
- zenml/zen_server/dashboard/assets/@react-router-B3Z5rLr2.js +29 -0
- zenml/zen_server/dashboard/assets/@reactflow-BUNIMFeC.js +17 -0
- zenml/zen_server/dashboard/assets/@reactflow-C26Olbza.css +1 -0
- zenml/zen_server/dashboard/assets/@tanstack-DT5WLu9C.js +22 -0
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-B73Vs10T.js +1 -0
- zenml/zen_server/dashboard/assets/CodeSnippet-Bbx6fIb6.css +1 -0
- zenml/zen_server/dashboard/assets/CodeSnippet-DIJRT2NT.js +9 -0
- zenml/zen_server/dashboard/assets/CollapsibleCard-BzUHGZOU.js +1 -0
- zenml/zen_server/dashboard/assets/Commands-BEGyld4c.js +1 -0
- zenml/zen_server/dashboard/assets/ComponentBadge-xyKiek1s.js +1 -0
- zenml/zen_server/dashboard/assets/CopyButton-DhW-mapu.js +2 -0
- zenml/zen_server/dashboard/assets/CsvVizualization-D8oazBiE.js +15 -0
- zenml/zen_server/dashboard/assets/DeleteAlertDialog-WkSIIgfy.js +1 -0
- zenml/zen_server/dashboard/assets/DialogItem-Bgroeg29.js +1 -0
- zenml/zen_server/dashboard/assets/DisplayDate-CDMUcQHS.js +1 -0
- zenml/zen_server/dashboard/assets/EmptyState-BzdlCwp3.js +1 -0
- zenml/zen_server/dashboard/assets/Error-CY5tlu17.js +1 -0
- zenml/zen_server/dashboard/assets/ExecutionStatus-G8mjIaeA.js +1 -0
- zenml/zen_server/dashboard/assets/Helpbox-Bb1ed--O.js +1 -0
- zenml/zen_server/dashboard/assets/Infobox-Da6-76M2.js +1 -0
- zenml/zen_server/dashboard/assets/InlineAvatar-DqnZaBNq.js +1 -0
- zenml/zen_server/dashboard/assets/Lock-CYYy18Mm.js +1 -0
- zenml/zen_server/dashboard/assets/MarkdownVisualization-ylXaAxev.js +14 -0
- zenml/zen_server/dashboard/assets/NestedCollapsible-aK5ojKoF.js +1 -0
- zenml/zen_server/dashboard/assets/NumberBox-Dtp3J6g5.js +1 -0
- zenml/zen_server/dashboard/assets/Partials-CqZp5NMX.js +1 -0
- zenml/zen_server/dashboard/assets/PasswordChecker-B0nadgh6.js +1 -0
- zenml/zen_server/dashboard/assets/ProBadge-B4tRUYve.js +1 -0
- zenml/zen_server/dashboard/assets/ProCta-CZuP29Qz.js +1 -0
- zenml/zen_server/dashboard/assets/ProviderIcon-Bd7GUQ1_.js +1 -0
- zenml/zen_server/dashboard/assets/ProviderRadio-mstdqzsS.js +1 -0
- zenml/zen_server/dashboard/assets/RunSelector-CsruSB4i.js +1 -0
- zenml/zen_server/dashboard/assets/RunsBody-DxxtWVYz.js +1 -0
- zenml/zen_server/dashboard/assets/SearchField-D6tPxyqw.js +1 -0
- zenml/zen_server/dashboard/assets/SecretTooltip-CLzJIYW_.js +1 -0
- zenml/zen_server/dashboard/assets/SetPassword-Yn50ooBC.js +1 -0
- zenml/zen_server/dashboard/assets/StackList-U537qoYd.js +1 -0
- zenml/zen_server/dashboard/assets/Tabs-CNv-eTYM.js +1 -0
- zenml/zen_server/dashboard/assets/Tick-jEIevzVf.js +1 -0
- zenml/zen_server/dashboard/assets/UpdatePasswordSchemas-C16GW-kX.js +1 -0
- zenml/zen_server/dashboard/assets/UsageReason-Bf2tzhv1.js +1 -0
- zenml/zen_server/dashboard/assets/WizardFooter-D6i-AP1K.js +1 -0
- zenml/zen_server/dashboard/assets/acp-DOsXjFc7.webp +0 -0
- zenml/zen_server/dashboard/assets/adam-e-y0WnB_.webp +0 -0
- zenml/zen_server/dashboard/assets/alex-DcCuDHPg.webp +0 -0
- zenml/zen_server/dashboard/assets/all-pipeline-runs-query-DUti43aF.js +1 -0
- zenml/zen_server/dashboard/assets/baris-C0ZrZ10g.webp +0 -0
- zenml/zen_server/dashboard/assets/check-DloQpStc.js +1 -0
- zenml/zen_server/dashboard/assets/check-circle-jNbX5-sR.js +1 -0
- zenml/zen_server/dashboard/assets/chevron-down-6JyMkfjR.js +1 -0
- zenml/zen_server/dashboard/assets/chevron-right-double-D7ojK9Co.js +1 -0
- zenml/zen_server/dashboard/assets/cloud-squares-DeRLMopf.svg +43 -0
- zenml/zen_server/dashboard/assets/code-browser-CUFUIHfp.js +1 -0
- zenml/zen_server/dashboard/assets/code-snippets-CqONne41.js +13 -0
- zenml/zen_server/dashboard/assets/components-Br2ezRib.js +1 -0
- zenml/zen_server/dashboard/assets/connectors-video-C9qY4syJ.svg +21 -0
- zenml/zen_server/dashboard/assets/copy-C8XQA2Ug.js +1 -0
- zenml/zen_server/dashboard/assets/create-stack-Ch2WPs9U.js +1 -0
- zenml/zen_server/dashboard/assets/dates-3pMLCNrD.js +1 -0
- zenml/zen_server/dashboard/assets/delete-run-Byf9hTjA.js +1 -0
- zenml/zen_server/dashboard/assets/docker-BdA9vrnW.js +1 -0
- zenml/zen_server/dashboard/assets/dots-horizontal-otGBOSDJ.js +1 -0
- zenml/zen_server/dashboard/assets/flyte-Cj-xy_8I.svg +10 -0
- zenml/zen_server/dashboard/assets/form-schemas-BZqKBPBF.js +1 -0
- zenml/zen_server/dashboard/assets/gcp-CFtm4BA7.js +1 -0
- zenml/zen_server/dashboard/assets/hamza-NKKOZz1I.webp +0 -0
- zenml/zen_server/dashboard/assets/help-Cc9bBIJH.js +1 -0
- zenml/zen_server/dashboard/assets/index-CE0aQlv8.js +55 -0
- zenml/zen_server/dashboard/assets/index-CtdYkjUi.js +1 -0
- zenml/zen_server/dashboard/assets/index-CyBKZcpO.js +1 -0
- zenml/zen_server/dashboard/assets/index-DXvT1_Um.css +1 -0
- zenml/zen_server/dashboard/assets/index-Uu49AX48.js +1 -0
- zenml/zen_server/dashboard/assets/index-v6gQjDEo.js +1 -0
- zenml/zen_server/dashboard/assets/index.esm-Dy6Z9Ung.js +1 -0
- zenml/zen_server/dashboard/assets/inter-cyrillic-400-normal-BLGc9T1a.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-cyrillic-400-normal-ZzOtrSSW.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-cyrillic-500-normal-D4Vwzodn.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-cyrillic-500-normal-DH2hs3aW.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-cyrillic-600-normal-BGBWG807.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-cyrillic-600-normal-BuzJQFbW.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-cyrillic-ext-400-normal-BPnxn4xp.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-cyrillic-ext-400-normal-Dc4VJyIJ.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-cyrillic-ext-500-normal-BShVwWPj.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-cyrillic-ext-500-normal-CUiC4oBV.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-cyrillic-ext-600-normal-Bt9VVOA-.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-cyrillic-ext-600-normal-CaqZN2hq.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-greek-400-normal-BZzXV7-1.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-greek-400-normal-DxZsaF_h.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-greek-500-normal-CeQXL5ds.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-greek-500-normal-d_eO-yCQ.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-greek-600-normal-CwicyhtI.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-greek-600-normal-Dhlb-90d.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-greek-ext-400-normal-Bput3-QP.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-greek-ext-400-normal-DCpCPQOf.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-greek-ext-500-normal-B6guLgqG.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-greek-ext-500-normal-M2hEX8vc.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-greek-ext-600-normal-C9WLioJ8.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-greek-ext-600-normal-Cnui8OiR.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-latin-400-normal-BOOGhInR.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-latin-400-normal-gitzw0hO.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-latin-500-normal-D2bGa7uu.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-latin-500-normal-deR1Tlfd.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-latin-600-normal-B5cFAncS.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-latin-600-normal-D273HNI0.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-latin-ext-400-normal-C1t-h-pH.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-latin-ext-400-normal-hnt3BR84.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-latin-ext-500-normal-CIS2RHJS.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-latin-ext-500-normal-UMdmhHu2.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-latin-ext-600-normal-BnYJhD27.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-latin-ext-600-normal-CAF0vJDd.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-vietnamese-400-normal-BUNmGMP1.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-vietnamese-500-normal-DQPw2Hwd.woff +0 -0
- zenml/zen_server/dashboard/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
- zenml/zen_server/dashboard/assets/inter-vietnamese-600-normal-Cm6aH8_k.woff +0 -0
- zenml/zen_server/dashboard/assets/key-icon-aH-QIa5R.js +1 -0
- zenml/zen_server/dashboard/assets/kubernetes-B2wmAJ1d.js +1 -0
- zenml/zen_server/dashboard/assets/layout-BtHBmE4w.js +1 -0
- zenml/zen_server/dashboard/assets/link-external-b9AXw_sW.js +1 -0
- zenml/zen_server/dashboard/assets/login-command-CkqxPtV3.js +1 -0
- zenml/zen_server/dashboard/assets/login-mutation-DNDVp_2H.js +1 -0
- zenml/zen_server/dashboard/assets/logs-WMSM52RF.js +1 -0
- zenml/zen_server/dashboard/assets/mcp-Cb1aMeoq.webp +0 -0
- zenml/zen_server/dashboard/assets/metaflow-weOkWNyT.svg +10 -0
- zenml/zen_server/dashboard/assets/not-found-Bmup4ctE.js +1 -0
- zenml/zen_server/dashboard/assets/package-C6uypY4h.js +1 -0
- zenml/zen_server/dashboard/assets/page--XLMzHrn.js +1 -0
- zenml/zen_server/dashboard/assets/page-ANYGfEUL.js +1 -0
- zenml/zen_server/dashboard/assets/page-B5Sr8pib.js +1 -0
- zenml/zen_server/dashboard/assets/page-BC27C_OI.js +2 -0
- zenml/zen_server/dashboard/assets/page-BNxYrN0q.js +1 -0
- zenml/zen_server/dashboard/assets/page-BYJfqgLN.js +1 -0
- zenml/zen_server/dashboard/assets/page-B_0XkV48.js +1 -0
- zenml/zen_server/dashboard/assets/page-BrmJp1Wt.js +1 -0
- zenml/zen_server/dashboard/assets/page-C2nU3Gxn.js +1 -0
- zenml/zen_server/dashboard/assets/page-C70wZtV2.js +1 -0
- zenml/zen_server/dashboard/assets/page-CHRn1fQm.js +1 -0
- zenml/zen_server/dashboard/assets/page-CWr96ZKN.js +1 -0
- zenml/zen_server/dashboard/assets/page-CXAbSyp9.js +1 -0
- zenml/zen_server/dashboard/assets/page-CaeI9ptC.js +1 -0
- zenml/zen_server/dashboard/assets/page-Cc8ZEuj4.js +1 -0
- zenml/zen_server/dashboard/assets/page-CltCNL0T.js +1 -0
- zenml/zen_server/dashboard/assets/page-CmlYj7Nl.js +1 -0
- zenml/zen_server/dashboard/assets/page-D6Ev5P8V.js +1 -0
- zenml/zen_server/dashboard/assets/page-D9Oh05fl.js +1 -0
- zenml/zen_server/dashboard/assets/page-DGlm1RVc.js +1 -0
- zenml/zen_server/dashboard/assets/page-DN4BVIOL.js +1 -0
- zenml/zen_server/dashboard/assets/page-Dif8CWyZ.js +1 -0
- zenml/zen_server/dashboard/assets/page-DlIi5ThM.js +1 -0
- zenml/zen_server/dashboard/assets/page-DoW7YxTu.js +1 -0
- zenml/zen_server/dashboard/assets/page-Dth9X1Ih.js +1 -0
- zenml/zen_server/dashboard/assets/page-DweqqCkF.js +1 -0
- zenml/zen_server/dashboard/assets/page-DyOJ_pq3.js +1 -0
- zenml/zen_server/dashboard/assets/page-Hn8q9iJZ.js +1 -0
- zenml/zen_server/dashboard/assets/page-IhckKFnD.js +6 -0
- zenml/zen_server/dashboard/assets/page-LyZ_l8vR.js +1 -0
- zenml/zen_server/dashboard/assets/page-PamGpk0j.js +1 -0
- zenml/zen_server/dashboard/assets/page-PxOWfKgF.js +2 -0
- zenml/zen_server/dashboard/assets/persist-DeXRG61d.js +1 -0
- zenml/zen_server/dashboard/assets/persist-vP0-Xl4f.js +1 -0
- zenml/zen_server/dashboard/assets/plus-tf1V2hTJ.js +1 -0
- zenml/zen_server/dashboard/assets/refresh-BjOeWlEq.js +1 -0
- zenml/zen_server/dashboard/assets/repos-video-D8kpu60k.svg +9 -0
- zenml/zen_server/dashboard/assets/rocket-DjT2cDvG.js +1 -0
- zenml/zen_server/dashboard/assets/service-DH_oUqQj.js +2 -0
- zenml/zen_server/dashboard/assets/settings_preview-0JLrRgHP.webp +0 -0
- zenml/zen_server/dashboard/assets/sharedSchema-Bw1_Wa7l.js +14 -0
- zenml/zen_server/dashboard/assets/stack-detail-query-B_0R_fd6.js +1 -0
- zenml/zen_server/dashboard/assets/stefan-B08Ftbba.webp +0 -0
- zenml/zen_server/dashboard/assets/templates-1S_8WeSK.webp +0 -0
- zenml/zen_server/dashboard/assets/tick-circle-BEX_Tp4v.js +1 -0
- zenml/zen_server/dashboard/assets/tour-cover-BYfeen6M.webp +0 -0
- zenml/zen_server/dashboard/assets/trash-arLUMWMS.js +1 -0
- zenml/zen_server/dashboard/assets/update-server-settings-mutation-D9qYhfaN.js +1 -0
- zenml/zen_server/dashboard/assets/upgrade-form-CwRHBuXB.webp +0 -0
- zenml/zen_server/dashboard/assets/url-Dh93fvh0.js +1 -0
- zenml/zen_server/dashboard/assets/zod-BwEbpOxH.js +1 -0
- zenml/zen_server/dashboard/index.html +19 -1
- zenml/zen_server/deploy/__init__.py +7 -16
- zenml/zen_server/deploy/base_provider.py +49 -78
- zenml/zen_server/deploy/{local → daemon}/__init__.py +3 -3
- zenml/zen_server/deploy/{local/local_provider.py → daemon/daemon_provider.py} +48 -66
- zenml/zen_server/deploy/{local/local_zen_server.py → daemon/daemon_zen_server.py} +78 -62
- zenml/zen_server/deploy/deployer.py +94 -175
- zenml/zen_server/deploy/deployment.py +23 -17
- zenml/zen_server/deploy/docker/docker_provider.py +15 -31
- zenml/zen_server/deploy/docker/docker_zen_server.py +30 -35
- zenml/zen_server/deploy/helm/Chart.yaml +1 -1
- zenml/zen_server/deploy/helm/README.md +3 -13
- zenml/zen_server/deploy/helm/templates/NOTES.txt +23 -7
- zenml/zen_server/deploy/helm/templates/_environment.tpl +175 -23
- zenml/zen_server/deploy/helm/templates/server-db-job.yaml +45 -18
- zenml/zen_server/deploy/helm/templates/server-db-pvc.yaml +25 -0
- zenml/zen_server/deploy/helm/templates/server-deployment.yaml +22 -6
- zenml/zen_server/deploy/helm/templates/server-secret.yaml +11 -10
- zenml/zen_server/deploy/helm/values.yaml +210 -28
- zenml/zen_server/exceptions.py +20 -1
- zenml/zen_server/feature_gate/__init__.py +13 -0
- zenml/zen_server/feature_gate/endpoint_utils.py +61 -0
- zenml/zen_server/feature_gate/feature_gate_interface.py +49 -0
- zenml/zen_server/feature_gate/zenml_cloud_feature_gate.py +125 -0
- zenml/zen_server/jwt.py +64 -32
- zenml/zen_server/rate_limit.py +200 -0
- zenml/zen_server/rbac/endpoint_utils.py +92 -9
- zenml/zen_server/rbac/models.py +21 -17
- zenml/zen_server/rbac/rbac_sql_zen_store.py +175 -0
- zenml/zen_server/rbac/utils.py +71 -30
- zenml/zen_server/rbac/zenml_cloud_rbac.py +13 -188
- zenml/zen_server/routers/actions_endpoints.py +324 -0
- zenml/zen_server/routers/artifact_version_endpoints.py +28 -2
- zenml/zen_server/routers/auth_endpoints.py +249 -131
- zenml/zen_server/routers/code_repositories_endpoints.py +1 -0
- zenml/zen_server/routers/devices_endpoints.py +56 -49
- zenml/zen_server/routers/event_source_endpoints.py +327 -0
- zenml/zen_server/routers/logs_endpoints.py +66 -0
- zenml/zen_server/routers/model_versions_endpoints.py +59 -0
- zenml/zen_server/routers/models_endpoints.py +7 -1
- zenml/zen_server/routers/pipeline_builds_endpoints.py +6 -1
- zenml/zen_server/routers/pipeline_deployments_endpoints.py +35 -0
- zenml/zen_server/routers/pipelines_endpoints.py +19 -32
- zenml/zen_server/routers/plugin_endpoints.py +107 -0
- zenml/zen_server/routers/run_templates_endpoints.py +212 -0
- zenml/zen_server/routers/runs_endpoints.py +91 -32
- zenml/zen_server/routers/schedule_endpoints.py +1 -0
- zenml/zen_server/routers/secrets_endpoints.py +4 -2
- zenml/zen_server/routers/server_endpoints.py +186 -4
- zenml/zen_server/routers/service_connectors_endpoints.py +56 -0
- zenml/zen_server/routers/service_endpoints.py +180 -0
- zenml/zen_server/routers/stack_components_endpoints.py +2 -1
- zenml/zen_server/routers/stack_deployment_endpoints.py +164 -0
- zenml/zen_server/routers/steps_endpoints.py +21 -12
- zenml/zen_server/routers/triggers_endpoints.py +336 -0
- zenml/zen_server/routers/users_endpoints.py +280 -45
- zenml/zen_server/routers/webhook_endpoints.py +127 -0
- zenml/zen_server/routers/workspaces_endpoints.py +220 -185
- zenml/zen_server/secure_headers.py +120 -0
- zenml/{new → zen_server/template_execution}/__init__.py +1 -1
- zenml/zen_server/template_execution/runner_entrypoint_configuration.py +42 -0
- zenml/zen_server/template_execution/utils.py +474 -0
- zenml/zen_server/template_execution/workload_manager_interface.py +92 -0
- zenml/zen_server/utils.py +374 -74
- zenml/zen_server/zen_server_api.py +299 -52
- zenml/zen_stores/base_zen_store.py +90 -58
- zenml/zen_stores/migrations/alembic.py +22 -9
- zenml/zen_stores/migrations/env.py +2 -2
- zenml/zen_stores/migrations/utils.py +731 -0
- zenml/zen_stores/migrations/versions/0.21.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.21.1_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.22.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.23.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.30.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.31.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.31.1_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.32.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.32.1_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.33.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.34.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.35.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.35.1_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.36.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.36.1_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.37.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.38.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.39.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.39.1_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.40.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.40.1_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.40.2_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.40.3_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.41.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.42.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.42.1_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.43.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.44.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.44.1_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.44.2_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.44.3_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.45.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.45.1_release_0_45_1.py +0 -1
- zenml/zen_stores/migrations/versions/0.45.2_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.45.3_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.45.4_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.45.5_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.45.6_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.46.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.46.1_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.47.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.50.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.51.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.52.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.53.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.53.1_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.54.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.54.1_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.55.0_release.py +0 -1
- zenml/zen_stores/migrations/versions/0.55.1_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.55.2_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.55.3_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.55.4_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.55.5_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.56.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.56.1_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.56.2_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.56.3_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.56.4_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.57.0.rc1_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.57.0.rc2_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.57.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.57.1_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.58.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.58.1_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.58.2_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.60.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.61.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.62.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.63.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.64.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.65.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.66.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.67.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.68.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.68.1_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.70.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.71.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/0.72.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/026d4577b6a0_add_code_path.py +39 -0
- zenml/zen_stores/migrations/versions/03742aa7fdd7_add_secrets.py +1 -0
- zenml/zen_stores/migrations/versions/0701da9951a0_added_service_table.py +94 -0
- zenml/zen_stores/migrations/versions/0b06faa59c93_add_service_connectors.py +1 -0
- zenml/zen_stores/migrations/versions/0d707865f404_adding_labels_to_stacks.py +30 -0
- zenml/zen_stores/migrations/versions/0e4735b23577_increase_pipeline_spec_field_length.py +1 -0
- zenml/zen_stores/migrations/versions/1041bc644e0d_remove_secrets_manager.py +6 -3
- zenml/zen_stores/migrations/versions/10a907dad202_delete_mlmd_tables.py +2 -1
- zenml/zen_stores/migrations/versions/14d687c8fa1c_rename_model_config_to_model_version.py +1 -0
- zenml/zen_stores/migrations/versions/19f27d5b234e_add_build_and_deployment_tables.py +1 -0
- zenml/zen_stores/migrations/versions/1a9a9d2a836d_admin_users.py +56 -0
- zenml/zen_stores/migrations/versions/1ac1b9c04da1_make_secrets_values_optional.py +1 -0
- zenml/zen_stores/migrations/versions/1cb6477f72d6_move_artifact_save_type.py +99 -0
- zenml/zen_stores/migrations/versions/1d74e596abb8_add_run_once_start_time_to_schedule.py +36 -0
- zenml/zen_stores/migrations/versions/1d8f30c54477_migrate_to_new_.py +124 -0
- zenml/zen_stores/migrations/versions/248dfd320b68_update_size_of_flavor_config_schema.py +1 -0
- zenml/zen_stores/migrations/versions/25155145c545_separate_actions_and_triggers.py +228 -0
- zenml/zen_stores/migrations/versions/26351d482b9e_add_step_run_unique_constraint.py +37 -0
- zenml/zen_stores/migrations/versions/26b776ad583e_redesign_artifacts.py +9 -10
- zenml/zen_stores/migrations/versions/2d201872e23c_remove_db_dependency_loop.py +29 -0
- zenml/zen_stores/migrations/versions/37835ce041d2_optimizing_database.py +4 -3
- zenml/zen_stores/migrations/versions/389046140cad_data_versioning.py +1 -0
- zenml/zen_stores/migrations/versions/3944116bbd56_rename_project_to_workspace.py +1 -0
- zenml/zen_stores/migrations/versions/3b68abe58f44_add_model_watchtower_entities.py +1 -0
- zenml/zen_stores/migrations/versions/3c5a367730c2_add_environment_info_to_runs.py +1 -0
- zenml/zen_stores/migrations/versions/3dcc5d20e82f_add_last_user_activity.py +51 -0
- zenml/zen_stores/migrations/versions/43a86093b60e_add_labels_for_stack_components.py +1 -0
- zenml/zen_stores/migrations/versions/46506f72f0ed_add_server_settings.py +123 -0
- zenml/zen_stores/migrations/versions/479103df60b6_add_triggers.py +162 -0
- zenml/zen_stores/migrations/versions/4a3087070f4e_add_step_source_code.py +1 -0
- zenml/zen_stores/migrations/versions/4c41c0ca42db_add_code_repository_table.py +1 -0
- zenml/zen_stores/migrations/versions/4d688d8f7aff_rename_model_version_to_model.py +1 -0
- zenml/zen_stores/migrations/versions/4e1972485075_endpoint_artifact_deployment_artifact.py +1 -0
- zenml/zen_stores/migrations/versions/4f66af55fbb9_rename_model_config_model_to_model_.py +1 -0
- zenml/zen_stores/migrations/versions/5330ba58bf20_rename_tables_and_foreign_keys.py +8 -9
- zenml/zen_stores/migrations/versions/5994f9ad0489_introduce_role_permissions.py +4 -2
- zenml/zen_stores/migrations/versions/5cc3f41cf048_add_save_models_to_registry.py +1 -0
- zenml/zen_stores/migrations/versions/6119cd9b93c2_tags_table.py +1 -0
- zenml/zen_stores/migrations/versions/623a234c11f5_add_sdk_docs_url_to_flavors.py +1 -0
- zenml/zen_stores/migrations/versions/6917bce75069_add_pipeline_run_unique_constraint.py +5 -4
- zenml/zen_stores/migrations/versions/6a28c4fd0ef2_add_caching_info.py +1 -0
- zenml/zen_stores/migrations/versions/6f707b385dc1_fix_model_artifacts.py +1 -0
- zenml/zen_stores/migrations/versions/722392c91006_make_is_service_account_mandatory.py +1 -0
- zenml/zen_stores/migrations/versions/72675226b2de_unique_users.py +31 -0
- zenml/zen_stores/migrations/versions/72722dee4686_track_server_version.py +1 -0
- zenml/zen_stores/migrations/versions/7280c14811d6_use_text_type.py +1 -0
- zenml/zen_stores/migrations/versions/728c6369cfaa_add_name_column_to_input_artifact_pk.py +4 -2
- zenml/zen_stores/migrations/versions/729263e47b55_fix_external_input_artifacts.py +1 -0
- zenml/zen_stores/migrations/versions/743ec82b1b3c_update_size_of_build_images.py +3 -2
- zenml/zen_stores/migrations/versions/7500f434b71c_remove_shared_columns.py +4 -2
- zenml/zen_stores/migrations/versions/76a7b9451ccd_add_build_template_deployment_id.py +52 -0
- zenml/zen_stores/migrations/versions/7834208cc3f6_artifact_project_scoping.py +9 -7
- zenml/zen_stores/migrations/versions/7b651bf6822e_track_secrets_in_db.py +7 -7
- zenml/zen_stores/migrations/versions/7d1919bb1ef0_add_run_templates.py +100 -0
- zenml/zen_stores/migrations/versions/7e4a481d17f7_add_identity_table.py +3 -2
- zenml/zen_stores/migrations/versions/7f603e583dd7_fixed_migration.py +2 -1
- zenml/zen_stores/migrations/versions/86fa52918b54_remove_teams_and_roles.py +1 -0
- zenml/zen_stores/migrations/versions/8a64fbfecda0_add_num_outputs_to_run_step.py +1 -0
- zenml/zen_stores/migrations/versions/8ed03137cacc_polymorthic_run_metadata.py +1 -0
- zenml/zen_stores/migrations/versions/904464ea4041_add_pipeline_model_run_unique_constraints.py +192 -0
- zenml/zen_stores/migrations/versions/909550c7c4da_remove_user_hub_token.py +36 -0
- zenml/zen_stores/migrations/versions/93cbda80a732_add_service_accounts.py +1 -0
- zenml/zen_stores/migrations/versions/979eff8fc4b1_add_code_repo_description_and_logo_url.py +1 -0
- zenml/zen_stores/migrations/versions/9971237fa937_artifact_visualizations.py +1 -0
- zenml/zen_stores/migrations/versions/9d8020441014_increase_step_configuration_length.py +1 -0
- zenml/zen_stores/migrations/versions/a1237ba94fd8_add_model_version_producer_run_unique_.py +68 -0
- zenml/zen_stores/migrations/versions/a39c4184c8ce_remove_secrets_manager_flavors.py +3 -2
- zenml/zen_stores/migrations/versions/a91762e6be36_artifact_version_table.py +5 -4
- zenml/zen_stores/migrations/versions/ade72effebaf_added_logs_table.py +1 -0
- zenml/zen_stores/migrations/versions/alembic_start.py +2 -1
- zenml/zen_stores/migrations/versions/b4eccf34dfa3_add_hub_token_to_user_model.py +1 -0
- zenml/zen_stores/migrations/versions/b4fca5241eea_migrate_onboarding_state.py +167 -0
- zenml/zen_stores/migrations/versions/b557b2871693_update_step_run_input_types.py +33 -0
- zenml/zen_stores/migrations/versions/b59aa68fdb1f_simplify_pipelines.py +139 -0
- zenml/zen_stores/migrations/versions/b73bc71f1106_remove_component_spec_path.py +36 -0
- zenml/zen_stores/migrations/versions/bf2120261b5a_add_configured_model_version_id.py +74 -0
- zenml/zen_stores/migrations/versions/c1b18cec3a48_increase_length_on_flavor_config_schema.py +1 -0
- zenml/zen_stores/migrations/versions/c22561cbb3a9_add_artifact_unique_constraints.py +86 -0
- zenml/zen_stores/migrations/versions/cc269488e5a9_separate_run_metadata.py +135 -0
- zenml/zen_stores/migrations/versions/cc9894cb58aa_add_user_metadata.py +41 -0
- zenml/zen_stores/migrations/versions/ccd68b7825ae_add_status_to_pipeline_and_step_run.py +1 -0
- zenml/zen_stores/migrations/versions/d02b3d3464cf_add_orchestrator_run_id_column.py +1 -0
- zenml/zen_stores/migrations/versions/d26471b6fe8f_update_build_filtering.py +1 -0
- zenml/zen_stores/migrations/versions/d7b3acf9aa46_create_schedule_table.py +1 -0
- zenml/zen_stores/migrations/versions/e1d66d91a099_add_stack_and_component_spec_paths_to_.py +1 -0
- zenml/zen_stores/migrations/versions/e5225281b4d3_add_connector_skew_tolerance.py +1 -0
- zenml/zen_stores/migrations/versions/e65aa6708ff7_pipeline_versioning.py +1 -0
- zenml/zen_stores/migrations/versions/ec0d785ca296_create_run_metadata_table.py +1 -0
- zenml/zen_stores/migrations/versions/ec6307720f92_simplify_model_version_links.py +119 -0
- zenml/zen_stores/migrations/versions/f3b3964e3a0f_add_oauth_devices.py +1 -0
- zenml/zen_stores/migrations/versions/f49904a80aa7_increase_length_of_artifact_table_sources.py +1 -0
- zenml/zen_stores/migrations/versions/fbd7f18ced1e_increase_step_run_field_lengths.py +5 -4
- zenml/zen_stores/rest_zen_store.py +1326 -305
- zenml/zen_stores/schemas/__init__.py +22 -3
- zenml/zen_stores/schemas/action_schemas.py +192 -0
- zenml/zen_stores/schemas/api_key_schemas.py +23 -10
- zenml/zen_stores/schemas/artifact_schemas.py +112 -49
- zenml/zen_stores/schemas/artifact_visualization_schemas.py +17 -8
- zenml/zen_stores/schemas/base_schemas.py +27 -0
- zenml/zen_stores/schemas/code_repository_schemas.py +25 -10
- zenml/zen_stores/schemas/component_schemas.py +74 -11
- zenml/zen_stores/schemas/constants.py +16 -0
- zenml/zen_stores/schemas/device_schemas.py +29 -15
- zenml/zen_stores/schemas/event_source_schemas.py +188 -0
- zenml/zen_stores/schemas/flavor_schemas.py +19 -9
- zenml/zen_stores/schemas/logs_schemas.py +12 -6
- zenml/zen_stores/schemas/model_schemas.py +192 -139
- zenml/zen_stores/schemas/pipeline_build_schemas.py +16 -16
- zenml/zen_stores/schemas/pipeline_deployment_schemas.py +58 -17
- zenml/zen_stores/schemas/pipeline_run_schemas.py +170 -35
- zenml/zen_stores/schemas/pipeline_schemas.py +51 -33
- zenml/zen_stores/schemas/run_metadata_schemas.py +28 -78
- zenml/zen_stores/schemas/run_template_schemas.py +267 -0
- zenml/zen_stores/schemas/schedule_schema.py +15 -5
- zenml/zen_stores/schemas/secret_schemas.py +18 -10
- zenml/zen_stores/schemas/server_settings_schemas.py +129 -0
- zenml/zen_stores/schemas/service_connector_schemas.py +13 -6
- zenml/zen_stores/schemas/service_schemas.py +258 -0
- zenml/zen_stores/schemas/stack_schemas.py +23 -6
- zenml/zen_stores/schemas/step_run_schemas.py +132 -41
- zenml/zen_stores/schemas/tag_schemas.py +31 -50
- zenml/zen_stores/schemas/trigger_schemas.py +316 -0
- zenml/zen_stores/schemas/user_schemas.py +66 -23
- zenml/zen_stores/schemas/utils.py +112 -0
- zenml/zen_stores/schemas/workspace_schemas.py +36 -19
- zenml/zen_stores/secrets_stores/aws_secrets_store.py +41 -32
- zenml/zen_stores/secrets_stores/azure_secrets_store.py +20 -23
- zenml/zen_stores/secrets_stores/base_secrets_store.py +80 -12
- zenml/zen_stores/secrets_stores/gcp_secrets_store.py +42 -33
- zenml/zen_stores/secrets_stores/hashicorp_secrets_store.py +7 -11
- zenml/zen_stores/secrets_stores/secrets_store_interface.py +1 -0
- zenml/zen_stores/secrets_stores/service_connector_secrets_store.py +15 -8
- zenml/zen_stores/secrets_stores/sql_secrets_store.py +8 -9
- zenml/zen_stores/sql_zen_store.py +4062 -799
- zenml/zen_stores/template_utils.py +263 -0
- zenml/zen_stores/zen_store_interface.py +614 -44
- zenml_nightly-0.72.0.dev20250116.dist-info/METADATA +486 -0
- zenml_nightly-0.72.0.dev20250116.dist-info/RECORD +1294 -0
- {zenml_nightly-0.55.0.dev20240124.dist-info → zenml_nightly-0.72.0.dev20250116.dist-info}/WHEEL +1 -1
- CLA.md +0 -110
- CODE-OF-CONDUCT.md +0 -132
- CONTRIBUTING.md +0 -260
- README.md +0 -304
- RELEASE_NOTES.md +0 -3919
- ROADMAP.md +0 -5
- SECURITY.md +0 -15
- zenml/_hub/client.py +0 -285
- zenml/_hub/constants.py +0 -21
- zenml/_hub/utils.py +0 -80
- zenml/api.py +0 -61
- zenml/cli/hub.py +0 -1115
- zenml/cli/stack_recipes.py +0 -469
- zenml/integrations/gcp/google_cloud_function.py +0 -187
- zenml/integrations/gcp/google_cloud_scheduler.py +0 -83
- zenml/integrations/gcp/orchestrators/vertex_scheduler/main.py +0 -91
- zenml/integrations/gcp/orchestrators/vertex_scheduler/requirements.txt +0 -2
- zenml/integrations/kserve/__init__.py +0 -57
- zenml/integrations/kserve/custom_deployer/zenml_custom_model.py +0 -175
- zenml/integrations/kserve/flavors/kserve_model_deployer_flavor.py +0 -137
- zenml/integrations/kserve/model_deployers/kserve_model_deployer.py +0 -1003
- zenml/integrations/kserve/secret_schemas/secret_schemas.py +0 -65
- zenml/integrations/kserve/services/kserve_deployment.py +0 -596
- zenml/integrations/kserve/steps/__init__.py +0 -22
- zenml/integrations/kserve/steps/kserve_deployer.py +0 -472
- zenml/integrations/kserve/steps/kserve_step_utils.py +0 -293
- zenml/integrations/kubeflow/utils.py +0 -96
- zenml/lineage_graph/lineage_graph.py +0 -244
- zenml/lineage_graph/node/artifact_node.py +0 -52
- zenml/lineage_graph/node/step_node.py +0 -41
- zenml/models/v2/base/internal.py +0 -37
- zenml/models/v2/base/update.py +0 -40
- zenml/models/v2/misc/hub_plugin_models.py +0 -79
- zenml/new/pipelines/deserialization_utils.py +0 -291
- zenml/new/pipelines/model_utils.py +0 -72
- zenml/new/pipelines/pipeline_decorator.py +0 -109
- zenml/new/steps/step_decorator.py +0 -160
- zenml/pipelines/base_pipeline.py +0 -274
- zenml/post_execution/pipeline.py +0 -58
- zenml/post_execution/pipeline_run.py +0 -55
- zenml/services/service_registry.py +0 -214
- zenml/services/terraform/__init__.py +0 -14
- zenml/services/terraform/terraform_service.py +0 -441
- zenml/steps/step_environment.py +0 -108
- zenml/steps/step_output.py +0 -36
- zenml/utils/mlstacks_utils.py +0 -635
- zenml/utils/terraform_utils.py +0 -42
- zenml/zen_server/dashboard/_redirects +0 -1
- zenml/zen_server/dashboard/asset-manifest.json +0 -131
- zenml/zen_server/dashboard/manifest.json +0 -25
- zenml/zen_server/dashboard/precache-manifest.c139638dcc4d9d3425353266447a2fad.js +0 -462
- zenml/zen_server/dashboard/robots.txt +0 -2
- zenml/zen_server/dashboard/service-worker.js +0 -39
- zenml/zen_server/dashboard/static/css/2.5b37d44a.chunk.css +0 -16
- zenml/zen_server/dashboard/static/css/2.5b37d44a.chunk.css.map +0 -1
- zenml/zen_server/dashboard/static/css/main.77e46c35.chunk.css +0 -2
- zenml/zen_server/dashboard/static/css/main.77e46c35.chunk.css.map +0 -1
- zenml/zen_server/dashboard/static/js/2.bb4cef22.chunk.js +0 -3
- zenml/zen_server/dashboard/static/js/2.bb4cef22.chunk.js.LICENSE.txt +0 -95
- zenml/zen_server/dashboard/static/js/2.bb4cef22.chunk.js.map +0 -1
- zenml/zen_server/dashboard/static/js/main.270838b4.chunk.js +0 -2
- zenml/zen_server/dashboard/static/js/main.270838b4.chunk.js.map +0 -1
- zenml/zen_server/dashboard/static/js/runtime-main.bfca2edd.js +0 -2
- zenml/zen_server/dashboard/static/js/runtime-main.bfca2edd.js.map +0 -1
- zenml/zen_server/dashboard/static/media/AlertTriangle.28aee535.svg +0 -5
- zenml/zen_server/dashboard/static/media/ArrowSquareOut.abfb9bc7.svg +0 -5
- zenml/zen_server/dashboard/static/media/Back.86c23a22.svg +0 -4
- zenml/zen_server/dashboard/static/media/BookOpen.5cb101ff.svg +0 -4
- zenml/zen_server/dashboard/static/media/BoundingBox.1eb98717.svg +0 -10
- zenml/zen_server/dashboard/static/media/Burger.9b1c67d7.svg +0 -3
- zenml/zen_server/dashboard/static/media/Cached.2381fb8d.svg +0 -1
- zenml/zen_server/dashboard/static/media/Calendar.356e11c7.svg +0 -3
- zenml/zen_server/dashboard/static/media/ChartBarHorizontal.0247447b.svg +0 -6
- zenml/zen_server/dashboard/static/media/ChartLine.0d79e18d.svg +0 -4
- zenml/zen_server/dashboard/static/media/ChatDots.2e1c9211.svg +0 -6
- zenml/zen_server/dashboard/static/media/Check.dad6beb2.svg +0 -3
- zenml/zen_server/dashboard/static/media/CheckCircleFilled.c19566d0.svg +0 -3
- zenml/zen_server/dashboard/static/media/Checkbox.af50e31e.svg +0 -3
- zenml/zen_server/dashboard/static/media/ChevronDown.f860ce32.svg +0 -3
- zenml/zen_server/dashboard/static/media/ChevronDownLight.6642d756.svg +0 -3
- zenml/zen_server/dashboard/static/media/ChevronLeft.f6edfcdb.svg +0 -3
- zenml/zen_server/dashboard/static/media/CircleCheck.f98fd6ca.svg +0 -1
- zenml/zen_server/dashboard/static/media/Clock.ffc9de95.svg +0 -3
- zenml/zen_server/dashboard/static/media/Close.74e9efbc.svg +0 -5
- zenml/zen_server/dashboard/static/media/CloseWithBorder.6960930a.svg +0 -3
- zenml/zen_server/dashboard/static/media/CloseWithoutBorder.cd6f71df.svg +0 -3
- zenml/zen_server/dashboard/static/media/CloudArrowUp.0aecb235.svg +0 -6
- zenml/zen_server/dashboard/static/media/Code.ef0f33b5.svg +0 -3
- zenml/zen_server/dashboard/static/media/Config.0be63f8a.svg +0 -1
- zenml/zen_server/dashboard/static/media/Connector.9fd46ef1.svg +0 -10
- zenml/zen_server/dashboard/static/media/Copy.36e2112a.svg +0 -1
- zenml/zen_server/dashboard/static/media/Dashboard.d05787e0.svg +0 -3
- zenml/zen_server/dashboard/static/media/Data.b1c3b5f8.svg +0 -3
- zenml/zen_server/dashboard/static/media/Delete.3c361b28.svg +0 -8
- zenml/zen_server/dashboard/static/media/Docs.7541d478.svg +0 -7
- zenml/zen_server/dashboard/static/media/Download.fba04d87.svg +0 -5
- zenml/zen_server/dashboard/static/media/Edit.490eb294.svg +0 -6
- zenml/zen_server/dashboard/static/media/EmptyRightArrow.23749d01.svg +0 -3
- zenml/zen_server/dashboard/static/media/Example.6396cd37.svg +0 -5
- zenml/zen_server/dashboard/static/media/Extension.1394cd4a.svg +0 -3
- zenml/zen_server/dashboard/static/media/Eye.d9e4ee62.svg +0 -4
- zenml/zen_server/dashboard/static/media/Failed.0213c1a0.svg +0 -1
- zenml/zen_server/dashboard/static/media/FileText.1f15bacd.svg +0 -7
- zenml/zen_server/dashboard/static/media/Filter.ab6b9c0d.svg +0 -3
- zenml/zen_server/dashboard/static/media/Folders.12b29887.svg +0 -5
- zenml/zen_server/dashboard/static/media/FunnelFill.6df4c143.svg +0 -3
- zenml/zen_server/dashboard/static/media/GitCommit.7dd9c2aa.svg +0 -5
- zenml/zen_server/dashboard/static/media/GitHub_Logo.cefc2023.png +0 -0
- zenml/zen_server/dashboard/static/media/Graph.2c63a892.svg +0 -11
- zenml/zen_server/dashboard/static/media/History.08329240.svg +0 -3
- zenml/zen_server/dashboard/static/media/Home.0843b0d5.svg +0 -3
- zenml/zen_server/dashboard/static/media/ImageBuilder.ea762d9c.svg +0 -6
- zenml/zen_server/dashboard/static/media/InProgress.304a0edc.svg +0 -1
- zenml/zen_server/dashboard/static/media/Info.9fe10c5c.svg +0 -3
- zenml/zen_server/dashboard/static/media/KeyboardReturn.491afbe3.svg +0 -3
- zenml/zen_server/dashboard/static/media/Link.72bbb55d.svg +0 -4
- zenml/zen_server/dashboard/static/media/Lock.30f5e1fe.svg +0 -5
- zenml/zen_server/dashboard/static/media/Lock2.a769ea52.svg +0 -3
- zenml/zen_server/dashboard/static/media/LockKey.92f21621.svg +0 -6
- zenml/zen_server/dashboard/static/media/Logs.8bf4d005.svg +0 -5
- zenml/zen_server/dashboard/static/media/MinusCircle.4188f418.svg +0 -4
- zenml/zen_server/dashboard/static/media/ModelRegistry.f0de050a.svg +0 -6
- zenml/zen_server/dashboard/static/media/MultiUser.a2ba7c67.svg +0 -10
- zenml/zen_server/dashboard/static/media/PaginationFirst.92628634.svg +0 -4
- zenml/zen_server/dashboard/static/media/PaginationLast.00d3c732.svg +0 -4
- zenml/zen_server/dashboard/static/media/PaginationNext.86158845.svg +0 -3
- zenml/zen_server/dashboard/static/media/PaginationPrev.60c18a88.svg +0 -3
- zenml/zen_server/dashboard/static/media/Pen.f2d831d4.svg +0 -6
- zenml/zen_server/dashboard/static/media/PhotoCamera.179d6d4c.svg +0 -3
- zenml/zen_server/dashboard/static/media/Pipeline.30d298b0.svg +0 -7
- zenml/zen_server/dashboard/static/media/Plus.5aa1c16b.svg +0 -3
- zenml/zen_server/dashboard/static/media/PlusCircle.92d860dd.svg +0 -5
- zenml/zen_server/dashboard/static/media/Repositories.71a36b8c.svg +0 -3
- zenml/zen_server/dashboard/static/media/RightArrow.f30d3871.svg +0 -29
- zenml/zen_server/dashboard/static/media/Rocket.63bf7b9d.svg +0 -3
- zenml/zen_server/dashboard/static/media/RocketLaunch.1bff2b59.svg +0 -6
- zenml/zen_server/dashboard/static/media/Rubik-Medium.c87313aa.ttf +0 -0
- zenml/zen_server/dashboard/static/media/Rubik-Regular.b3d0902b.ttf +0 -0
- zenml/zen_server/dashboard/static/media/Run.daec4fb2.svg +0 -6
- zenml/zen_server/dashboard/static/media/Search.d1afcce5.svg +0 -4
- zenml/zen_server/dashboard/static/media/Settings.59ca73ae.svg +0 -4
- zenml/zen_server/dashboard/static/media/Share2.46c3ff66.svg +0 -3
- zenml/zen_server/dashboard/static/media/SignOut.6aa718c5.svg +0 -3
- zenml/zen_server/dashboard/static/media/SimplePlus.5cf7ec20.svg +0 -3
- zenml/zen_server/dashboard/static/media/SingleUser.bef3a095.svg +0 -4
- zenml/zen_server/dashboard/static/media/SourceCodePro-Regular.b484b32f.ttf +0 -0
- zenml/zen_server/dashboard/static/media/Stack.19b604ac.svg +0 -5
- zenml/zen_server/dashboard/static/media/StackComponent.b1ba90b5.svg +0 -4
- zenml/zen_server/dashboard/static/media/Star.f0c25022.svg +0 -9
- zenml/zen_server/dashboard/static/media/StarOutline.94ca8cd9.svg +0 -3
- zenml/zen_server/dashboard/static/media/Storefront.4b4796fe.svg +0 -3
- zenml/zen_server/dashboard/static/media/Stream.543e3039.svg +0 -3
- zenml/zen_server/dashboard/static/media/SupportAgent.510ddf1f.svg +0 -8
- zenml/zen_server/dashboard/static/media/Table.77033750.svg +0 -6
- zenml/zen_server/dashboard/static/media/Tool.d5785486.svg +0 -3
- zenml/zen_server/dashboard/static/media/UserPlus.741a99d7.svg +0 -6
- zenml/zen_server/dashboard/static/media/Verified.0625b2a0.svg +0 -3
- zenml/zen_server/dashboard/static/media/addNew.4fb6c939.svg +0 -8
- zenml/zen_server/dashboard/static/media/arrowClose.cbd53f3f.svg +0 -3
- zenml/zen_server/dashboard/static/media/arrowOpen.6ceef0af.svg +0 -3
- zenml/zen_server/dashboard/static/media/check_small.30bc0138.svg +0 -3
- zenml/zen_server/dashboard/static/media/circleArrowSideClose.98d6013e.svg +0 -18
- zenml/zen_server/dashboard/static/media/circleArrowSideOpen.63653df6.svg +0 -18
- zenml/zen_server/dashboard/static/media/image.104fd14b.png +0 -0
- zenml/zen_server/dashboard/static/media/imageAddIcon.e83004a9.svg +0 -7
- zenml/zen_server/dashboard/static/media/logo.93333e5c.svg +0 -1
- zenml/zen_server/dashboard/static/media/logo_small.4204397d.svg +0 -3
- zenml/zen_server/dashboard/static/media/logo_white.d4b4414e.svg +0 -20
- zenml/zen_server/dashboard/static/media/notConnected.5e2c8ea7.svg +0 -8
- zenml/zen_server/dashboard/static/media/plugin-fallback.72c294e6.svg +0 -6
- zenml/zen_server/dashboard/static/media/share.bcd998b0.svg +0 -5
- zenml/zen_server/dashboard/static/media/stars.08a9b19a.svg +0 -8
- zenml/zen_server/deploy/terraform/__init__.py +0 -41
- zenml/zen_server/deploy/terraform/providers/__init__.py +0 -14
- zenml/zen_server/deploy/terraform/providers/aws_provider.py +0 -61
- zenml/zen_server/deploy/terraform/providers/azure_provider.py +0 -59
- zenml/zen_server/deploy/terraform/providers/gcp_provider.py +0 -59
- zenml/zen_server/deploy/terraform/providers/terraform_provider.py +0 -332
- zenml/zen_server/deploy/terraform/recipes/aws/.gitignore +0 -8
- zenml/zen_server/deploy/terraform/recipes/aws/helm.tf +0 -20
- zenml/zen_server/deploy/terraform/recipes/aws/ingress.tf +0 -30
- zenml/zen_server/deploy/terraform/recipes/aws/outputs.tf +0 -14
- zenml/zen_server/deploy/terraform/recipes/aws/printf.cmd +0 -2
- zenml/zen_server/deploy/terraform/recipes/aws/sql.tf +0 -62
- zenml/zen_server/deploy/terraform/recipes/aws/terraform.tf +0 -44
- zenml/zen_server/deploy/terraform/recipes/aws/variables.tf +0 -179
- zenml/zen_server/deploy/terraform/recipes/aws/vpc.tf +0 -47
- zenml/zen_server/deploy/terraform/recipes/aws/zen_server.tf +0 -111
- zenml/zen_server/deploy/terraform/recipes/azure/.gitignore +0 -8
- zenml/zen_server/deploy/terraform/recipes/azure/helm.tf +0 -20
- zenml/zen_server/deploy/terraform/recipes/azure/ingress.tf +0 -30
- zenml/zen_server/deploy/terraform/recipes/azure/key_vault.tf +0 -73
- zenml/zen_server/deploy/terraform/recipes/azure/outputs.tf +0 -14
- zenml/zen_server/deploy/terraform/recipes/azure/printf.cmd +0 -2
- zenml/zen_server/deploy/terraform/recipes/azure/rg.tf +0 -36
- zenml/zen_server/deploy/terraform/recipes/azure/sql.tf +0 -65
- zenml/zen_server/deploy/terraform/recipes/azure/terraform.tf +0 -52
- zenml/zen_server/deploy/terraform/recipes/azure/variables.tf +0 -188
- zenml/zen_server/deploy/terraform/recipes/azure/zen_server.tf +0 -111
- zenml/zen_server/deploy/terraform/recipes/gcp/.gitignore +0 -8
- zenml/zen_server/deploy/terraform/recipes/gcp/helm.tf +0 -20
- zenml/zen_server/deploy/terraform/recipes/gcp/ingress.tf +0 -30
- zenml/zen_server/deploy/terraform/recipes/gcp/outputs.tf +0 -14
- zenml/zen_server/deploy/terraform/recipes/gcp/printf.cmd +0 -2
- zenml/zen_server/deploy/terraform/recipes/gcp/sql.tf +0 -64
- zenml/zen_server/deploy/terraform/recipes/gcp/terraform.tf +0 -44
- zenml/zen_server/deploy/terraform/recipes/gcp/variables.tf +0 -183
- zenml/zen_server/deploy/terraform/recipes/gcp/zen_server.tf +0 -122
- zenml/zen_server/deploy/terraform/terraform_zen_server.py +0 -255
- zenml/zen_server/routers/run_metadata_endpoints.py +0 -97
- zenml_nightly-0.55.0.dev20240124.dist-info/METADATA +0 -438
- zenml_nightly-0.55.0.dev20240124.dist-info/RECORD +0 -1072
- {zenml_nightly-0.55.0.dev20240124.dist-info → zenml_nightly-0.72.0.dev20250116.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.55.0.dev20240124.dist-info → zenml_nightly-0.72.0.dev20250116.dist-info}/entry_points.txt +0 -0
@@ -12,14 +12,12 @@
|
|
12
12
|
# or implied. See the License for the specific language governing
|
13
13
|
# permissions and limitations under the License.
|
14
14
|
"""Definition of a ZenML pipeline."""
|
15
|
+
|
15
16
|
import copy
|
16
17
|
import hashlib
|
17
18
|
import inspect
|
18
|
-
from collections import defaultdict
|
19
19
|
from contextlib import contextmanager
|
20
|
-
from datetime import datetime
|
21
20
|
from pathlib import Path
|
22
|
-
from types import FunctionType
|
23
21
|
from typing import (
|
24
22
|
TYPE_CHECKING,
|
25
23
|
Any,
|
@@ -38,7 +36,8 @@ from typing import (
|
|
38
36
|
from uuid import UUID
|
39
37
|
|
40
38
|
import yaml
|
41
|
-
from pydantic import ValidationError
|
39
|
+
from pydantic import ConfigDict, ValidationError
|
40
|
+
from typing_extensions import Self
|
42
41
|
|
43
42
|
from zenml import constants
|
44
43
|
from zenml.analytics.enums import AnalyticsEvent
|
@@ -53,7 +52,8 @@ from zenml.config.pipeline_run_configuration import PipelineRunConfiguration
|
|
53
52
|
from zenml.config.pipeline_spec import PipelineSpec
|
54
53
|
from zenml.config.schedule import Schedule
|
55
54
|
from zenml.config.step_configurations import StepConfigurationUpdate
|
56
|
-
from zenml.enums import
|
55
|
+
from zenml.enums import StackComponentType
|
56
|
+
from zenml.exceptions import EntityExistsError
|
57
57
|
from zenml.hooks.hook_validators import resolve_and_validate_hook
|
58
58
|
from zenml.logger import get_logger
|
59
59
|
from zenml.models import (
|
@@ -65,13 +65,16 @@ from zenml.models import (
|
|
65
65
|
PipelineDeploymentResponse,
|
66
66
|
PipelineRequest,
|
67
67
|
PipelineResponse,
|
68
|
-
PipelineRunRequest,
|
69
68
|
PipelineRunResponse,
|
69
|
+
RunTemplateResponse,
|
70
70
|
ScheduleRequest,
|
71
71
|
)
|
72
|
-
from zenml.
|
73
|
-
from zenml.
|
74
|
-
|
72
|
+
from zenml.pipelines import build_utils
|
73
|
+
from zenml.pipelines.run_utils import (
|
74
|
+
create_placeholder_run,
|
75
|
+
deploy_pipeline,
|
76
|
+
upload_notebook_cell_code_if_necessary,
|
77
|
+
)
|
75
78
|
from zenml.stack import Stack
|
76
79
|
from zenml.steps import BaseStep
|
77
80
|
from zenml.steps.entrypoint_function_utils import (
|
@@ -80,29 +83,33 @@ from zenml.steps.entrypoint_function_utils import (
|
|
80
83
|
from zenml.steps.step_invocation import StepInvocation
|
81
84
|
from zenml.utils import (
|
82
85
|
code_repository_utils,
|
86
|
+
code_utils,
|
83
87
|
dashboard_utils,
|
84
88
|
dict_utils,
|
89
|
+
env_utils,
|
85
90
|
pydantic_utils,
|
86
91
|
settings_utils,
|
87
92
|
source_utils,
|
88
93
|
yaml_utils,
|
89
94
|
)
|
95
|
+
from zenml.utils.string_utils import format_name_template
|
90
96
|
|
91
97
|
if TYPE_CHECKING:
|
92
98
|
from zenml.artifacts.external_artifact import ExternalArtifact
|
99
|
+
from zenml.client_lazy_loader import ClientLazyLoader
|
93
100
|
from zenml.config.base_settings import SettingsOrDict
|
94
101
|
from zenml.config.source import Source
|
95
102
|
from zenml.model.lazy_load import ModelVersionDataLazyLoader
|
96
103
|
from zenml.model.model import Model
|
104
|
+
from zenml.models import ArtifactVersionResponse
|
105
|
+
from zenml.types import HookSpecification
|
97
106
|
|
98
107
|
StepConfigurationUpdateOrDict = Union[
|
99
108
|
Dict[str, Any], StepConfigurationUpdate
|
100
109
|
]
|
101
|
-
HookSpecification = Union[str, "Source", FunctionType]
|
102
110
|
|
103
111
|
logger = get_logger(__name__)
|
104
112
|
|
105
|
-
T = TypeVar("T", bound="Pipeline")
|
106
113
|
F = TypeVar("F", bound=Callable[..., None])
|
107
114
|
|
108
115
|
|
@@ -123,10 +130,12 @@ class Pipeline:
|
|
123
130
|
enable_artifact_visualization: Optional[bool] = None,
|
124
131
|
enable_step_logs: Optional[bool] = None,
|
125
132
|
settings: Optional[Mapping[str, "SettingsOrDict"]] = None,
|
133
|
+
tags: Optional[List[str]] = None,
|
126
134
|
extra: Optional[Dict[str, Any]] = None,
|
127
135
|
on_failure: Optional["HookSpecification"] = None,
|
128
136
|
on_success: Optional["HookSpecification"] = None,
|
129
137
|
model: Optional["Model"] = None,
|
138
|
+
substitutions: Optional[Dict[str, str]] = None,
|
130
139
|
) -> None:
|
131
140
|
"""Initializes a pipeline.
|
132
141
|
|
@@ -139,7 +148,8 @@ class Pipeline:
|
|
139
148
|
enable_artifact_visualization: If artifact visualization should be
|
140
149
|
enabled for this pipeline.
|
141
150
|
enable_step_logs: If step logs should be enabled for this pipeline.
|
142
|
-
settings:
|
151
|
+
settings: Settings for this pipeline.
|
152
|
+
tags: Tags to apply to runs of this pipeline.
|
143
153
|
extra: Extra configurations for this pipeline.
|
144
154
|
on_failure: Callback function in event of failure of the step. Can
|
145
155
|
be a function with a single argument of type `BaseException`, or
|
@@ -148,6 +158,7 @@ class Pipeline:
|
|
148
158
|
be a function with no arguments, or a source path to such a
|
149
159
|
function (e.g. `module.my_function`).
|
150
160
|
model: configuration of the model in the Model Control Plane.
|
161
|
+
substitutions: Extra placeholders to use in the name templates.
|
151
162
|
"""
|
152
163
|
self._invocations: Dict[str, StepInvocation] = {}
|
153
164
|
self._run_args: Dict[str, Any] = {}
|
@@ -163,16 +174,17 @@ class Pipeline:
|
|
163
174
|
enable_artifact_visualization=enable_artifact_visualization,
|
164
175
|
enable_step_logs=enable_step_logs,
|
165
176
|
settings=settings,
|
177
|
+
tags=tags,
|
166
178
|
extra=extra,
|
167
179
|
on_failure=on_failure,
|
168
180
|
on_success=on_success,
|
169
181
|
model=model,
|
182
|
+
substitutions=substitutions,
|
170
183
|
)
|
171
184
|
self.entrypoint = entrypoint
|
172
185
|
self._parameters: Dict[str, Any] = {}
|
173
186
|
|
174
187
|
self.__suppress_warnings_flag__ = False
|
175
|
-
self.__new_unnamed_model_versions_in_current_run__: Dict[str, int] = {}
|
176
188
|
|
177
189
|
@property
|
178
190
|
def name(self) -> str:
|
@@ -239,20 +251,6 @@ class Pipeline:
|
|
239
251
|
"""
|
240
252
|
return inspect.getsource(self.source_object)
|
241
253
|
|
242
|
-
@classmethod
|
243
|
-
def from_model(cls, model: "PipelineResponse") -> "Pipeline":
|
244
|
-
"""Creates a pipeline instance from a model.
|
245
|
-
|
246
|
-
Args:
|
247
|
-
model: The model to load the pipeline instance from.
|
248
|
-
|
249
|
-
Returns:
|
250
|
-
The pipeline instance.
|
251
|
-
"""
|
252
|
-
from zenml.new.pipelines.deserialization_utils import load_pipeline
|
253
|
-
|
254
|
-
return load_pipeline(model=model)
|
255
|
-
|
256
254
|
@property
|
257
255
|
def model(self) -> "PipelineResponse":
|
258
256
|
"""Gets the registered pipeline model for this instance.
|
@@ -265,21 +263,14 @@ class Pipeline:
|
|
265
263
|
"""
|
266
264
|
self._prepare_if_possible()
|
267
265
|
|
268
|
-
|
269
|
-
version_hash = self._compute_unique_identifier(
|
270
|
-
pipeline_spec=pipeline_spec
|
271
|
-
)
|
272
|
-
|
273
|
-
pipelines = Client().list_pipelines(
|
274
|
-
name=self.name, version_hash=version_hash
|
275
|
-
)
|
266
|
+
pipelines = Client().list_pipelines(name=self.name)
|
276
267
|
if len(pipelines) == 1:
|
277
268
|
return pipelines.items[0]
|
278
269
|
|
279
270
|
raise RuntimeError(
|
280
271
|
f"Cannot get the model of pipeline '{self.name}' because it has "
|
281
272
|
f"not been registered yet. Please ensure that the pipeline has "
|
282
|
-
f"been run
|
273
|
+
f"been run or built and try again."
|
283
274
|
)
|
284
275
|
|
285
276
|
@contextmanager
|
@@ -296,19 +287,21 @@ class Pipeline:
|
|
296
287
|
self.__suppress_warnings_flag__ = False
|
297
288
|
|
298
289
|
def configure(
|
299
|
-
self
|
290
|
+
self,
|
300
291
|
enable_cache: Optional[bool] = None,
|
301
292
|
enable_artifact_metadata: Optional[bool] = None,
|
302
293
|
enable_artifact_visualization: Optional[bool] = None,
|
303
294
|
enable_step_logs: Optional[bool] = None,
|
304
295
|
settings: Optional[Mapping[str, "SettingsOrDict"]] = None,
|
296
|
+
tags: Optional[List[str]] = None,
|
305
297
|
extra: Optional[Dict[str, Any]] = None,
|
306
298
|
on_failure: Optional["HookSpecification"] = None,
|
307
299
|
on_success: Optional["HookSpecification"] = None,
|
308
300
|
model: Optional["Model"] = None,
|
309
301
|
parameters: Optional[Dict[str, Any]] = None,
|
310
302
|
merge: bool = True,
|
311
|
-
|
303
|
+
substitutions: Optional[Dict[str, str]] = None,
|
304
|
+
) -> Self:
|
312
305
|
"""Configures the pipeline.
|
313
306
|
|
314
307
|
Configuration merging example:
|
@@ -329,6 +322,7 @@ class Pipeline:
|
|
329
322
|
enabled for this pipeline.
|
330
323
|
enable_step_logs: If step logs should be enabled for this pipeline.
|
331
324
|
settings: settings for this pipeline.
|
325
|
+
tags: Tags to apply to runs of this pipeline.
|
332
326
|
extra: Extra configurations for this pipeline.
|
333
327
|
on_failure: Callback function in event of failure of the step. Can
|
334
328
|
be a function with a single argument of type `BaseException`, or
|
@@ -343,6 +337,7 @@ class Pipeline:
|
|
343
337
|
method for an example.
|
344
338
|
model: configuration of the model version in the Model Control Plane.
|
345
339
|
parameters: input parameters for the pipeline.
|
340
|
+
substitutions: Extra placeholders to use in the name templates.
|
346
341
|
|
347
342
|
Returns:
|
348
343
|
The pipeline instance that this method was called on.
|
@@ -357,6 +352,11 @@ class Pipeline:
|
|
357
352
|
# string of on_success hook function to be used for this pipeline
|
358
353
|
success_hook_source = resolve_and_validate_hook(on_success)
|
359
354
|
|
355
|
+
if merge and tags and self._configuration.tags:
|
356
|
+
# Merge tags explicitly here as the recursive update later only
|
357
|
+
# merges dicts
|
358
|
+
tags = self._configuration.tags + tags
|
359
|
+
|
360
360
|
values = dict_utils.remove_none_values(
|
361
361
|
{
|
362
362
|
"enable_cache": enable_cache,
|
@@ -364,18 +364,20 @@ class Pipeline:
|
|
364
364
|
"enable_artifact_visualization": enable_artifact_visualization,
|
365
365
|
"enable_step_logs": enable_step_logs,
|
366
366
|
"settings": settings,
|
367
|
+
"tags": tags,
|
367
368
|
"extra": extra,
|
368
369
|
"failure_hook_source": failure_hook_source,
|
369
370
|
"success_hook_source": success_hook_source,
|
370
371
|
"model": model,
|
371
372
|
"parameters": parameters,
|
373
|
+
"substitutions": substitutions,
|
372
374
|
}
|
373
375
|
)
|
374
376
|
if not self.__suppress_warnings_flag__:
|
375
377
|
to_be_reapplied = []
|
376
378
|
for param_, value_ in values.items():
|
377
379
|
if (
|
378
|
-
param_ in PipelineRunConfiguration.
|
380
|
+
param_ in PipelineRunConfiguration.model_fields
|
379
381
|
and param_ in self._from_config_file
|
380
382
|
and value_ != self._from_config_file[param_]
|
381
383
|
):
|
@@ -386,16 +388,17 @@ class Pipeline:
|
|
386
388
|
msg = ""
|
387
389
|
reapply_during_run_warning = (
|
388
390
|
"The value of parameter '{name}' has changed from "
|
389
|
-
"'{file_value}' to '{new_value}' set in your configuration
|
391
|
+
"'{file_value}' to '{new_value}' set in your configuration "
|
392
|
+
"file.\n"
|
390
393
|
)
|
391
394
|
for name, file_value, new_value in to_be_reapplied:
|
392
395
|
msg += reapply_during_run_warning.format(
|
393
396
|
name=name, file_value=file_value, new_value=new_value
|
394
397
|
)
|
395
398
|
msg += (
|
396
|
-
"Configuration file value will be used during pipeline
|
397
|
-
"so you change will not be efficient. Consider
|
398
|
-
"configuration file instead."
|
399
|
+
"Configuration file value will be used during pipeline "
|
400
|
+
"run, so you change will not be efficient. Consider "
|
401
|
+
"updating your configuration file instead."
|
399
402
|
)
|
400
403
|
logger.warning(msg)
|
401
404
|
|
@@ -498,7 +501,9 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
498
501
|
self._prepare_if_possible()
|
499
502
|
integration_registry.activate_integrations()
|
500
503
|
|
501
|
-
if self.configuration.
|
504
|
+
if self.configuration.model_dump(
|
505
|
+
exclude_defaults=True, exclude={"name"}
|
506
|
+
):
|
502
507
|
logger.warning(
|
503
508
|
f"The pipeline `{self.name}` that you're registering has "
|
504
509
|
"custom configurations applied to it. These will not be "
|
@@ -508,8 +513,7 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
508
513
|
"pipeline build/run` commands."
|
509
514
|
)
|
510
515
|
|
511
|
-
|
512
|
-
return self._register(pipeline_spec=pipeline_spec)
|
516
|
+
return self._register()
|
513
517
|
|
514
518
|
def build(
|
515
519
|
self,
|
@@ -536,12 +540,19 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
536
540
|
"""
|
537
541
|
with track_handler(event=AnalyticsEvent.BUILD_PIPELINE):
|
538
542
|
self._prepare_if_possible()
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
543
|
+
|
544
|
+
compile_args = self._run_args.copy()
|
545
|
+
compile_args.pop("unlisted", None)
|
546
|
+
compile_args.pop("prevent_build_reuse", None)
|
547
|
+
if config_path:
|
548
|
+
compile_args["config_path"] = config_path
|
549
|
+
if step_configurations:
|
550
|
+
compile_args["step_configurations"] = step_configurations
|
551
|
+
if settings:
|
552
|
+
compile_args["settings"] = settings
|
553
|
+
|
554
|
+
deployment, _, _ = self._compile(**compile_args)
|
555
|
+
pipeline_id = self._register().id
|
545
556
|
|
546
557
|
local_repo = code_repository_utils.find_active_code_repository()
|
547
558
|
code_repository = build_utils.verify_local_repository_context(
|
@@ -554,7 +565,7 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
554
565
|
code_repository=code_repository,
|
555
566
|
)
|
556
567
|
|
557
|
-
def
|
568
|
+
def _create_deployment(
|
558
569
|
self,
|
559
570
|
*,
|
560
571
|
run_name: Optional[str] = None,
|
@@ -572,8 +583,9 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
572
583
|
config_path: Optional[str] = None,
|
573
584
|
unlisted: bool = False,
|
574
585
|
prevent_build_reuse: bool = False,
|
575
|
-
|
576
|
-
|
586
|
+
skip_schedule_registration: bool = False,
|
587
|
+
) -> PipelineDeploymentResponse:
|
588
|
+
"""Create a pipeline deployment.
|
577
589
|
|
578
590
|
Args:
|
579
591
|
run_name: Name of the pipeline run.
|
@@ -596,14 +608,163 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
596
608
|
method.
|
597
609
|
unlisted: Whether the pipeline run should be unlisted (not assigned
|
598
610
|
to any pipeline).
|
599
|
-
prevent_build_reuse:
|
611
|
+
prevent_build_reuse: DEPRECATED: Use
|
612
|
+
`DockerSettings.prevent_build_reuse` instead.
|
613
|
+
skip_schedule_registration: Whether to skip schedule registration.
|
614
|
+
|
615
|
+
Returns:
|
616
|
+
The pipeline deployment.
|
600
617
|
|
601
618
|
Raises:
|
602
|
-
|
619
|
+
ValueError: If the orchestrator doesn't support scheduling, but a
|
620
|
+
schedule was given
|
621
|
+
"""
|
622
|
+
deployment, schedule, build = self._compile(
|
623
|
+
config_path=config_path,
|
624
|
+
run_name=run_name,
|
625
|
+
enable_cache=enable_cache,
|
626
|
+
enable_artifact_metadata=enable_artifact_metadata,
|
627
|
+
enable_artifact_visualization=enable_artifact_visualization,
|
628
|
+
enable_step_logs=enable_step_logs,
|
629
|
+
steps=step_configurations,
|
630
|
+
settings=settings,
|
631
|
+
schedule=schedule,
|
632
|
+
build=build,
|
633
|
+
extra=extra,
|
634
|
+
)
|
635
|
+
|
636
|
+
skip_pipeline_registration = constants.handle_bool_env_var(
|
637
|
+
constants.ENV_ZENML_SKIP_PIPELINE_REGISTRATION,
|
638
|
+
default=False,
|
639
|
+
)
|
640
|
+
|
641
|
+
register_pipeline = not (skip_pipeline_registration or unlisted)
|
642
|
+
|
643
|
+
pipeline_id = None
|
644
|
+
if register_pipeline:
|
645
|
+
pipeline_id = self._register().id
|
646
|
+
|
647
|
+
else:
|
648
|
+
logger.debug(f"Pipeline {self.name} is unlisted.")
|
649
|
+
|
650
|
+
stack = Client().active_stack
|
651
|
+
stack.validate()
|
652
|
+
|
653
|
+
schedule_id = None
|
654
|
+
if schedule and not skip_schedule_registration:
|
655
|
+
if not stack.orchestrator.config.is_schedulable:
|
656
|
+
raise ValueError(
|
657
|
+
f"Stack {stack.name} does not support scheduling. "
|
658
|
+
"Not all orchestrator types support scheduling, "
|
659
|
+
"kindly consult with "
|
660
|
+
"https://docs.zenml.io/how-to/build-pipelines/schedule-a-pipeline "
|
661
|
+
"for details."
|
662
|
+
)
|
663
|
+
if schedule.name:
|
664
|
+
schedule_name = schedule.name
|
665
|
+
else:
|
666
|
+
schedule_name = format_name_template(
|
667
|
+
deployment.run_name_template,
|
668
|
+
substitutions=deployment.pipeline_configuration.substitutions,
|
669
|
+
)
|
670
|
+
components = Client().active_stack_model.components
|
671
|
+
orchestrator = components[StackComponentType.ORCHESTRATOR][0]
|
672
|
+
schedule_model = ScheduleRequest(
|
673
|
+
workspace=Client().active_workspace.id,
|
674
|
+
user=Client().active_user.id,
|
675
|
+
pipeline_id=pipeline_id,
|
676
|
+
orchestrator_id=orchestrator.id,
|
677
|
+
name=schedule_name,
|
678
|
+
active=True,
|
679
|
+
cron_expression=schedule.cron_expression,
|
680
|
+
start_time=schedule.start_time,
|
681
|
+
end_time=schedule.end_time,
|
682
|
+
interval_second=schedule.interval_second,
|
683
|
+
catchup=schedule.catchup,
|
684
|
+
run_once_start_time=schedule.run_once_start_time,
|
685
|
+
)
|
686
|
+
schedule_id = Client().zen_store.create_schedule(schedule_model).id
|
687
|
+
logger.info(
|
688
|
+
f"Created schedule `{schedule_name}` for pipeline "
|
689
|
+
f"`{deployment.pipeline_configuration.name}`."
|
690
|
+
)
|
691
|
+
|
692
|
+
stack = Client().active_stack
|
693
|
+
stack.validate()
|
694
|
+
upload_notebook_cell_code_if_necessary(
|
695
|
+
deployment=deployment, stack=stack
|
696
|
+
)
|
697
|
+
|
698
|
+
local_repo_context = (
|
699
|
+
code_repository_utils.find_active_code_repository()
|
700
|
+
)
|
701
|
+
code_repository = build_utils.verify_local_repository_context(
|
702
|
+
deployment=deployment, local_repo_context=local_repo_context
|
703
|
+
)
|
704
|
+
|
705
|
+
if prevent_build_reuse:
|
706
|
+
logger.warning(
|
707
|
+
"Passing `prevent_build_reuse=True` to "
|
708
|
+
"`pipeline.with_opitions(...)` is deprecated. Use "
|
709
|
+
"`DockerSettings.prevent_build_reuse` instead."
|
710
|
+
)
|
711
|
+
|
712
|
+
build_model = build_utils.reuse_or_create_pipeline_build(
|
713
|
+
deployment=deployment,
|
714
|
+
pipeline_id=pipeline_id,
|
715
|
+
allow_build_reuse=not prevent_build_reuse,
|
716
|
+
build=build,
|
717
|
+
code_repository=code_repository,
|
718
|
+
)
|
719
|
+
build_id = build_model.id if build_model else None
|
720
|
+
|
721
|
+
code_reference = None
|
722
|
+
if local_repo_context and not local_repo_context.is_dirty:
|
723
|
+
source_root = source_utils.get_source_root()
|
724
|
+
subdirectory = (
|
725
|
+
Path(source_root)
|
726
|
+
.resolve()
|
727
|
+
.relative_to(local_repo_context.root)
|
728
|
+
)
|
729
|
+
|
730
|
+
code_reference = CodeReferenceRequest(
|
731
|
+
commit=local_repo_context.current_commit,
|
732
|
+
subdirectory=subdirectory.as_posix(),
|
733
|
+
code_repository=local_repo_context.code_repository_id,
|
734
|
+
)
|
735
|
+
|
736
|
+
code_path = None
|
737
|
+
if build_utils.should_upload_code(
|
738
|
+
deployment=deployment,
|
739
|
+
build=build_model,
|
740
|
+
code_reference=code_reference,
|
741
|
+
):
|
742
|
+
code_archive = code_utils.CodeArchive(
|
743
|
+
root=source_utils.get_source_root()
|
744
|
+
)
|
745
|
+
logger.info("Archiving pipeline code...")
|
746
|
+
code_path = code_utils.upload_code_if_necessary(code_archive)
|
747
|
+
|
748
|
+
request = PipelineDeploymentRequest(
|
749
|
+
user=Client().active_user.id,
|
750
|
+
workspace=Client().active_workspace.id,
|
751
|
+
stack=stack.id,
|
752
|
+
pipeline=pipeline_id,
|
753
|
+
build=build_id,
|
754
|
+
schedule=schedule_id,
|
755
|
+
code_reference=code_reference,
|
756
|
+
code_path=code_path,
|
757
|
+
**deployment.model_dump(),
|
758
|
+
)
|
759
|
+
return Client().zen_store.create_deployment(deployment=request)
|
760
|
+
|
761
|
+
def _run(
|
762
|
+
self,
|
763
|
+
) -> Optional[PipelineRunResponse]:
|
764
|
+
"""Runs the pipeline on the active stack.
|
603
765
|
|
604
766
|
Returns:
|
605
|
-
|
606
|
-
running with a schedule.
|
767
|
+
The pipeline run or `None` if running with a schedule.
|
607
768
|
"""
|
608
769
|
if constants.SHOULD_PREVENT_PIPELINE_EXECUTION:
|
609
770
|
# An environment variable was set to stop the execution of
|
@@ -621,182 +782,35 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
621
782
|
logger.info(f"Initiating a new run for the pipeline: `{self.name}`.")
|
622
783
|
|
623
784
|
with track_handler(AnalyticsEvent.RUN_PIPELINE) as analytics_handler:
|
624
|
-
deployment, pipeline_spec, schedule, build = self._compile(
|
625
|
-
config_path=config_path,
|
626
|
-
run_name=run_name,
|
627
|
-
enable_cache=enable_cache,
|
628
|
-
enable_artifact_metadata=enable_artifact_metadata,
|
629
|
-
enable_artifact_visualization=enable_artifact_visualization,
|
630
|
-
enable_step_logs=enable_step_logs,
|
631
|
-
steps=step_configurations,
|
632
|
-
settings=settings,
|
633
|
-
schedule=schedule,
|
634
|
-
build=build,
|
635
|
-
extra=extra,
|
636
|
-
)
|
637
|
-
|
638
|
-
skip_pipeline_registration = constants.handle_bool_env_var(
|
639
|
-
constants.ENV_ZENML_SKIP_PIPELINE_REGISTRATION,
|
640
|
-
default=False,
|
641
|
-
)
|
642
|
-
|
643
|
-
register_pipeline = not (skip_pipeline_registration or unlisted)
|
644
|
-
|
645
|
-
pipeline_id = None
|
646
|
-
if register_pipeline:
|
647
|
-
pipeline_id = self._register(pipeline_spec=pipeline_spec).id
|
648
|
-
|
649
|
-
else:
|
650
|
-
logger.debug(f"Pipeline {self.name} is unlisted.")
|
651
|
-
|
652
|
-
# TODO: check whether orchestrator even support scheduling before
|
653
|
-
# registering the schedule
|
654
|
-
schedule_id = None
|
655
|
-
if schedule:
|
656
|
-
if schedule.name:
|
657
|
-
schedule_name = schedule.name
|
658
|
-
else:
|
659
|
-
date = datetime.utcnow().strftime("%Y_%m_%d")
|
660
|
-
time = datetime.utcnow().strftime("%H_%M_%S_%f")
|
661
|
-
schedule_name = deployment.run_name_template.format(
|
662
|
-
date=date, time=time
|
663
|
-
)
|
664
|
-
components = Client().active_stack_model.components
|
665
|
-
orchestrator = components[StackComponentType.ORCHESTRATOR][0]
|
666
|
-
schedule_model = ScheduleRequest(
|
667
|
-
workspace=Client().active_workspace.id,
|
668
|
-
user=Client().active_user.id,
|
669
|
-
pipeline_id=pipeline_id,
|
670
|
-
orchestrator_id=orchestrator.id,
|
671
|
-
name=schedule_name,
|
672
|
-
active=True,
|
673
|
-
cron_expression=schedule.cron_expression,
|
674
|
-
start_time=schedule.start_time,
|
675
|
-
end_time=schedule.end_time,
|
676
|
-
interval_second=schedule.interval_second,
|
677
|
-
catchup=schedule.catchup,
|
678
|
-
)
|
679
|
-
schedule_id = (
|
680
|
-
Client().zen_store.create_schedule(schedule_model).id
|
681
|
-
)
|
682
|
-
logger.info(
|
683
|
-
f"Created schedule `{schedule_name}` for pipeline "
|
684
|
-
f"`{deployment.pipeline_configuration.name}`."
|
685
|
-
)
|
686
|
-
|
687
785
|
stack = Client().active_stack
|
688
|
-
|
786
|
+
deployment = self._create_deployment(**self._run_args)
|
689
787
|
|
690
|
-
self.
|
691
|
-
|
692
|
-
local_repo_context = (
|
693
|
-
code_repository_utils.find_active_code_repository()
|
694
|
-
)
|
695
|
-
code_repository = build_utils.verify_local_repository_context(
|
696
|
-
deployment=deployment, local_repo_context=local_repo_context
|
697
|
-
)
|
698
|
-
|
699
|
-
build_model = build_utils.reuse_or_create_pipeline_build(
|
700
|
-
deployment=deployment,
|
701
|
-
pipeline_id=pipeline_id,
|
702
|
-
allow_build_reuse=not prevent_build_reuse,
|
703
|
-
build=build,
|
704
|
-
code_repository=code_repository,
|
705
|
-
)
|
706
|
-
build_id = build_model.id if build_model else None
|
707
|
-
|
708
|
-
code_reference = None
|
709
|
-
if local_repo_context and not local_repo_context.is_dirty:
|
710
|
-
source_root = source_utils.get_source_root()
|
711
|
-
subdirectory = (
|
712
|
-
Path(source_root)
|
713
|
-
.resolve()
|
714
|
-
.relative_to(local_repo_context.root)
|
715
|
-
)
|
716
|
-
|
717
|
-
code_reference = CodeReferenceRequest(
|
718
|
-
commit=local_repo_context.current_commit,
|
719
|
-
subdirectory=subdirectory.as_posix(),
|
720
|
-
code_repository=local_repo_context.code_repository_id,
|
721
|
-
)
|
722
|
-
|
723
|
-
deployment_request = PipelineDeploymentRequest(
|
724
|
-
user=Client().active_user.id,
|
725
|
-
workspace=Client().active_workspace.id,
|
726
|
-
stack=stack.id,
|
727
|
-
pipeline=pipeline_id,
|
728
|
-
build=build_id,
|
729
|
-
schedule=schedule_id,
|
730
|
-
code_reference=code_reference,
|
731
|
-
**deployment.dict(),
|
732
|
-
)
|
733
|
-
deployment_model = Client().zen_store.create_deployment(
|
734
|
-
deployment=deployment_request
|
735
|
-
)
|
788
|
+
self.log_pipeline_deployment_metadata(deployment)
|
789
|
+
run = create_placeholder_run(deployment=deployment)
|
736
790
|
|
737
791
|
analytics_handler.metadata = self._get_pipeline_analytics_metadata(
|
738
|
-
deployment=
|
792
|
+
deployment=deployment,
|
793
|
+
stack=stack,
|
794
|
+
run_id=run.id if run else None,
|
739
795
|
)
|
740
|
-
stack.prepare_pipeline_deployment(deployment=deployment_model)
|
741
|
-
|
742
|
-
self.log_pipeline_deployment_metadata(deployment_model)
|
743
|
-
|
744
|
-
run = None
|
745
|
-
if not schedule:
|
746
|
-
run_request = PipelineRunRequest(
|
747
|
-
name=get_run_name(
|
748
|
-
run_name_template=deployment_model.run_name_template
|
749
|
-
),
|
750
|
-
# We set the start time on the placeholder run already to
|
751
|
-
# make it consistent with the {time} placeholder in the
|
752
|
-
# run name. This means the placeholder run will usually
|
753
|
-
# have longer durations than scheduled runs, as for them
|
754
|
-
# the start_time is only set once the first step starts
|
755
|
-
# running.
|
756
|
-
start_time=datetime.utcnow(),
|
757
|
-
orchestrator_run_id=None,
|
758
|
-
user=Client().active_user.id,
|
759
|
-
workspace=deployment_model.workspace.id,
|
760
|
-
deployment=deployment_model.id,
|
761
|
-
pipeline=deployment_model.pipeline.id
|
762
|
-
if deployment_model.pipeline
|
763
|
-
else None,
|
764
|
-
status=ExecutionStatus.INITIALIZING,
|
765
|
-
)
|
766
|
-
run = Client().zen_store.create_run(run_request)
|
767
|
-
|
768
|
-
# Prevent execution of nested pipelines which might lead to
|
769
|
-
# unexpected behavior
|
770
|
-
constants.SHOULD_PREVENT_PIPELINE_EXECUTION = True
|
771
|
-
try:
|
772
|
-
stack.deploy_pipeline(deployment=deployment_model)
|
773
|
-
except Exception as e:
|
774
|
-
if (
|
775
|
-
run
|
776
|
-
and Client().get_pipeline_run(run.id).status
|
777
|
-
== ExecutionStatus.INITIALIZING
|
778
|
-
):
|
779
|
-
# The run hasn't actually started yet, which means that we
|
780
|
-
# failed during initialization -> We don't want the
|
781
|
-
# placeholder run to stay in the database
|
782
|
-
Client().delete_pipeline_run(run.id)
|
783
|
-
|
784
|
-
raise e
|
785
|
-
finally:
|
786
|
-
constants.SHOULD_PREVENT_PIPELINE_EXECUTION = False
|
787
796
|
|
788
797
|
if run:
|
789
798
|
run_url = dashboard_utils.get_run_url(run)
|
790
799
|
if run_url:
|
791
|
-
logger.info(f"Dashboard URL: {run_url}")
|
800
|
+
logger.info(f"Dashboard URL for Pipeline Run: {run_url}")
|
792
801
|
else:
|
793
802
|
logger.info(
|
794
803
|
"You can visualize your pipeline runs in the `ZenML "
|
795
804
|
"Dashboard`. In order to try it locally, please run "
|
796
|
-
"`zenml
|
805
|
+
"`zenml login --local`."
|
797
806
|
)
|
798
807
|
|
799
|
-
|
808
|
+
deploy_pipeline(
|
809
|
+
deployment=deployment, stack=stack, placeholder_run=run
|
810
|
+
)
|
811
|
+
if run:
|
812
|
+
return Client().get_pipeline_run(run.id)
|
813
|
+
return None
|
800
814
|
|
801
815
|
@staticmethod
|
802
816
|
def log_pipeline_deployment_metadata(
|
@@ -808,15 +822,6 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
808
822
|
deployment_model: The model for the pipeline deployment
|
809
823
|
"""
|
810
824
|
try:
|
811
|
-
# Log about the schedule/run
|
812
|
-
if deployment_model.schedule:
|
813
|
-
logger.info(
|
814
|
-
"Scheduling a run with the schedule: "
|
815
|
-
f"`{deployment_model.schedule.name}`"
|
816
|
-
)
|
817
|
-
else:
|
818
|
-
logger.info("Executing a new run.")
|
819
|
-
|
820
825
|
# Log about the caching status
|
821
826
|
if deployment_model.pipeline_configuration.enable_cache is False:
|
822
827
|
logger.info(
|
@@ -869,123 +874,6 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
869
874
|
except Exception as e:
|
870
875
|
logger.debug(f"Logging pipeline deployment metadata failed: {e}")
|
871
876
|
|
872
|
-
def _update_new_requesters(
|
873
|
-
self,
|
874
|
-
requester_name: str,
|
875
|
-
model: "Model",
|
876
|
-
new_versions_requested: Dict[
|
877
|
-
Tuple[str, Optional[str]], NewModelRequest
|
878
|
-
],
|
879
|
-
other_models: Set["Model"],
|
880
|
-
) -> None:
|
881
|
-
key = (
|
882
|
-
model.name,
|
883
|
-
str(model.version) if model.version else None,
|
884
|
-
)
|
885
|
-
if model.version is None:
|
886
|
-
version_existed = False
|
887
|
-
else:
|
888
|
-
try:
|
889
|
-
model._get_model_version()
|
890
|
-
version_existed = key not in new_versions_requested
|
891
|
-
except KeyError:
|
892
|
-
version_existed = False
|
893
|
-
if not version_existed:
|
894
|
-
model.was_created_in_this_run = True
|
895
|
-
new_versions_requested[key].update_request(
|
896
|
-
model,
|
897
|
-
NewModelRequest.Requester(source="step", name=requester_name),
|
898
|
-
)
|
899
|
-
else:
|
900
|
-
other_models.add(model)
|
901
|
-
|
902
|
-
def prepare_model_versions(
|
903
|
-
self, deployment: "PipelineDeploymentBase"
|
904
|
-
) -> None:
|
905
|
-
"""Create model versions which are missing and validate existing ones that are used in the pipeline run.
|
906
|
-
|
907
|
-
Args:
|
908
|
-
deployment: The pipeline deployment configuration.
|
909
|
-
"""
|
910
|
-
new_versions_requested: Dict[
|
911
|
-
Tuple[str, Optional[str]], NewModelRequest
|
912
|
-
] = defaultdict(NewModelRequest)
|
913
|
-
other_models: Set["Model"] = set()
|
914
|
-
all_steps_have_own_config = True
|
915
|
-
for step in deployment.step_configurations.values():
|
916
|
-
step_model = step.config.model
|
917
|
-
all_steps_have_own_config = (
|
918
|
-
all_steps_have_own_config and step.config.model is not None
|
919
|
-
)
|
920
|
-
if step_model:
|
921
|
-
self._update_new_requesters(
|
922
|
-
model=step_model,
|
923
|
-
requester_name=step.config.name,
|
924
|
-
new_versions_requested=new_versions_requested,
|
925
|
-
other_models=other_models,
|
926
|
-
)
|
927
|
-
if not all_steps_have_own_config:
|
928
|
-
pipeline_model = deployment.pipeline_configuration.model
|
929
|
-
if pipeline_model:
|
930
|
-
self._update_new_requesters(
|
931
|
-
model=pipeline_model,
|
932
|
-
requester_name=self.name,
|
933
|
-
new_versions_requested=new_versions_requested,
|
934
|
-
other_models=other_models,
|
935
|
-
)
|
936
|
-
elif deployment.pipeline_configuration.model is not None:
|
937
|
-
logger.warning(
|
938
|
-
f"ModelConfig of pipeline `{self.name}` is overridden in all "
|
939
|
-
f"steps. "
|
940
|
-
)
|
941
|
-
|
942
|
-
self._validate_new_version_requests(new_versions_requested)
|
943
|
-
|
944
|
-
for other_model in other_models:
|
945
|
-
other_model._validate_config_in_runtime()
|
946
|
-
|
947
|
-
def _validate_new_version_requests(
|
948
|
-
self,
|
949
|
-
new_versions_requested: Dict[
|
950
|
-
Tuple[str, Optional[str]], NewModelRequest
|
951
|
-
],
|
952
|
-
) -> None:
|
953
|
-
"""Validate the model version that are used in the pipeline run.
|
954
|
-
|
955
|
-
Args:
|
956
|
-
new_versions_requested: A dict of new model version request objects.
|
957
|
-
|
958
|
-
"""
|
959
|
-
for key, data in new_versions_requested.items():
|
960
|
-
model_name, model_version = key
|
961
|
-
if len(data.requesters) > 1:
|
962
|
-
logger.warning(
|
963
|
-
f"New version of model version `{model_name}::{model_version or 'NEW'}` "
|
964
|
-
f"requested in multiple decorators:\n{data.requesters}\n We recommend "
|
965
|
-
"that `Model` requesting new version is configured only in one "
|
966
|
-
"place of the pipeline."
|
967
|
-
)
|
968
|
-
data.model._validate_config_in_runtime()
|
969
|
-
self.__new_unnamed_model_versions_in_current_run__[
|
970
|
-
data.model.name
|
971
|
-
] = data.model.number
|
972
|
-
|
973
|
-
def get_runs(self, **kwargs: Any) -> List["PipelineRunResponse"]:
|
974
|
-
"""(Deprecated) Get runs of this pipeline.
|
975
|
-
|
976
|
-
Args:
|
977
|
-
**kwargs: Further arguments for filtering or pagination that are
|
978
|
-
passed to `client.list_pipeline_runs()`.
|
979
|
-
|
980
|
-
Returns:
|
981
|
-
List of runs of this pipeline.
|
982
|
-
"""
|
983
|
-
logger.warning(
|
984
|
-
"`Pipeline.get_runs()` is deprecated and will be removed in a "
|
985
|
-
"future version. Please use `Pipeline.model.get_runs()` instead."
|
986
|
-
)
|
987
|
-
return self.model.get_runs(**kwargs)
|
988
|
-
|
989
877
|
def write_run_configuration_template(
|
990
878
|
self, path: str, stack: Optional["Stack"] = None
|
991
879
|
) -> None:
|
@@ -1020,19 +908,12 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1020
908
|
steps = {}
|
1021
909
|
for step_name, invocation in self.invocations.items():
|
1022
910
|
step = invocation.step
|
1023
|
-
parameters = (
|
1024
|
-
pydantic_utils.TemplateGenerator(
|
1025
|
-
step.entrypoint_definition.legacy_params.annotation
|
1026
|
-
).run()
|
1027
|
-
if step.entrypoint_definition.legacy_params
|
1028
|
-
else {}
|
1029
|
-
)
|
1030
911
|
outputs = {
|
1031
912
|
name: PartialArtifactConfiguration()
|
1032
913
|
for name in step.entrypoint_definition.outputs
|
1033
914
|
}
|
1034
915
|
step_template = StepConfigurationUpdate(
|
1035
|
-
parameters=
|
916
|
+
parameters={},
|
1036
917
|
settings=step_settings,
|
1037
918
|
outputs=outputs,
|
1038
919
|
)
|
@@ -1081,12 +962,14 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1081
962
|
self,
|
1082
963
|
deployment: "PipelineDeploymentResponse",
|
1083
964
|
stack: "Stack",
|
965
|
+
run_id: Optional[UUID] = None,
|
1084
966
|
) -> Dict[str, Any]:
|
1085
967
|
"""Returns the pipeline deployment metadata.
|
1086
968
|
|
1087
969
|
Args:
|
1088
970
|
deployment: The pipeline deployment to track.
|
1089
971
|
stack: The stack on which the pipeline will be deployed.
|
972
|
+
run_id: The ID of the pipeline run.
|
1090
973
|
|
1091
974
|
Returns:
|
1092
975
|
the metadata about the pipeline deployment
|
@@ -1113,13 +996,13 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1113
996
|
"schedule": bool(deployment.schedule),
|
1114
997
|
"custom_materializer": custom_materializer,
|
1115
998
|
"own_stack": own_stack,
|
999
|
+
"pipeline_run_id": str(run_id) if run_id else None,
|
1116
1000
|
}
|
1117
1001
|
|
1118
1002
|
def _compile(
|
1119
1003
|
self, config_path: Optional[str] = None, **run_configuration_args: Any
|
1120
1004
|
) -> Tuple[
|
1121
1005
|
"PipelineDeploymentBase",
|
1122
|
-
"PipelineSpec",
|
1123
1006
|
Optional["Schedule"],
|
1124
1007
|
Union["PipelineBuildBase", UUID, None],
|
1125
1008
|
]:
|
@@ -1130,7 +1013,7 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1130
1013
|
**run_configuration_args: Configurations for the pipeline run.
|
1131
1014
|
|
1132
1015
|
Returns:
|
1133
|
-
A tuple containing the deployment,
|
1016
|
+
A tuple containing the deployment, schedule and build of
|
1134
1017
|
the compiled pipeline.
|
1135
1018
|
"""
|
1136
1019
|
# Activating the built-in integrations to load all materializers
|
@@ -1138,76 +1021,71 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1138
1021
|
|
1139
1022
|
integration_registry.activate_integrations()
|
1140
1023
|
|
1141
|
-
self._parse_config_file(
|
1024
|
+
_from_config_file = self._parse_config_file(
|
1142
1025
|
config_path=config_path,
|
1143
|
-
matcher=list(PipelineRunConfiguration.
|
1026
|
+
matcher=list(PipelineRunConfiguration.model_fields.keys()),
|
1144
1027
|
)
|
1145
1028
|
|
1146
|
-
|
1029
|
+
self._reconfigure_from_file_with_overrides(config_path=config_path)
|
1030
|
+
|
1031
|
+
run_config = PipelineRunConfiguration(**_from_config_file)
|
1147
1032
|
|
1148
1033
|
new_values = dict_utils.remove_none_values(run_configuration_args)
|
1149
|
-
update = PipelineRunConfiguration.
|
1034
|
+
update = PipelineRunConfiguration.model_validate(new_values)
|
1150
1035
|
|
1151
1036
|
# Update with the values in code so they take precedence
|
1152
1037
|
run_config = pydantic_utils.update_model(run_config, update=update)
|
1038
|
+
run_config = env_utils.substitute_env_variable_placeholders(run_config)
|
1153
1039
|
|
1154
|
-
deployment
|
1040
|
+
deployment = Compiler().compile(
|
1155
1041
|
pipeline=self,
|
1156
1042
|
stack=Client().active_stack,
|
1157
1043
|
run_configuration=run_config,
|
1158
1044
|
)
|
1045
|
+
deployment = env_utils.substitute_env_variable_placeholders(deployment)
|
1159
1046
|
|
1160
|
-
return deployment,
|
1047
|
+
return deployment, run_config.schedule, run_config.build
|
1161
1048
|
|
1162
|
-
def _register(self
|
1049
|
+
def _register(self) -> "PipelineResponse":
|
1163
1050
|
"""Register the pipeline in the server.
|
1164
1051
|
|
1165
|
-
Args:
|
1166
|
-
pipeline_spec: The pipeline spec to register.
|
1167
|
-
|
1168
1052
|
Returns:
|
1169
1053
|
The registered pipeline model.
|
1170
1054
|
"""
|
1171
|
-
version_hash = self._compute_unique_identifier(
|
1172
|
-
pipeline_spec=pipeline_spec
|
1173
|
-
)
|
1174
|
-
|
1175
1055
|
client = Client()
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
if matching_pipelines.total:
|
1183
|
-
registered_pipeline = matching_pipelines.items[0]
|
1184
|
-
logger.info(
|
1185
|
-
"Reusing registered pipeline version: `(version: %s)`.",
|
1186
|
-
registered_pipeline.version,
|
1056
|
+
|
1057
|
+
def _get() -> PipelineResponse:
|
1058
|
+
matching_pipelines = client.list_pipelines(
|
1059
|
+
name=self.name,
|
1060
|
+
size=1,
|
1061
|
+
sort_by="desc:created",
|
1187
1062
|
)
|
1188
|
-
return registered_pipeline
|
1189
|
-
|
1190
|
-
latest_version = self._get_latest_version() or 0
|
1191
|
-
version = str(latest_version + 1)
|
1192
|
-
|
1193
|
-
request = PipelineRequest(
|
1194
|
-
workspace=client.active_workspace.id,
|
1195
|
-
user=client.active_user.id,
|
1196
|
-
name=self.name,
|
1197
|
-
version=version,
|
1198
|
-
version_hash=version_hash,
|
1199
|
-
spec=pipeline_spec,
|
1200
|
-
docstring=self.__doc__,
|
1201
|
-
)
|
1202
1063
|
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1064
|
+
if matching_pipelines.total:
|
1065
|
+
registered_pipeline = matching_pipelines.items[0]
|
1066
|
+
return registered_pipeline
|
1067
|
+
raise RuntimeError("No matching pipelines found.")
|
1068
|
+
|
1069
|
+
try:
|
1070
|
+
return _get()
|
1071
|
+
except RuntimeError:
|
1072
|
+
request = PipelineRequest(
|
1073
|
+
workspace=client.active_workspace.id,
|
1074
|
+
user=client.active_user.id,
|
1075
|
+
name=self.name,
|
1076
|
+
)
|
1077
|
+
|
1078
|
+
try:
|
1079
|
+
registered_pipeline = client.zen_store.create_pipeline(
|
1080
|
+
pipeline=request
|
1081
|
+
)
|
1082
|
+
logger.info(
|
1083
|
+
"Registered new pipeline: `%s`.",
|
1084
|
+
registered_pipeline.name,
|
1085
|
+
)
|
1086
|
+
return registered_pipeline
|
1087
|
+
except EntityExistsError:
|
1088
|
+
return _get()
|
1211
1089
|
|
1212
1090
|
def _compute_unique_identifier(self, pipeline_spec: PipelineSpec) -> str:
|
1213
1091
|
"""Computes a unique identifier from the pipeline spec and steps.
|
@@ -1234,28 +1112,15 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1234
1112
|
|
1235
1113
|
return hash_.hexdigest()
|
1236
1114
|
|
1237
|
-
def _get_latest_version(self) -> Optional[int]:
|
1238
|
-
"""Gets the latest version of this pipeline.
|
1239
|
-
|
1240
|
-
Returns:
|
1241
|
-
The latest version or `None` if no version exists.
|
1242
|
-
"""
|
1243
|
-
all_pipelines = Client().list_pipelines(
|
1244
|
-
name=self.name, sort_by="desc:created", size=1
|
1245
|
-
)
|
1246
|
-
if not all_pipelines.total:
|
1247
|
-
return None
|
1248
|
-
pipeline = all_pipelines.items[0]
|
1249
|
-
if pipeline.version == "UNVERSIONED":
|
1250
|
-
return None
|
1251
|
-
return int(all_pipelines.items[0].version)
|
1252
|
-
|
1253
1115
|
def add_step_invocation(
|
1254
1116
|
self,
|
1255
1117
|
step: "BaseStep",
|
1256
1118
|
input_artifacts: Dict[str, StepArtifact],
|
1257
|
-
external_artifacts: Dict[
|
1119
|
+
external_artifacts: Dict[
|
1120
|
+
str, Union["ExternalArtifact", "ArtifactVersionResponse"]
|
1121
|
+
],
|
1258
1122
|
model_artifacts_or_metadata: Dict[str, "ModelVersionDataLazyLoader"],
|
1123
|
+
client_lazy_loaders: Dict[str, "ClientLazyLoader"],
|
1259
1124
|
parameters: Dict[str, Any],
|
1260
1125
|
default_parameters: Dict[str, Any],
|
1261
1126
|
upstream_steps: Set[str],
|
@@ -1270,6 +1135,7 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1270
1135
|
external_artifacts: The external artifacts for the invocation.
|
1271
1136
|
model_artifacts_or_metadata: The model artifacts or metadata for
|
1272
1137
|
the invocation.
|
1138
|
+
client_lazy_loaders: The client lazy loaders for the invocation.
|
1273
1139
|
parameters: The parameters for the invocation.
|
1274
1140
|
default_parameters: The default parameters for the invocation.
|
1275
1141
|
upstream_steps: The upstream steps for the invocation.
|
@@ -1307,6 +1173,7 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1307
1173
|
input_artifacts=input_artifacts,
|
1308
1174
|
external_artifacts=external_artifacts,
|
1309
1175
|
model_artifacts_or_metadata=model_artifacts_or_metadata,
|
1176
|
+
client_lazy_loaders=client_lazy_loaders,
|
1310
1177
|
parameters=parameters,
|
1311
1178
|
default_parameters=default_parameters,
|
1312
1179
|
upstream_steps=upstream_steps,
|
@@ -1352,7 +1219,7 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1352
1219
|
|
1353
1220
|
raise RuntimeError("Unable to find step ID")
|
1354
1221
|
|
1355
|
-
def __enter__(self
|
1222
|
+
def __enter__(self) -> Self:
|
1356
1223
|
"""Activate the pipeline context.
|
1357
1224
|
|
1358
1225
|
Raises:
|
@@ -1380,17 +1247,21 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1380
1247
|
|
1381
1248
|
def _parse_config_file(
|
1382
1249
|
self, config_path: Optional[str], matcher: List[str]
|
1383
|
-
) ->
|
1250
|
+
) -> Dict[str, Any]:
|
1384
1251
|
"""Parses the given configuration file and sets `self._from_config_file`.
|
1385
1252
|
|
1386
1253
|
Args:
|
1387
1254
|
config_path: Path to a yaml configuration file.
|
1388
1255
|
matcher: List of keys to match in the configuration file.
|
1256
|
+
|
1257
|
+
Returns:
|
1258
|
+
Parsed config file according to matcher settings.
|
1389
1259
|
"""
|
1390
1260
|
_from_config_file: Dict[str, Any] = {}
|
1391
1261
|
if config_path:
|
1392
1262
|
with open(config_path, "r") as f:
|
1393
1263
|
_from_config_file = yaml.load(f, Loader=yaml.SafeLoader)
|
1264
|
+
|
1394
1265
|
_from_config_file = dict_utils.remove_none_values(
|
1395
1266
|
{k: v for k, v in _from_config_file.items() if k in matcher}
|
1396
1267
|
)
|
@@ -1403,10 +1274,10 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1403
1274
|
else:
|
1404
1275
|
from zenml.model.model import Model
|
1405
1276
|
|
1406
|
-
_from_config_file["model"] = Model.
|
1277
|
+
_from_config_file["model"] = Model.model_validate(
|
1407
1278
|
_from_config_file["model"]
|
1408
1279
|
)
|
1409
|
-
|
1280
|
+
return _from_config_file
|
1410
1281
|
|
1411
1282
|
def with_options(
|
1412
1283
|
self,
|
@@ -1416,6 +1287,7 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1416
1287
|
step_configurations: Optional[
|
1417
1288
|
Mapping[str, "StepConfigurationUpdateOrDict"]
|
1418
1289
|
] = None,
|
1290
|
+
steps: Optional[Mapping[str, "StepConfigurationUpdateOrDict"]] = None,
|
1419
1291
|
config_path: Optional[str] = None,
|
1420
1292
|
unlisted: bool = False,
|
1421
1293
|
prevent_build_reuse: bool = False,
|
@@ -1428,6 +1300,9 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1428
1300
|
schedule: Optional schedule to use for the run.
|
1429
1301
|
build: Optional build to use for the run.
|
1430
1302
|
step_configurations: Configurations for steps of the pipeline.
|
1303
|
+
steps: Configurations for steps of the pipeline. This is equivalent
|
1304
|
+
to `step_configurations`, and will be ignored if
|
1305
|
+
`step_configurations` is set as well.
|
1431
1306
|
config_path: Path to a yaml configuration file. This file will
|
1432
1307
|
be parsed as a
|
1433
1308
|
`zenml.config.pipeline_configurations.PipelineRunConfiguration`
|
@@ -1436,32 +1311,33 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1436
1311
|
method.
|
1437
1312
|
unlisted: Whether the pipeline run should be unlisted (not assigned
|
1438
1313
|
to any pipeline).
|
1439
|
-
prevent_build_reuse:
|
1314
|
+
prevent_build_reuse: DEPRECATED: Use
|
1315
|
+
`DockerSettings.prevent_build_reuse` instead.
|
1440
1316
|
**kwargs: Pipeline configuration options. These will be passed
|
1441
1317
|
to the `pipeline.configure(...)` method.
|
1442
1318
|
|
1443
1319
|
Returns:
|
1444
1320
|
The copied pipeline instance.
|
1445
1321
|
"""
|
1322
|
+
if steps and step_configurations:
|
1323
|
+
logger.warning(
|
1324
|
+
"Step configurations were passed using both the "
|
1325
|
+
"`step_configurations` and `steps` keywords, ignoring the "
|
1326
|
+
"values passed using the `steps` keyword."
|
1327
|
+
)
|
1328
|
+
|
1446
1329
|
pipeline_copy = self.copy()
|
1447
1330
|
|
1448
|
-
pipeline_copy.
|
1449
|
-
config_path=config_path,
|
1450
|
-
matcher=inspect.getfullargspec(self.configure)[0],
|
1451
|
-
)
|
1452
|
-
pipeline_copy._from_config_file = dict_utils.recursive_update(
|
1453
|
-
pipeline_copy._from_config_file, kwargs
|
1331
|
+
pipeline_copy._reconfigure_from_file_with_overrides(
|
1332
|
+
config_path=config_path, **kwargs
|
1454
1333
|
)
|
1455
1334
|
|
1456
|
-
with pipeline_copy.__suppress_configure_warnings__():
|
1457
|
-
pipeline_copy.configure(**pipeline_copy._from_config_file)
|
1458
|
-
|
1459
1335
|
run_args = dict_utils.remove_none_values(
|
1460
1336
|
{
|
1461
1337
|
"run_name": run_name,
|
1462
1338
|
"schedule": schedule,
|
1463
1339
|
"build": build,
|
1464
|
-
"step_configurations": step_configurations,
|
1340
|
+
"step_configurations": step_configurations or steps,
|
1465
1341
|
"config_path": config_path,
|
1466
1342
|
"unlisted": unlisted,
|
1467
1343
|
"prevent_build_reuse": prevent_build_reuse,
|
@@ -1478,7 +1354,9 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1478
1354
|
"""
|
1479
1355
|
return copy.deepcopy(self)
|
1480
1356
|
|
1481
|
-
def __call__(
|
1357
|
+
def __call__(
|
1358
|
+
self, *args: Any, **kwargs: Any
|
1359
|
+
) -> Optional[PipelineRunResponse]:
|
1482
1360
|
"""Handle a call of the pipeline.
|
1483
1361
|
|
1484
1362
|
This method does one of two things:
|
@@ -1493,7 +1371,9 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1493
1371
|
**kwargs: Entrypoint function keyword arguments.
|
1494
1372
|
|
1495
1373
|
Returns:
|
1496
|
-
|
1374
|
+
If called within another pipeline, returns the outputs of the
|
1375
|
+
`entrypoint` method. Otherwise, returns the pipeline run or `None`
|
1376
|
+
if running with a schedule.
|
1497
1377
|
"""
|
1498
1378
|
if Pipeline.ACTIVE_PIPELINE:
|
1499
1379
|
# Calling a pipeline inside a pipeline, we return the potential
|
@@ -1505,7 +1385,7 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1505
1385
|
return self.entrypoint(*args, **kwargs)
|
1506
1386
|
|
1507
1387
|
self.prepare(*args, **kwargs)
|
1508
|
-
return self._run(
|
1388
|
+
return self._run()
|
1509
1389
|
|
1510
1390
|
def _call_entrypoint(self, *args: Any, **kwargs: Any) -> None:
|
1511
1391
|
"""Calls the pipeline entrypoint function with the given arguments.
|
@@ -1521,14 +1401,15 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1521
1401
|
try:
|
1522
1402
|
validated_args = pydantic_utils.validate_function_args(
|
1523
1403
|
self.entrypoint,
|
1524
|
-
|
1404
|
+
ConfigDict(arbitrary_types_allowed=False),
|
1525
1405
|
*args,
|
1526
1406
|
**kwargs,
|
1527
1407
|
)
|
1528
1408
|
except ValidationError as e:
|
1529
1409
|
raise ValueError(
|
1530
|
-
"Invalid or missing
|
1410
|
+
"Invalid or missing pipeline function entrypoint arguments. "
|
1531
1411
|
"Only JSON serializable inputs are allowed as pipeline inputs."
|
1412
|
+
"Check out the pydantic error above for more details."
|
1532
1413
|
) from e
|
1533
1414
|
|
1534
1415
|
self._parameters = validated_args
|
@@ -1551,3 +1432,58 @@ To avoid this consider setting pipeline parameters only in one place (config or
|
|
1551
1432
|
)
|
1552
1433
|
else:
|
1553
1434
|
self.prepare()
|
1435
|
+
|
1436
|
+
def create_run_template(
|
1437
|
+
self, name: str, **kwargs: Any
|
1438
|
+
) -> RunTemplateResponse:
|
1439
|
+
"""Create a run template for the pipeline.
|
1440
|
+
|
1441
|
+
Args:
|
1442
|
+
name: The name of the run template.
|
1443
|
+
**kwargs: Keyword arguments for the client method to create a run
|
1444
|
+
template.
|
1445
|
+
|
1446
|
+
Returns:
|
1447
|
+
The created run template.
|
1448
|
+
"""
|
1449
|
+
self._prepare_if_possible()
|
1450
|
+
deployment = self._create_deployment(
|
1451
|
+
**self._run_args, skip_schedule_registration=True
|
1452
|
+
)
|
1453
|
+
|
1454
|
+
return Client().create_run_template(
|
1455
|
+
name=name, deployment_id=deployment.id, **kwargs
|
1456
|
+
)
|
1457
|
+
|
1458
|
+
def _reconfigure_from_file_with_overrides(
|
1459
|
+
self,
|
1460
|
+
config_path: Optional[str] = None,
|
1461
|
+
**kwargs: Any,
|
1462
|
+
) -> None:
|
1463
|
+
"""Update the pipeline configuration from config file.
|
1464
|
+
|
1465
|
+
Accepts overrides as kwargs.
|
1466
|
+
|
1467
|
+
Args:
|
1468
|
+
config_path: Path to a yaml configuration file. This file will
|
1469
|
+
be parsed as a
|
1470
|
+
`zenml.config.pipeline_configurations.PipelineRunConfiguration`
|
1471
|
+
object. Options provided in this file will be overwritten by
|
1472
|
+
options provided in code using the other arguments of this
|
1473
|
+
method.
|
1474
|
+
**kwargs: Pipeline configuration options. These will be passed
|
1475
|
+
to the `pipeline.configure(...)` method.
|
1476
|
+
"""
|
1477
|
+
self._from_config_file = {}
|
1478
|
+
if config_path:
|
1479
|
+
self._from_config_file = self._parse_config_file(
|
1480
|
+
config_path=config_path,
|
1481
|
+
matcher=inspect.getfullargspec(self.configure)[0],
|
1482
|
+
)
|
1483
|
+
|
1484
|
+
_from_config_file = dict_utils.recursive_update(
|
1485
|
+
self._from_config_file, kwargs
|
1486
|
+
)
|
1487
|
+
|
1488
|
+
with self.__suppress_configure_warnings__():
|
1489
|
+
self.configure(**_from_config_file)
|