From 97ac29297ddeb465b199a7f89ba18d8be09a690d Mon Sep 17 00:00:00 2001 From: Baris Can Durak Date: Wed, 13 Nov 2024 20:19:11 +0100 Subject: [PATCH] removing the deprecated calls --- template/steps/data_preprocessor.py | 4 ++-- template/steps/model_evaluator.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/template/steps/data_preprocessor.py b/template/steps/data_preprocessor.py index cd87063..c4039a9 100644 --- a/template/steps/data_preprocessor.py +++ b/template/steps/data_preprocessor.py @@ -7,7 +7,7 @@ from sklearn.preprocessing import MinMaxScaler from typing_extensions import Annotated from utils.preprocess import ColumnsDropper, DataFrameCaster, NADropper -from zenml import log_artifact_metadata, step +from zenml import log_metadata, step @step @@ -67,7 +67,7 @@ def data_preprocessor( dataset_tst = preprocess_pipeline.transform(dataset_tst) # Log metadata so we can load it in the inference pipeline - log_artifact_metadata( + log_metadata( artifact_name="preprocess_pipeline", metadata={"random_state": random_state, "target": target}, ) diff --git a/template/steps/model_evaluator.py b/template/steps/model_evaluator.py index 835d9ea..95cc6be 100644 --- a/template/steps/model_evaluator.py +++ b/template/steps/model_evaluator.py @@ -4,7 +4,7 @@ import pandas as pd from sklearn.base import ClassifierMixin -from zenml import log_artifact_metadata, step +from zenml import log_metadata, step from zenml.logger import get_logger logger = get_logger(__name__) @@ -79,7 +79,7 @@ def model_evaluator( for message in messages: logger.warning(message) - log_artifact_metadata( + log_metadata( metadata={"train_accuracy": float(trn_acc), "test_accuracy": float(tst_acc)}, artifact_name="sklearn_classifier", )