Skip to content

Commit 3f53c27

Browse files
fix: Pin proper torch/xla image for pytorch_multislice DAG (GoogleCloudPlatform#1281)
The main issue was that the image `us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:nightly_3.10_tpuvm_{DATE}` was deprecated and only the latest image is pinned now in the repository. This is the last image available --> `nightly_3.10_tpuvm` Co-authored-by: Camilo Quinones <camilo.quinones@cienet.com>
1 parent d347245 commit 3f53c27

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

dags/common/vm_resource.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,10 @@ class DockerImage(enum.Enum):
338338
"gcr.io/cloud-tpu-multipod-dev/maxtext-orbax-custom:"
339339
f"{datetime.datetime.today().strftime('%Y-%m-%d')}"
340340
)
341+
# Pinned to latest available image for torch/xla
341342
PYTORCH_NIGHTLY = (
342343
"us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/"
343-
f"xla:nightly_3.10_tpuvm_{datetime.datetime.today().strftime('%Y%m%d')}"
344+
"xla:nightly_3.10_tpuvm"
344345
)
345346
AXLEARN_CUSTOM = (
346347
# AXLearn's Docker/Artifact Registry bundler uses the run/workload name as

dags/multipod/pytorch.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,16 @@
3939

4040
for num_slices, cluster in [(1, v4_8), (2, v4_8), (1, v4_16)]:
4141
ici_chips = 4 if cluster == v4_8 else 8
42+
43+
# TODO(b/519376514): Remove the installation of libraries once resolved.
44+
#
45+
# The original image included all essential libraries, but it
46+
# was deleted from the Artifact Registry.
47+
# Only an older version remains, which lacks these essential libraries.
48+
install_extra_libs = "apt-get update && apt-get install -y libopenblas-dev"
4249
run_cmds = (
4350
(
51+
f"{install_extra_libs} && "
4452
"python /pytorch/xla/test/spmd/test_sharding_strategies.py "
4553
f"--ici_fsdp_parallelism {ici_chips} "
4654
f"--dcn_data_parallelism {num_slices}"
@@ -61,6 +69,7 @@
6169
f"export CHKPT_PATH={metric_config.SshEnvVars.GCS_OUTPUT.value}",
6270
"pip install gcsfs",
6371
(
72+
f"{install_extra_libs} && "
6473
"python /pytorch/xla/test/spmd/test_xla_distributed_checkpoint.py "
6574
"EndToEndCheckpointTest.test_multihost_checkpoint"
6675
),

0 commit comments

Comments
 (0)