From 9d3483daab2b11a7b7ddb4f35c15d45c68a56bf1 Mon Sep 17 00:00:00 2001 From: TPTBusiness Date: Wed, 29 Apr 2026 17:08:50 +0200 Subject: [PATCH] fix(security): add logging to except block in quant_proposal.py (B110 #741) --- rdagent/scenarios/qlib/proposal/quant_proposal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rdagent/scenarios/qlib/proposal/quant_proposal.py b/rdagent/scenarios/qlib/proposal/quant_proposal.py index b42d926f..320891ba 100644 --- a/rdagent/scenarios/qlib/proposal/quant_proposal.py +++ b/rdagent/scenarios/qlib/proposal/quant_proposal.py @@ -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}")