Improve exception handling
This commit is contained in:
parent
5db21468c2
commit
4c8b142db3
|
@ -27,11 +27,12 @@ def calibration_curve(y_true, y_prob, *, n_bins=5, strategy="uniform"):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
binids = np.digitize(y_prob, bins) - 1
|
binids = np.digitize(y_prob, bins) - 1
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
np.set_printoptions(threshold=sys.maxsize)
|
np.set_printoptions(threshold=sys.maxsize)
|
||||||
logging.info("=" * 40)
|
logging.info("=" * 40)
|
||||||
logging.info(f"n_bins={n_bins}, strategy={strategy}")
|
logging.info(f"n_bins={n_bins}, strategy={strategy}")
|
||||||
logging.info(f"y_true={repr(y_prob)}")
|
logging.info(f"y_prob={repr(y_prob)}")
|
||||||
logging.info(f"bins={repr(bins)}")
|
logging.info(f"bins={repr(bins)}")
|
||||||
logging.info("=" * 40)
|
logging.info("=" * 40)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user