Skip to content

Commit

Permalink
fixed the errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bcdurak committed Nov 28, 2024
1 parent fb8cdb7 commit 1124356
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions template/steps/model_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import pandas as pd
from sklearn.base import ClassifierMixin
from zenml import log_, step, Client
from zenml import log_metadata, step, Client
from zenml.logger import get_logger

logger = get_logger(__name__)
Expand Down Expand Up @@ -81,6 +81,13 @@ def model_evaluator(

client = Client()
latest_classifier = client.get_artifact_version("sklearn_classifier")
log_metadata(metadata=metadata, artifact_version_id=latest_classifier.id)

log_metadata(
metadata={
"train_accuracy": float(trn_acc),
"test_accuracy": float(tst_acc)
},
artifact_version_id=latest_classifier.id
)

return float(tst_acc)

0 comments on commit 1124356

Please sign in to comment.