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