Skip to content

Commit

Permalink
Merge pull request #25 from zenml-io/feature/adjust-to-better-metadata
Browse files Browse the repository at this point in the history
Remove .value from metadata access
  • Loading branch information
bcdurak authored Nov 7, 2024
2 parents 0fba996 + a3955d0 commit cd4601e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
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

0 comments on commit cd4601e

Please sign in to comment.