From fffbd1925b4275a272762435cd7d6c1f6fb8d353 Mon Sep 17 00:00:00 2001 From: Xu Yang Date: Thu, 19 Sep 2024 13:31:27 +0800 Subject: [PATCH] fix a small bug in kaggle scenario caused by the second RAG update (#273) --- rdagent/app/kaggle/loop.py | 6 +----- rdagent/scenarios/kaggle/experiment/scenario.py | 2 +- rdagent/scenarios/kaggle/proposal/proposal.py | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/rdagent/app/kaggle/loop.py b/rdagent/app/kaggle/loop.py index 137cdb8a..d1728d4f 100644 --- a/rdagent/app/kaggle/loop.py +++ b/rdagent/app/kaggle/loop.py @@ -32,10 +32,6 @@ class ModelRDLoop(RDLoop): scen: Scenario = import_class(PROP_SETTING.scen)(PROP_SETTING.competition) logger.log_object(scen, tag="scenario") - self.vector_base = KaggleExperienceBase() - if KAGGLE_IMPLEMENT_SETTING.rag_path: - self.vector_base.load(KAGGLE_IMPLEMENT_SETTING.rag_path) - self.hypothesis_gen: HypothesisGen = import_class(PROP_SETTING.hypothesis_gen)(scen) logger.log_object(self.hypothesis_gen, tag="hypothesis generator") @@ -86,7 +82,7 @@ def main(path=None, step_n=None, competition=None): .. code-block:: bash - dotenv run -- python rdagent/app/kaggle/loop.py [--competition titanic] $LOG_PATH/__session__/1/0_propose --step_n 1 # `step_n` is a optional paramter + dotenv run -- python rdagent/app/kaggle/loop.py [--competition titanic] $LOG_PATH/__session__/1/0_propose --step_n 1 # `step_n` is a optional parameter rdagent kaggle --competition playground-series-s4e8 # You are encouraged to use this one. """ diff --git a/rdagent/scenarios/kaggle/experiment/scenario.py b/rdagent/scenarios/kaggle/experiment/scenario.py index 010e7100..59316cdb 100644 --- a/rdagent/scenarios/kaggle/experiment/scenario.py +++ b/rdagent/scenarios/kaggle/experiment/scenario.py @@ -38,7 +38,7 @@ class KGScenario(Scenario): # all competitions are based on the same vector base self.vector_base = KaggleExperienceBase() - if KAGGLE_IMPLEMENT_SETTING.rag_path: + if KAGGLE_IMPLEMENT_SETTING.rag_path and Path(KAGGLE_IMPLEMENT_SETTING.rag_path).exists(): self.vector_base.load(KAGGLE_IMPLEMENT_SETTING.rag_path) def _analysis_competition_description(self): diff --git a/rdagent/scenarios/kaggle/proposal/proposal.py b/rdagent/scenarios/kaggle/proposal/proposal.py index 0851e8d1..9883b7f7 100644 --- a/rdagent/scenarios/kaggle/proposal/proposal.py +++ b/rdagent/scenarios/kaggle/proposal/proposal.py @@ -93,7 +93,7 @@ class KGHypothesisGen(ModelHypothesisGen): context_dict = { "hypothesis_and_feedback": hypothesis_feedback, - "RAG": rag_content, + "RAG": None, "hypothesis_output_format": prompt_dict["hypothesis_output_format"], "hypothesis_specification": None, }