Skip to content

Remove .value from metadata access #25

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

Merged
merged 1 commit into from
Nov 7, 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,5 @@ cython_debug/

.vscode/
.local/
.ruff_cache/
.ruff_cache/
.idea/
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def promote_get_metrics(

# Get current model version metric in current run
model = get_step_context().model
current_metrics = model.get_model_artifact("model").run_metadata["metrics"].value
current_metrics = model.get_model_artifact("model").run_metadata["metrics"]
logger.info(f"Current model version metrics are {current_metrics}")

# Get latest saved model version metric in target environment
Expand All @@ -48,7 +48,7 @@ def promote_get_metrics(
except KeyError:
latest_version = None
if latest_version:
latest_metrics = latest_version.get_model_artifact("model").run_metadata["metrics"].value
latest_metrics = latest_version.get_model_artifact("model").run_metadata["metrics"]
logger.info(f"Latest model version metrics are {latest_metrics}")
else:
logger.info("No currently promoted model version found.")
Expand Down
Loading