From d7e3c102696ad032b1e8a0282f805426d65949f5 Mon Sep 17 00:00:00 2001 From: gferraro Date: Tue, 1 Oct 2024 15:35:32 +0200 Subject: [PATCH] use logging --- src/modelevaluate.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/modelevaluate.py b/src/modelevaluate.py index cf2a7682..ccfbb604 100644 --- a/src/modelevaluate.py +++ b/src/modelevaluate.py @@ -470,16 +470,12 @@ def evaluate_dir( predicted_tag = ",".join(predicted_labels) y_pred.append(predicted_tag) if y_pred[-1] != y_true[-1]: - print( + logging.info("%s predicted %s but should be %s with confidence %s" data[0], - "Got a prediction of", y_pred[-1], - " should be ", label, np.round(100 * prediction.class_best_score), ) - # if predicted_tag not in model.labels: - # model.labels.append(predicted_tag) model.labels.append("None") model.labels.append("unidentified") cm = confusion_matrix(y_true, y_pred, labels=model.labels)