diff --git a/beir/retrieval/evaluation.py b/beir/retrieval/evaluation.py index 1cdcce3..0cb2f14 100644 --- a/beir/retrieval/evaluation.py +++ b/beir/retrieval/evaluation.py @@ -44,7 +44,7 @@ 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('For evaluation, we ignore identical query and document ids (default), please explicitly set ``ignore_identical_ids=False`` to ignore this.') + logger.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): @@ -84,9 +84,9 @@ def evaluate(qrels: Dict[str, Dict[str, int]], precision[f"P@{k}"] = round(precision[f"P@{k}"]/len(scores), 5) for eval in [ndcg, _map, recall, precision]: - logging.info("\n") + logger.info("\n") for k in eval.keys(): - logging.info("{}: {:.4f}".format(k, eval[k])) + logger.info("{}: {:.4f}".format(k, eval[k])) return ndcg, _map, recall, precision @@ -105,4 +105,4 @@ def evaluate_custom(qrels: Dict[str, Dict[str, int]], return hole(qrels, results, k_values) elif metric.lower() in ["acc", "top_k_acc", "accuracy", "accuracy@k", "top_k_accuracy"]: - return top_k_accuracy(qrels, results, k_values) \ No newline at end of file + return top_k_accuracy(qrels, results, k_values)