Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
XianBW committed Oct 30, 2024
1 parent 244edc0 commit 0876170
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 6 additions & 4 deletions rdagent/scenarios/kaggle/kaggle_crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def kaggle_description_css_selectors() -> tuple[str, str]:
return descriptions


def download_data(competition: str, local_path: str = "/data/userdata/share/kaggle") -> None:
def download_data(competition: str, local_path: str = KAGGLE_IMPLEMENT_SETTING.local_data_path) -> None:
data_path = f"{local_path}/{competition}"
if not Path(data_path).exists():
subprocess.run(["kaggle", "competitions", "download", "-c", competition, "-p", data_path])
Expand Down Expand Up @@ -136,7 +136,7 @@ def score_rank(competition: str, score: float) -> tuple[int, float]:


def download_notebooks(
competition: str, local_path: str = "/data/userdata/share/kaggle/notebooks", num: int = 15
competition: str, local_path: str = f"{KAGGLE_IMPLEMENT_SETTING.local_data_path}/notebooks", num: int = 15
) -> None:
data_path = Path(f"{local_path}/{competition}")
from kaggle.api.kaggle_api_extended import KaggleApi
Expand Down Expand Up @@ -183,7 +183,9 @@ def notebook_to_knowledge(notebook_text: str) -> str:
return response


def convert_notebooks_to_text(competition: str, local_path: str = "/data/userdata/share/kaggle/notebooks") -> None:
def convert_notebooks_to_text(
competition: str, local_path: str = f"{KAGGLE_IMPLEMENT_SETTING.local_data_path}/notebooks"
) -> None:
data_path = Path(f"{local_path}/{competition}")
converted_num = 0

Expand Down Expand Up @@ -219,7 +221,7 @@ def convert_notebooks_to_text(competition: str, local_path: str = "/data/userdat
print(f"Converted {converted_num} notebooks to text files.")


def collect_knowledge_texts(local_path: str = "/data/userdata/share/kaggle") -> dict[str, list[str]]:
def collect_knowledge_texts(local_path: str = KAGGLE_IMPLEMENT_SETTING.local_data_path) -> dict[str, list[str]]:
"""
{
"competition1": [
Expand Down
2 changes: 0 additions & 2 deletions rdagent/utils/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ class Config:
# Path("git_ignore_folder/data").resolve(): "/root/.data/"
# }

# local_data_path: str = "/data/userdata/share/kaggle"


# physionet.org/files/mimic-eicu-fiddle-feature/1.0.0/FIDDLE_mimic3
class DockerEnv(Env[DockerConf]):
Expand Down

0 comments on commit 0876170

Please sign in to comment.