Revert "feat: add config for temp path and temp path cleanup on launch (#1992)" (#2502)

This reverts commit 85e8aa8ce2.
This commit is contained in:
Manuel Schmid
2024-03-10 21:08:55 +01:00
committed by GitHub
parent 85e8aa8ce2
commit 5409bfdb26
5 changed files with 15 additions and 67 deletions
+3 -17
View File
@@ -1,7 +1,6 @@
import os
import importlib
import importlib.util
import shutil
import subprocess
import sys
import re
@@ -10,6 +9,9 @@ import importlib.metadata
import packaging.version
from packaging.requirements import Requirement
logging.getLogger("torch.distributed.nn").setLevel(logging.ERROR) # sshh...
logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage())
@@ -99,19 +101,3 @@ def requirements_met(requirements_file):
return True
def delete_folder_content(folder, prefix=None):
result = True
for filename in os.listdir(folder):
file_path = os.path.join(folder, filename)
try:
if os.path.isfile(file_path) or os.path.islink(file_path):
os.unlink(file_path)
elif os.path.isdir(file_path):
shutil.rmtree(file_path)
except Exception as e:
print(f'{prefix}Failed to delete {file_path}. Reason: {e}')
result = False
return result