Skip to content

Commit 9708252

Browse files
author
Camilo QUINONES
committed
add a new DAG 'maxtext_multi_tier_sav01_save_local' GoogleCloudPlatform#804
1 parent 50c20e1 commit 9708252

4 files changed

Lines changed: 22 additions & 4 deletions

File tree

dags/common/test_owner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Team(enum.Enum):
5454
# Multi-tier Checkpointing
5555
ABHINAV_S = "ABHINAV S."
5656
XUEFENG_G = "XUEFENG G."
57-
ERNIE_C = "ERNIE C."
57+
CAMILO= "CAMILO Q."
5858

5959
# MLCompass
6060
ORTI_B = "Orti B."

dags/common/vm_resource.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,13 @@ class XpkClusters:
256256
project=Project.CLOUD_TPU_MULTIPOD_DEV.value,
257257
zone=Zone.EUROPE_WEST4_B.value,
258258
)
259+
TPU_V5P_128_CLUSTER_ORBAX = XpkClusterConfig(
260+
name="b428061876-jf-v5p-128-2",
261+
device_version=TpuVersion.V5P,
262+
core_count=128,
263+
project=Project.CLOUD_TPU_MULTIPOD_DEV.value,
264+
zone=Zone.EUROPE_WEST4_B.value,
265+
)
259266
TPU_V5E_256_CLUSTER = XpkClusterConfig(
260267
name="v5e-256-bodaborg-europe-west4",
261268
device_version=TpuVersion.V5E,

dags/orbax/maxtext_multi_tier_chechpoint_save_local.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
)]
3737
ram_disk = "/local"
3838
test_configs = {"v5p-128": [2]}
39-
clusters = {"v5p-128": XpkClusters.TPU_V5P_128_CLUSTER}
39+
clusters = {"v5p-128": XpkClusters.TPU_V5P_128_CLUSTER_ORBAX}
4040
step = 100
4141
local_checkpoint_period = 20
4242
replicator_backup_interval_minutes = 1
@@ -83,7 +83,7 @@
8383
test_name=f"{name_prefix}",
8484
run_model_cmds=workload_command,
8585
docker_image=image.value,
86-
test_owner=test_owner.ERNIE_C,
86+
test_owner=test_owner.CAMILO,
8787
).run(
8888
ramdisk_directory=ram_disk,
8989
mtc_enabled=True,
@@ -100,7 +100,7 @@
100100
test_name=f"{name_prefix}-cleanup",
101101
run_model_cmds=cleanup_command,
102102
docker_image=image.value,
103-
test_owner=test_owner.ERNIE_C,
103+
test_owner=test_owner.CAMILO,
104104
).run(
105105
ramdisk_directory=ram_disk,
106106
mtc_enabled=True,

xlml/utils/xpk.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@ def get_xpk_setup_cmd(tmpdir, branch: str = MAIN_BRANCH):
5151
cmds = [
5252
"set -xue",
5353
clone_branch,
54+
f"cd {tmpdir}/xpk/src/xpk",
55+
"sed -i '/validate_dependencies()/s/^/#/' main.py || true",
56+
"cat main.py",
5457
"pip install ruamel.yaml docker",
5558
]
59+
5660
return cmds
5761

5862

@@ -121,6 +125,13 @@ def run_workload(
121125
if mtc_enabled:
122126
workload_create_cmd += " --mtc-enabled"
123127

128+
# For Orbax DAG
129+
if ramdisk_directory and mtc_enabled:
130+
workload_create_cmd = workload_create_cmd.replace(
131+
" --restart-on-user-code-failure", ""
132+
)
133+
workload_create_cmd += " --max-restarts=50"
134+
124135
# If using a valid GPU and the XPK branch is set to "main", then branch is switch to "v0.4.1".
125136
if is_valid_gpu_version(accelerator_type) and xpk_branch == MAIN_BRANCH:
126137
xpk_branch = "v0.4.1"

0 commit comments

Comments
 (0)