diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d447da..d196efe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,5 +56,5 @@ jobs: with: stack-name: ${{ matrix.stack-name }} python-version: ${{ matrix.python-version }} - ref-zenml: ${{ inputs.ref-zenml || 'feature/OSS-2609-endpoint_artifacts_rename_new' }} + ref-zenml: ${{ inputs.ref-zenml || 'feature/OSSK-358-add-zenml-model-versions-list-to-cli' }} ref-template: ${{ inputs.ref-template || github.ref }} diff --git a/template/steps/deployment/deployment_deploy.py b/template/steps/deployment/deployment_deploy.py index 8df1e8f..0e0e744 100644 --- a/template/steps/deployment/deployment_deploy.py +++ b/template/steps/deployment/deployment_deploy.py @@ -47,7 +47,7 @@ def deployment_deploy() -> ( # deploy predictor service deployment_service = mlflow_model_registry_deployer_step.entrypoint( registry_model_name=model_version.name, - registry_model_version=model_version.metadata["model_registry_version"], + registry_model_version=model_version.run_metadata["model_registry_version"].value, replace_existing=True, ) else: diff --git a/template/steps/promotion/{% if metric_compare_promotion %}promote_with_metric_compare.py{% endif %} b/template/steps/promotion/{% if metric_compare_promotion %}promote_with_metric_compare.py{% endif %} index 70e702e..243ed8f 100644 --- a/template/steps/promotion/{% if metric_compare_promotion %}promote_with_metric_compare.py{% endif %} +++ b/template/steps/promotion/{% if metric_compare_promotion %}promote_with_metric_compare.py{% endif %} @@ -74,11 +74,11 @@ def promote_with_metric_compare( logger.info(f"Current model version was promoted to '{target_env}'.") # Promote in Model Registry - latest_version_model_registry_number = latest_version.metadata["model_registry_version"] + latest_version_model_registry_number = latest_version.run_metadata["model_registry_version"].value if current_version_number is None: current_version_model_registry_number = latest_version_model_registry_number else: - current_version_model_registry_number = current_version.metadata["model_registry_version"] + current_version_model_registry_number = current_version.run_metadata["model_registry_version"].value promote_in_model_registry( latest_version=latest_version_model_registry_number, current_version=current_version_model_registry_number, @@ -87,7 +87,7 @@ def promote_with_metric_compare( ) promoted_version = latest_version_model_registry_number else: - promoted_version = current_version.metadata["model_registry_version"] + promoted_version = current_version.run_metadata["model_registry_version"].value logger.info( f"Current model version in `{target_env}` is `{promoted_version}` registered in Model Registry" diff --git a/template/steps/promotion/{% if not metric_compare_promotion %}promote_latest_version.py{% endif %} b/template/steps/promotion/{% if not metric_compare_promotion %}promote_latest_version.py{% endif %} index 7bf4728..03308ac 100644 --- a/template/steps/promotion/{% if not metric_compare_promotion %}promote_latest_version.py{% endif %} +++ b/template/steps/promotion/{% if not metric_compare_promotion %}promote_latest_version.py{% endif %} @@ -32,11 +32,11 @@ def promote_latest_version( logger.info(f"Current model version was promoted to '{target_env}'.") # Promote in Model Registry - latest_version_model_registry_number = latest_version.metadata["model_registry_version"] + latest_version_model_registry_number = latest_version.run_metadata["model_registry_version"].value if current_version.number is None: current_version_model_registry_number = latest_version_model_registry_number else: - current_version_model_registry_number = current_version.metadata["model_registry_version"] + current_version_model_registry_number = current_version.run_metadata["model_registry_version"].value promote_in_model_registry( latest_version=latest_version_model_registry_number, current_version=current_version_model_registry_number,