Skip to content

Commit

Permalink
Fixing error in label index comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
Orieus committed May 19, 2023
1 parent 2215135 commit 484b450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/task_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 484b450

Please sign in to comment.