From 756dfba53f0b9099a29a188d49c8779dc93e2bc7 Mon Sep 17 00:00:00 2001 From: Linlang <30293408+SunsetWolf@users.noreply.github.com> Date: Fri, 4 Apr 2025 11:20:33 +0800 Subject: [PATCH] fix: fix kaggle templates path error (#747) * fix kaggle templates path error * add env.py dependence * reformat with lint --- pyproject.toml | 2 +- rdagent/scenarios/kaggle/experiment/kaggle_experiment.py | 8 ++------ requirements.txt | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 94ee72c2..10fe6d72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,7 +92,7 @@ ignore = [ "S101", "S301", "T20", - "TCH003", + "TC003", "TD", ] select = ["ALL"] diff --git a/rdagent/scenarios/kaggle/experiment/kaggle_experiment.py b/rdagent/scenarios/kaggle/experiment/kaggle_experiment.py index 20798857..e34cd986 100644 --- a/rdagent/scenarios/kaggle/experiment/kaggle_experiment.py +++ b/rdagent/scenarios/kaggle/experiment/kaggle_experiment.py @@ -38,9 +38,7 @@ class KGModelExperiment(ModelExperiment[ModelTask, KGFBWorkspace, ModelFBWorkspa def __init__(self, *args, source_feature_size: int = None, **kwargs) -> None: super().__init__(*args, **kwargs) self.experiment_workspace = KGFBWorkspace( - template_folder_path=Path(__file__).resolve() - / Path(KAGGLE_IMPLEMENT_SETTING.template_path).resolve() - / KAGGLE_IMPLEMENT_SETTING.competition + template_folder_path=Path(__file__).resolve().parent / "templates" / KAGGLE_IMPLEMENT_SETTING.competition ) if len(self.based_experiments) > 0: self.experiment_workspace.inject_files(**self.based_experiments[-1].experiment_workspace.file_dict) @@ -64,9 +62,7 @@ class KGFactorExperiment(FeatureExperiment[FactorTask, KGFBWorkspace, FactorFBWo def __init__(self, *args, source_feature_size: int = None, **kwargs) -> None: super().__init__(*args, **kwargs) self.experiment_workspace = KGFBWorkspace( - template_folder_path=Path(__file__).resolve() - / Path(KAGGLE_IMPLEMENT_SETTING.template_path).resolve() - / KAGGLE_IMPLEMENT_SETTING.competition + template_folder_path=Path(__file__).resolve().parent / "templates" / KAGGLE_IMPLEMENT_SETTING.competition ) if len(self.based_experiments) > 0: self.experiment_workspace.inject_files(**self.based_experiments[-1].experiment_workspace.file_dict) diff --git a/requirements.txt b/requirements.txt index 11f58e38..6cca53a3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,6 +11,7 @@ openai litellm azure.identity pyarrow +rich numpy # we use numpy as default data format. So we have to install numpy pandas # we use pandas as default data format. So we have to install pandas