From 44271ecfd47caccde36a9eae5fab46e9e4a7ab9a Mon Sep 17 00:00:00 2001 From: WinstonLiyt <104308117+WinstonLiyt@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:04:32 +0800 Subject: [PATCH] feat: refine logic for qlib_factor_from_report (#463) * fix a bug in kaggle conf * fix a ci error * refine logic for qlib_factor_from_report --- rdagent/app/qlib_rd_loop/conf.py | 3 +++ rdagent/app/qlib_rd_loop/factor_from_report.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/rdagent/app/qlib_rd_loop/conf.py b/rdagent/app/qlib_rd_loop/conf.py index 9f8882a4..b30bee41 100644 --- a/rdagent/app/qlib_rd_loop/conf.py +++ b/rdagent/app/qlib_rd_loop/conf.py @@ -75,6 +75,9 @@ class FactorFromReportPropSetting(FactorBasePropSetting): max_factors_per_exp: int = 10000 """Maximum number of factors implemented per experiment""" + is_report_limit_enabled: bool = False + """Limits report processing count if True; processes all if False""" + FACTOR_PROP_SETTING = FactorBasePropSetting() FACTOR_FROM_REPORT_PROP_SETTING = FactorFromReportPropSetting() diff --git a/rdagent/app/qlib_rd_loop/factor_from_report.py b/rdagent/app/qlib_rd_loop/factor_from_report.py index 60367660..2acab101 100644 --- a/rdagent/app/qlib_rd_loop/factor_from_report.py +++ b/rdagent/app/qlib_rd_loop/factor_from_report.py @@ -122,7 +122,7 @@ class FactorReportLoop(FactorRDLoop, metaclass=LoopMeta): def propose_hypo_exp(self, prev_out: dict[str, Any]): with logger.tag("r"): while True: - if self.valid_pdf_file_count > 15: + if FACTOR_FROM_REPORT_PROP_SETTING.is_report_limit_enabled and self.valid_pdf_file_count > 15: break report_file_path = self.judge_pdf_data_items[self.pdf_file_index] logger.info(f"Processing number {self.pdf_file_index} report: {report_file_path}")