Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyhealth/calib/predictionset/favmac/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _greedy_sequence(self, pred:np.ndarray):
if self.proxy_fn.is_additive():
Ss, _ = self.util_fn.greedy_maximize_seq(pred=pred, d_proxy = self.proxy_fn.values * (1-pred))
return Ss, list(map(proxy_fn, Ss))
except:
except Exception:
pass

Ss = [np.zeros(len(pred), dtype=int)]
Expand Down
2 changes: 1 addition & 1 deletion pyhealth/calib/predictionset/scrib/quicksearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
pyximport.install()
from . import quicksearch_cython as cdc
_CYTHON_ENABLED = True
except:
except ImportError:
print("This is a warning of potentially slow compute. You could uncomment this line and use the Python implementation instead of Cython.")

__all__ = ['loss_overall', 'loss_classspecific',
Expand Down
4 changes: 2 additions & 2 deletions pyhealth/datasets/base_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ def _task_transform(
while not result.ready():
try:
progress.update(queue.get(timeout=1))
except:
except Exception:
pass

# remaining items
Expand Down Expand Up @@ -897,7 +897,7 @@ def _proc_transform(
while not result.ready():
try:
progress.update(queue.get(timeout=1))
except:
except Exception:
pass

# remaining items
Expand Down
2 changes: 1 addition & 1 deletion pyhealth/metrics/ranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand Down