From 812e3921daa6f170a7828c875576f29f3b819484 Mon Sep 17 00:00:00 2001 From: Xu Yang Date: Thu, 11 Jul 2024 18:02:51 +0800 Subject: [PATCH] Fix a bug when proposing model ideas using factor as key words (#63) --- rdagent/components/proposal/model_proposal.py | 8 ++++---- rdagent/scenarios/qlib/prompts.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rdagent/components/proposal/model_proposal.py b/rdagent/components/proposal/model_proposal.py index 57696296..31f1711b 100644 --- a/rdagent/components/proposal/model_proposal.py +++ b/rdagent/components/proposal/model_proposal.py @@ -36,7 +36,7 @@ class ModelHypothesisGen(HypothesisGen): Environment(undefined=StrictUndefined) .from_string(prompt_dict["hypothesis_gen"]["system_prompt"]) .render( - targets="factors", + targets="model", scenario=self.scen.get_scenario_all_desc(), hypothesis_output_format=context_dict["hypothesis_output_format"], ) @@ -45,7 +45,7 @@ class ModelHypothesisGen(HypothesisGen): Environment(undefined=StrictUndefined) .from_string(prompt_dict["hypothesis_gen"]["user_prompt"]) .render( - targets="factors", + targets="model", hypothesis_and_feedback=context_dict["hypothesis_and_feedback"], RAG=context_dict["RAG"], ) @@ -74,7 +74,7 @@ class ModelHypothesis2Experiment(Hypothesis2Experiment[ModelExperiment]): Environment(undefined=StrictUndefined) .from_string(prompt_dict["hypothesis2experiment"]["system_prompt"]) .render( - targets="factors", + targets="model", scenario=trace.scen.get_scenario_all_desc(), experiment_output_format=context["experiment_output_format"], ) @@ -83,7 +83,7 @@ class ModelHypothesis2Experiment(Hypothesis2Experiment[ModelExperiment]): Environment(undefined=StrictUndefined) .from_string(prompt_dict["hypothesis2experiment"]["user_prompt"]) .render( - targets="factors", + targets="model", target_hypothesis=context["target_hypothesis"], hypothesis_and_feedback=context["hypothesis_and_feedback"], target_list=context["target_list"], diff --git a/rdagent/scenarios/qlib/prompts.yaml b/rdagent/scenarios/qlib/prompts.yaml index a10ef598..5ae3ba69 100644 --- a/rdagent/scenarios/qlib/prompts.yaml +++ b/rdagent/scenarios/qlib/prompts.yaml @@ -44,7 +44,7 @@ model_experiment_output_format: |- "variable or function name 1": "description of variable or function 1", "variable or function name 2": "description of variable or function 2" } - "model_type": "type of model 1, Tabular or TimesSeries" + "model_type": "type of model 1, Tabular or TimesSeries" # Should be one of "Tabular" or "TimeSeries" } # Don't add ellipsis (...) or any filler text that might cause JSON parsing errors here! } \ No newline at end of file