This commit is contained in:
@@ -72,11 +72,12 @@ def clean_artifacts(root: Path | None, models: list[str], arches: list[str]) ->
|
||||
removed = 0
|
||||
for name in models:
|
||||
base = model_dir(root, name)
|
||||
for arch in arches:
|
||||
for path in (base / arch / "latency", base / arch / "throughput"):
|
||||
if path.is_dir() and not path.is_symlink():
|
||||
shutil.rmtree(path)
|
||||
removed += 1
|
||||
arch_dirs = {base / arch for arch in arches}
|
||||
arch_dirs.update(path for path in base.glob("arch-*") if path.is_dir() and not path.is_symlink())
|
||||
for path in arch_dirs:
|
||||
if path.is_dir() and not path.is_symlink():
|
||||
shutil.rmtree(path)
|
||||
removed += 1
|
||||
common = base / "common"
|
||||
if common.is_dir() and not common.is_symlink():
|
||||
shutil.rmtree(common)
|
||||
|
||||
Reference in New Issue
Block a user