From 940547654e7f13525ba873b717a7062a3e45072f Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Tue, 19 May 2020 13:43:38 +0200
Subject: [PATCH] [script.analyze] Issue warning if keys do not match on for
 second-annotator evaluations (should not happen, normally)

---
 bob/ip/binseg/script/analyze.py  | 2 +-
 bob/ip/binseg/script/evaluate.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bob/ip/binseg/script/analyze.py b/bob/ip/binseg/script/analyze.py
index 4ca900d9..92e7f996 100644
--- a/bob/ip/binseg/script/analyze.py
+++ b/bob/ip/binseg/script/analyze.py
@@ -275,7 +275,7 @@ def analyze(
                         f"(no equivalent `dataset[{k}]`)")
                 continue
             if not dataset[k].all_keys_match(v):
-                logger.info(f"Skipping second-annotator '{k}' " \
+                logger.warning(f"Skipping second-annotator '{k}' " \
                         f"(keys do not match `dataset[{k}]`?)")
                 continue
             candidate = os.path.join(analysis_folder, "second-annotator",
diff --git a/bob/ip/binseg/script/evaluate.py b/bob/ip/binseg/script/evaluate.py
index be3d8bf2..4a8a0c2a 100644
--- a/bob/ip/binseg/script/evaluate.py
+++ b/bob/ip/binseg/script/evaluate.py
@@ -190,7 +190,7 @@ def evaluate(
         second = second_annotator.get(k)
         if second is not None:
             if not second.all_keys_match(v):
-                logger.warn(f"Key mismatch between `dataset[{k}]` and " \
+                logger.warning(f"Key mismatch between `dataset[{k}]` and " \
                         f"`second_annotator[{k}]` - skipping " \
                         f"second-annotator comparisons for {k} subset")
             else:
-- 
GitLab