fix(security): add logging to except block in quant_proposal.py (B110 #741)

This commit is contained in:
TPTBusiness
2026-04-29 17:08:50 +02:00
parent 4259a12e64
commit 9d3483daab
@@ -1,3 +1,4 @@
import logging
import json
import os
import random
@@ -175,7 +176,7 @@ class QlibQuantHypothesisGen(FactorAndModelHypothesisGen):
ic_val = exp.result.loc["IC"] if "IC" in exp.result.index else ""
ic_str = f" IC={ic_val:.4f}" if ic_val != "" else ""
except Exception:
pass
logging.debug("Error getting IC from result", exc_info=True)
decision_str = "PASS" if fb.decision else "FAIL"
obs_short = (fb.observations or "")[:120].replace("\n", " ")
summary_lines.append(f"- [{decision_str}]{ic_str} {names_str}: {obs_short}")