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
This commit is contained in:
WinstonLiyt
2024-10-31 16:04:32 +08:00
committed by GitHub
parent b91e578179
commit 44271ecfd4
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -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()
@@ -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}")