fix: fix kaggle templates path error (#747)

* fix kaggle templates path error

* add env.py dependence

* reformat with lint
This commit is contained in:
Linlang
2025-04-04 11:20:33 +08:00
committed by GitHub
parent 1f0032bc50
commit 756dfba53f
3 changed files with 4 additions and 7 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ ignore = [
"S101",
"S301",
"T20",
"TCH003",
"TC003",
"TD",
]
select = ["ALL"]
@@ -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)
+1
View File
@@ -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