mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
fix: kaggle data mount problem (#297)
* fix kaggle data founding in feature running * fix CI
This commit is contained in:
@@ -48,6 +48,11 @@ class KGFBWorkspace(FBWorkspace):
|
||||
"X_test.pkl",
|
||||
"passenger_ids.pkl",
|
||||
],
|
||||
running_extra_volume=(
|
||||
{KAGGLE_IMPLEMENT_SETTING.local_data_path + "/" + KAGGLE_IMPLEMENT_SETTING.competition: "/kaggle/input"}
|
||||
if KAGGLE_IMPLEMENT_SETTING.competition
|
||||
else None
|
||||
),
|
||||
)
|
||||
if results is None:
|
||||
logger.error("Feature preprocess failed.")
|
||||
|
||||
@@ -321,7 +321,12 @@ class DockerEnv(Env[DockerConf]):
|
||||
raise RuntimeError(f"Error while running the container: {e}")
|
||||
|
||||
def dump_python_code_run_and_get_results(
|
||||
self, code: str, dump_file_names: list[str], local_path: str | None = None, env: dict | None = None
|
||||
self,
|
||||
code: str,
|
||||
dump_file_names: list[str],
|
||||
local_path: str | None = None,
|
||||
env: dict | None = None,
|
||||
running_extra_volume: dict | None = None,
|
||||
):
|
||||
"""
|
||||
Dump the code into the local path and run the code.
|
||||
@@ -330,7 +335,7 @@ class DockerEnv(Env[DockerConf]):
|
||||
with open(os.path.join(local_path, random_file_name), "w") as f:
|
||||
f.write(code)
|
||||
entry = f"python {random_file_name}"
|
||||
log_output = self.run(entry, local_path, env)
|
||||
log_output = self.run(entry, local_path, env, running_extra_volume=running_extra_volume)
|
||||
results = []
|
||||
os.remove(os.path.join(local_path, random_file_name))
|
||||
for name in dump_file_names:
|
||||
|
||||
Reference in New Issue
Block a user