mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 23:47:46 +00:00
fix: Use fixed file name in model costeer & fixing cache (#311)
* use fixed name in model costeer to enable cache * fix ci
This commit is contained in:
@@ -327,11 +327,12 @@ class DockerEnv(Env[DockerConf]):
|
||||
local_path: str | None = None,
|
||||
env: dict | None = None,
|
||||
running_extra_volume: dict | None = None,
|
||||
code_dump_file_py_name: Optional[str] = None,
|
||||
):
|
||||
"""
|
||||
Dump the code into the local path and run the code.
|
||||
"""
|
||||
random_file_name = f"{uuid.uuid4()}.py"
|
||||
random_file_name = f"{uuid.uuid4()}.py" if code_dump_file_py_name is None else f"{code_dump_file_py_name}.py"
|
||||
with open(os.path.join(local_path, random_file_name), "w") as f:
|
||||
f.write(code)
|
||||
entry = f"python {random_file_name}"
|
||||
|
||||
Reference in New Issue
Block a user