fix a small bug in kaggle scenario caused by the second RAG update (#273)

This commit is contained in:
Xu Yang
2024-09-19 13:31:27 +08:00
committed by GitHub
parent 48c227a2e0
commit fffbd1925b
3 changed files with 3 additions and 7 deletions
+1 -5
View File
@@ -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.
"""
@@ -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):
@@ -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,
}