[ez][CI] Reuse old whl: remove old zip/whl (#154770)

Forgot that unzip doesn't get rid of the zip so the old one is still there

Unrelated: figure out how to update the git version
Pull Request resolved: https://github.com/pytorch/pytorch/pull/154770
Approved by: https://github.com/ZainRizvi, https://github.com/malfet
This commit is contained in:
Catherine Lee 2025-05-31 00:13:24 +00:00 committed by PyTorch MergeBot
parent 0fab32290a
commit b019a33f8f

View File

@ -207,6 +207,10 @@ def unzip_artifact_and_replace_files() -> None:
subprocess.check_output( subprocess.check_output(
["unzip", "-o", new_path, "-d", f"artifacts/dist/{new_path.stem}"], ["unzip", "-o", new_path, "-d", f"artifacts/dist/{new_path.stem}"],
) )
# Remove the old wheel (which is now a zip file)
os.remove(new_path)
# Copy python files into the artifact # Copy python files into the artifact
subprocess.check_output( subprocess.check_output(
["rsync", "-avz", "torch", f"artifacts/dist/{new_path.stem}"], ["rsync", "-avz", "torch", f"artifacts/dist/{new_path.stem}"],