Skip to content

Commit 3b3f504

Browse files
authored
fix: fix kaggle templates path error (#747)
* fix kaggle templates path error * add env.py dependence * reformat with lint
1 parent 3265fe7 commit 3b3f504

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ ignore = [
9292
"S101",
9393
"S301",
9494
"T20",
95-
"TCH003",
95+
"TC003",
9696
"TD",
9797
]
9898
select = ["ALL"]

rdagent/scenarios/kaggle/experiment/kaggle_experiment.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ class KGModelExperiment(ModelExperiment[ModelTask, KGFBWorkspace, ModelFBWorkspa
3838
def __init__(self, *args, source_feature_size: int = None, **kwargs) -> None:
3939
super().__init__(*args, **kwargs)
4040
self.experiment_workspace = KGFBWorkspace(
41-
template_folder_path=Path(__file__).resolve()
42-
/ Path(KAGGLE_IMPLEMENT_SETTING.template_path).resolve()
43-
/ KAGGLE_IMPLEMENT_SETTING.competition
41+
template_folder_path=Path(__file__).resolve().parent / "templates" / KAGGLE_IMPLEMENT_SETTING.competition
4442
)
4543
if len(self.based_experiments) > 0:
4644
self.experiment_workspace.inject_files(**self.based_experiments[-1].experiment_workspace.file_dict)
@@ -64,9 +62,7 @@ class KGFactorExperiment(FeatureExperiment[FactorTask, KGFBWorkspace, FactorFBWo
6462
def __init__(self, *args, source_feature_size: int = None, **kwargs) -> None:
6563
super().__init__(*args, **kwargs)
6664
self.experiment_workspace = KGFBWorkspace(
67-
template_folder_path=Path(__file__).resolve()
68-
/ Path(KAGGLE_IMPLEMENT_SETTING.template_path).resolve()
69-
/ KAGGLE_IMPLEMENT_SETTING.competition
65+
template_folder_path=Path(__file__).resolve().parent / "templates" / KAGGLE_IMPLEMENT_SETTING.competition
7066
)
7167
if len(self.based_experiments) > 0:
7268
self.experiment_workspace.inject_files(**self.based_experiments[-1].experiment_workspace.file_dict)

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ openai
1111
litellm
1212
azure.identity
1313
pyarrow
14+
rich
1415

1516
numpy # we use numpy as default data format. So we have to install numpy
1617
pandas # we use pandas as default data format. So we have to install pandas

0 commit comments

Comments
 (0)