Skip to content

Commit 6f6f710

Browse files
committed
test
1 parent d415081 commit 6f6f710

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

.github/workflows/tpu-tests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ jobs:
6161
- name: Get pip cache dir
6262
id: pip-cache
6363
run: |
64-
pip3 install -U "pip<24"
6564
echo "pip_cache=$(pip cache dir)" >> $GITHUB_OUTPUT
6665
shell: bash -l {0}
6766

scripts/install_torch_xla.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import os
2+
import sys
23
import tempfile
34
import zipfile
45
from pathlib import Path
56
from urllib.request import urlopen
67

78

89
def main(python_version: str, xla_version: str) -> None:
9-
temp_dir = Path(tempfile.gettempdir()) / "torch_xla"
10+
temp_dir = Path(tempfile.mkdtemp()) / "torch_xla"
1011
temp_dir.mkdir(parents=True, exist_ok=True)
1112
pyver = python_version.replace(".", "")
1213
url = f"https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-{xla_version}-cp{pyver}-cp{pyver}-linux_x86_64.whl"
@@ -16,20 +17,19 @@ def main(python_version: str, xla_version: str) -> None:
1617

1718
with open(wheel_path, "b+w") as f:
1819
f.write(r.read())
19-
20+
2021
with zipfile.ZipFile(wheel_path, "r") as zip_ref:
21-
zip_ref.extractall(wheel_path.parent)
22+
zip_ref.extractall(wheel_path.parent)
2223

2324
dist = [p for p in os.listdir(temp_dir) if "dist-info" in p]
2425
if dist:
25-
pkg_name = dist[0].split(".dist-info")[0]
26+
pkg_name = dist[0].split(".dist-info")[0]
2627
wheel_path = wheel_path.rename(f"{pkg_name}{suffix}")
2728
cmd = ["uv", "pip", "install", str(wheel_path)]
2829
os.system(" ".join(cmd))
2930

30-
31+
3132
if __name__ == "__main__":
32-
import sys
3333
if len(sys.argv) == 3:
3434
python_version = sys.argv[1]
3535
xla_version = sys.argv[2]

0 commit comments

Comments
 (0)