Skip to content

Commit

Permalink
fix: fix a bug in kaggle conf (#459)
Browse files Browse the repository at this point in the history
* fix a bug in kaggle conf

* fix a ci error
  • Loading branch information
WinstonLiyt authored Oct 29, 2024
1 parent 58cf397 commit b4ed32b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions rdagent/app/kaggle/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ class Config:
"""Enable advanced graph-based RAG"""

# Conditionally set the knowledge_base based on the use of graph RAG
knowledge_base: str = (
"rdagent.scenarios.kaggle.knowledge_management.graph.KGKnowledgeGraph" if if_using_graph_rag else ""
)
knowledge_base: str = ""
"""Knowledge base class, uses 'KGKnowledgeGraph' when advanced graph-based RAG is enabled, otherwise empty."""

knowledge_base_path: str = "kg_graph.pkl"
Expand Down
4 changes: 4 additions & 0 deletions rdagent/app/kaggle/loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ def main(path=None, step_n=None, competition=None):
if competition:
KAGGLE_IMPLEMENT_SETTING.competition = competition
download_data(competition=competition, local_path=KAGGLE_IMPLEMENT_SETTING.local_data_path)
if KAGGLE_IMPLEMENT_SETTING.if_using_graph_rag:
KAGGLE_IMPLEMENT_SETTING.knowledge_base = (
"rdagent.scenarios.kaggle.knowledge_management.graph.KGKnowledgeGraph"
)
else:
logger.error("Please specify competition name.")
if path is None:
Expand Down

0 comments on commit b4ed32b

Please sign in to comment.