reporeformat V2 (#23)

* reformat factor implement process

* move some code to more reasonable place

* fix the bug

* add test function in factor_extract_and_implement.py

* change select factor number to ratio , add some factor implement setting and fix some bug while using knowledgebase

* change evoagent

* add abstract class EvoAgent

* add benchmark workflow

* fix some bug in llm_utils

* run wenjun's code

* fix the knowledgebase instance check

---------

Co-authored-by: xuyang1 <xuyang1@microsoft.com>
This commit is contained in:
USTCKevinF
2024-06-14 12:59:44 +08:00
committed by GitHub
parent 9e82da243b
commit ebb659a018
32 changed files with 2227 additions and 1141 deletions
@@ -8,8 +8,13 @@ from rdagent.document_process.document_analysis import (
deduplicate_factors_by_llm,
extract_factors_from_report_dict,
merge_file_to_factor_dict_to_factor_dict,
classify_report_from_dict,
)
from rdagent.document_process.document_reader import load_and_process_pdfs_by_langchain
from rdagent.factor_implementation.share_modules.factor_implementation_utils import load_data_from_dict
from rdagent.factor_implementation.CoSTEER import CoSTEERFG
import pickle
from dotenv import load_dotenv
def extract_factors_and_implement(report_file_path: str) -> None:
@@ -24,6 +29,15 @@ def extract_factors_and_implement(report_file_path: str) -> None:
factor_dict, duplication_names_list = deduplicate_factors_by_llm(factor_dict, factor_viability)
factor_tasks = load_data_from_dict(factor_dict)
factor_generate_method = CoSTEERFG()
result = factor_generate_method.generate(factor_tasks)
return result
if __name__ == "__main__":
extract_factors_and_implement("/home/xuyang1/workspace/report.pdf")
# test_implement()