fix: fix quick start problem (#191)

* all update code

* fix a small bug
This commit is contained in:
Xu Yang
2024-08-09 12:58:34 +08:00
committed by GitHub
parent 77faf5ed21
commit 007b632497
9 changed files with 20 additions and 93 deletions
@@ -103,9 +103,15 @@ def extract_hypothesis_and_exp_from_reports(report_file_path: str) -> Tuple[Qlib
class FactorReportLoop(FactorRDLoop, metaclass=LoopMeta):
def __init__(self, PROP_SETTING: FACTOR_FROM_REPORT_PROP_SETTING):
super().__init__(PROP_SETTING=PROP_SETTING)
self.judge_pdf_data_items = json.load(open(PROP_SETTING.report_result_json_file_path, "r"))
def __init__(self, report_folder: str = None):
super().__init__(PROP_SETTING=FACTOR_FROM_REPORT_PROP_SETTING)
if report_folder is None:
self.judge_pdf_data_items = json.load(
open(FACTOR_FROM_REPORT_PROP_SETTING.report_result_json_file_path, "r")
)
else:
self.judge_pdf_data_items = Path(report_folder).rglob("*.pdf")
self.pdf_file_index = 0
self.valid_pdf_file_count = 0
self.current_loop_hypothesis = None