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 af9582a0a7
commit cd5681ea96
3 changed files with 4 additions and 7 deletions
@@ -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)