From 500b392b84e471e7b3c8f2d9dfb72cdfaaefa424 Mon Sep 17 00:00:00 2001 From: francesca-crespi Date: Fri, 11 Sep 2026 12:08:04 +0200 Subject: [PATCH] Update ranking.py Fix bare except in ranking metrics --- pyhealth/metrics/ranking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyhealth/metrics/ranking.py b/pyhealth/metrics/ranking.py index b19f5107d..1f2e4612c 100644 --- a/pyhealth/metrics/ranking.py +++ b/pyhealth/metrics/ranking.py @@ -33,7 +33,7 @@ def ranking_metrics_fn(qrels: Dict[str, Dict[str, int]], """ try: import pytrec_eval - except: + except ImportError: raise ImportError("pytrec_eval is not installed. Please install it manually by running \ 'pip install pytrec_eval'.") ret = {}