From 1d9fe343d5cca77c32d8b0689a0e936c3aa9058b Mon Sep 17 00:00:00 2001 From: Nandan Thakur Date: Thu, 30 Jun 2022 20:55:01 +0200 Subject: [PATCH] changed exception with ignore identical ids --- beir/retrieval/evaluation.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/beir/retrieval/evaluation.py b/beir/retrieval/evaluation.py index fd48f54..fd40d72 100644 --- a/beir/retrieval/evaluation.py +++ b/beir/retrieval/evaluation.py @@ -47,15 +47,13 @@ def evaluate(qrels: Dict[str, Dict[str, int]], ignore_identical_ids: bool=True) -> Tuple[Dict[str, float], Dict[str, float], Dict[str, float], Dict[str, float]]: if ignore_identical_ids: - logging.info('Preprocessing the results to remove identical IDs. This is important for ArguAna and Quora') + logging.info('For evaluation, we ignore identical query and document ids (default), please explicitly set ``ignore_identical_ids=False`` to ignore this.') popped = [] for qid, rels in results.items(): for pid in list(rels): if qid == pid: results[qid].pop(pid) popped.append(pid) - if len(popped): - logging.info(f'Removed {len(popped)} pairs. Examples: {popped[:3]}') ndcg = {} _map = {}