Skip to content

Commit

Permalink
Auto-update of NLP template
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 21, 2024
1 parent 0b66f07 commit 4b2434a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/e2e_nlp/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 2024.09.23
_commit: 2024.10.21
_src_path: gh:zenml-io/template-nlp
accelerator: cpu
cloud_of_choice: aws
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e_nlp/gradio/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ pandas==1.5.3
session_info==1.0.0
scikit-learn==1.5.0
transformers==4.28.1
IPython==7.34.0
IPython==8.10.0
12 changes: 4 additions & 8 deletions examples/e2e_nlp/steps/promotion/promote_get_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,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 @@ -72,11 +70,9 @@ 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 4b2434a

Please sign in to comment.