Skip to content

Commit 140fdcc

Browse files
authored
fix a small bug in kaggle scenario caused by the second RAG update (microsoft#273)
1 parent 7850b80 commit 140fdcc

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

rdagent/app/kaggle/loop.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ def __init__(self, PROP_SETTING: BasePropSetting):
3232
scen: Scenario = import_class(PROP_SETTING.scen)(PROP_SETTING.competition)
3333
logger.log_object(scen, tag="scenario")
3434

35-
self.vector_base = KaggleExperienceBase()
36-
if KAGGLE_IMPLEMENT_SETTING.rag_path:
37-
self.vector_base.load(KAGGLE_IMPLEMENT_SETTING.rag_path)
38-
3935
self.hypothesis_gen: HypothesisGen = import_class(PROP_SETTING.hypothesis_gen)(scen)
4036
logger.log_object(self.hypothesis_gen, tag="hypothesis generator")
4137

@@ -86,7 +82,7 @@ def main(path=None, step_n=None, competition=None):
8682
8783
.. code-block:: bash
8884
89-
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
85+
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
9086
rdagent kaggle --competition playground-series-s4e8 # You are encouraged to use this one.
9187
9288
"""

rdagent/scenarios/kaggle/experiment/scenario.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self, competition: str) -> None:
3838

3939
# all competitions are based on the same vector base
4040
self.vector_base = KaggleExperienceBase()
41-
if KAGGLE_IMPLEMENT_SETTING.rag_path:
41+
if KAGGLE_IMPLEMENT_SETTING.rag_path and Path(KAGGLE_IMPLEMENT_SETTING.rag_path).exists():
4242
self.vector_base.load(KAGGLE_IMPLEMENT_SETTING.rag_path)
4343

4444
def _analysis_competition_description(self):

rdagent/scenarios/kaggle/proposal/proposal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def prepare_context(self, trace: Trace) -> Tuple[dict, bool]:
9393

9494
context_dict = {
9595
"hypothesis_and_feedback": hypothesis_feedback,
96-
"RAG": rag_content,
96+
"RAG": None,
9797
"hypothesis_output_format": prompt_dict["hypothesis_output_format"],
9898
"hypothesis_specification": None,
9999
}

0 commit comments

Comments
 (0)