Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename metadata #31

Merged
merged 4 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion template/steps/deployment/deployment_deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down