mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-27 15:37:44 +00:00
small bugs in cache rerun (#597)
This commit is contained in:
@@ -133,8 +133,8 @@ class FBWorkspace(Workspace):
|
||||
Helper function to format the code dictionary into a string.
|
||||
"""
|
||||
code_string = ""
|
||||
for file_name, code in code_dict.items():
|
||||
code_string += f"\nFile Path: {file_name}\n```\n{code}\n```"
|
||||
for file_name in sorted(code_dict.keys()):
|
||||
code_string += f"\nFile Path: {file_name}\n```\n{code_dict[file_name]}\n```"
|
||||
return code_string
|
||||
|
||||
@property
|
||||
|
||||
@@ -11,6 +11,7 @@ import json
|
||||
import os
|
||||
import pickle
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import time
|
||||
import uuid
|
||||
@@ -416,6 +417,7 @@ class DockerEnv(Env[DockerConf]):
|
||||
"""
|
||||
Unzip a file into a folder, use zipfile instead of subprocess
|
||||
"""
|
||||
shutil.rmtree(folder_path, ignore_errors=True)
|
||||
with zipfile.ZipFile(zip_file_path, "r") as z:
|
||||
z.extractall(folder_path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user