Skip to content

Commit

Permalink
removing the deprecated calls
Browse files Browse the repository at this point in the history
  • Loading branch information
bcdurak committed Nov 13, 2024
1 parent a200a13 commit 97ac292
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions template/steps/data_preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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},
)
Expand Down
4 changes: 2 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_artifact_metadata, step
from zenml import log_metadata, step
from zenml.logger import get_logger

logger = get_logger(__name__)
Expand Down Expand Up @@ -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",
)
Expand Down

0 comments on commit 97ac292

Please sign in to comment.