From 484b450860c719c10701b14d3a510751bd2b5878 Mon Sep 17 00:00:00 2001 From: Jesus Cid Date: Fri, 19 May 2023 16:27:47 +0200 Subject: [PATCH] Fixing error in label index comparison --- src/task_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/task_manager.py b/src/task_manager.py index 6548934..2e2ae6d 100644 --- a/src/task_manager.py +++ b/src/task_manager.py @@ -1238,7 +1238,7 @@ def annotate(self, fmt: str = "csv"): # Check consistency: the indices in selected_doc and df_labels must # be the same and in the same order. Otherwise, both dataframes could # correspond to different annotation rounds, and must be elliminated - if np.any(df_labels.index != idx): + if set(df_labels.index) != set(idx): logging.error("-- The files of last sampled documents and last" "labels do not match. Annotation aborted.") logging.error("-- You should re-sample and re-annotate")