mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
d1019cb568
* fix model input shape bug and costeer_model bug * fix a bug * fix a bug in docker result extraction * a system-level optimization * add a filter of stdout * update * add stdout to model * model training_hyperparameters update * quant scenario * update some quant settings * llm choose action * Thompson Sampling Bandit for action choosing * refine both scens * add trace messages for quant scen * fix some bugs * fix some bugs * update * update * update * fix * fix * fix * update for merge * fix ci * fix some bugs * fix ci * fix ci * fix ci * fix ci * refactor * default qlib4rdagent local env downloading * fix ci * fix ci * fix a bug * fix ci * fix: align all prompts on template (#908) * use template to render all prompts * fix CI --------- Co-authored-by: Xu Yang <xuyang1@microsoft.com> * add fin_quant in cli * fix a bug * fix ci * fix some bugs * refactor * remove the columns in hypothesis if no value generated in this column * fix a bug * fix ci * fix conda env * add qlib gitignore * remove existed qlib folder & install torch in qlib conda * fix workspace ui in feedback * align model config in coder and runner in docker or conda * fix CI * fix CI --------- Co-authored-by: Xu Yang <peteryang@vip.qq.com> Co-authored-by: Xu Yang <xuyang1@microsoft.com>
121 lines
4.6 KiB
Python
121 lines
4.6 KiB
Python
from pydantic_settings import SettingsConfigDict
|
|
|
|
from rdagent.components.workflow.conf import BasePropSetting
|
|
|
|
|
|
class ModelBasePropSetting(BasePropSetting):
|
|
model_config = SettingsConfigDict(env_prefix="QLIB_MODEL_", protected_namespaces=())
|
|
|
|
# 1) override base settings
|
|
scen: str = "rdagent.scenarios.qlib.experiment.model_experiment.QlibModelScenario"
|
|
"""Scenario class for Qlib Model"""
|
|
|
|
hypothesis_gen: str = "rdagent.scenarios.qlib.proposal.model_proposal.QlibModelHypothesisGen"
|
|
"""Hypothesis generation class"""
|
|
|
|
hypothesis2experiment: str = "rdagent.scenarios.qlib.proposal.model_proposal.QlibModelHypothesis2Experiment"
|
|
"""Hypothesis to experiment class"""
|
|
|
|
coder: str = "rdagent.scenarios.qlib.developer.model_coder.QlibModelCoSTEER"
|
|
"""Coder class"""
|
|
|
|
runner: str = "rdagent.scenarios.qlib.developer.model_runner.QlibModelRunner"
|
|
"""Runner class"""
|
|
|
|
summarizer: str = "rdagent.scenarios.qlib.developer.feedback.QlibModelExperiment2Feedback"
|
|
"""Summarizer class"""
|
|
|
|
evolving_n: int = 10
|
|
"""Number of evolutions"""
|
|
|
|
|
|
class FactorBasePropSetting(BasePropSetting):
|
|
model_config = SettingsConfigDict(env_prefix="QLIB_FACTOR_", protected_namespaces=())
|
|
|
|
# 1) override base settings
|
|
scen: str = "rdagent.scenarios.qlib.experiment.factor_experiment.QlibFactorScenario"
|
|
"""Scenario class for Qlib Factor"""
|
|
|
|
hypothesis_gen: str = "rdagent.scenarios.qlib.proposal.factor_proposal.QlibFactorHypothesisGen"
|
|
"""Hypothesis generation class"""
|
|
|
|
hypothesis2experiment: str = "rdagent.scenarios.qlib.proposal.factor_proposal.QlibFactorHypothesis2Experiment"
|
|
"""Hypothesis to experiment class"""
|
|
|
|
coder: str = "rdagent.scenarios.qlib.developer.factor_coder.QlibFactorCoSTEER"
|
|
"""Coder class"""
|
|
|
|
runner: str = "rdagent.scenarios.qlib.developer.factor_runner.QlibFactorRunner"
|
|
"""Runner class"""
|
|
|
|
summarizer: str = "rdagent.scenarios.qlib.developer.feedback.QlibFactorExperiment2Feedback"
|
|
"""Summarizer class"""
|
|
|
|
evolving_n: int = 10
|
|
"""Number of evolutions"""
|
|
|
|
|
|
class FactorFromReportPropSetting(FactorBasePropSetting):
|
|
# 1) override the scen attribute
|
|
scen: str = "rdagent.scenarios.qlib.experiment.factor_from_report_experiment.QlibFactorFromReportScenario"
|
|
"""Scenario class for Qlib Factor from Report"""
|
|
|
|
# 2) sub task specific:
|
|
report_result_json_file_path: str = "git_ignore_folder/report_list.json"
|
|
"""Path to the JSON file listing research reports for factor extraction"""
|
|
|
|
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"""
|
|
|
|
|
|
class QuantBasePropSetting(BasePropSetting):
|
|
model_config = SettingsConfigDict(env_prefix="QLIB_QUANT_", protected_namespaces=())
|
|
|
|
# 1) override base settings
|
|
scen: str = "rdagent.scenarios.qlib.experiment.quant_experiment.QlibQuantScenario"
|
|
"""Scenario class for Qlib Model"""
|
|
|
|
quant_hypothesis_gen: str = "rdagent.scenarios.qlib.proposal.quant_proposal.QlibQuantHypothesisGen"
|
|
"""Hypothesis generation class"""
|
|
|
|
model_hypothesis2experiment: str = "rdagent.scenarios.qlib.proposal.model_proposal.QlibModelHypothesis2Experiment"
|
|
"""Hypothesis to experiment class"""
|
|
|
|
model_coder: str = "rdagent.scenarios.qlib.developer.model_coder.QlibModelCoSTEER"
|
|
"""Coder class"""
|
|
|
|
model_runner: str = "rdagent.scenarios.qlib.developer.model_runner.QlibModelRunner"
|
|
"""Runner class"""
|
|
|
|
model_summarizer: str = "rdagent.scenarios.qlib.developer.feedback.QlibModelExperiment2Feedback"
|
|
"""Summarizer class"""
|
|
|
|
factor_hypothesis2experiment: str = (
|
|
"rdagent.scenarios.qlib.proposal.factor_proposal.QlibFactorHypothesis2Experiment"
|
|
)
|
|
"""Hypothesis to experiment class"""
|
|
|
|
factor_coder: str = "rdagent.scenarios.qlib.developer.factor_coder.QlibFactorCoSTEER"
|
|
"""Coder class"""
|
|
|
|
factor_runner: str = "rdagent.scenarios.qlib.developer.factor_runner.QlibFactorRunner"
|
|
"""Runner class"""
|
|
|
|
factor_summarizer: str = "rdagent.scenarios.qlib.developer.feedback.QlibFactorExperiment2Feedback"
|
|
"""Summarizer class"""
|
|
|
|
evolving_n: int = 10
|
|
"""Number of evolutions"""
|
|
|
|
action_selection: str = "bandit"
|
|
"""Action selection strategy: 'bandit' for bandit-based selection, 'llm' for LLM-based selection, 'random' for random selection"""
|
|
|
|
|
|
FACTOR_PROP_SETTING = FactorBasePropSetting()
|
|
FACTOR_FROM_REPORT_PROP_SETTING = FactorFromReportPropSetting()
|
|
MODEL_PROP_SETTING = ModelBasePropSetting()
|
|
QUANT_PROP_SETTING = QuantBasePropSetting()
|