Skip to content

Commit 94584d7

Browse files
Move sft and checkpointing dags to v5p cluster (GoogleCloudPlatform#813)
1 parent 70485e2 commit 94584d7

2 files changed

Lines changed: 19 additions & 32 deletions

File tree

dags/multipod/maxtext_checkpointing.py

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from airflow import models
2020
from dags import composer_env, gcs_bucket
2121
from dags.common import test_owner
22-
from dags.common.vm_resource import TpuVersion, Zone, DockerImage, XpkClusters
22+
from dags.common.vm_resource import DockerImage, XpkClusters
2323
from dags.multipod.configs import gke_config
2424
from dags.multipod.configs.common import SetupMode
2525

@@ -48,35 +48,22 @@
4848
(SetupMode.STABLE, DockerImage.MAXTEXT_TPU_JAX_STABLE_STACK_CANDIDATE),
4949
(SetupMode.NIGHTLY, DockerImage.MAXTEXT_TPU_STABLE_STACK_NIGHTLY_JAX),
5050
]
51-
test_configs = {
52-
# accelerator: list of slices to test
53-
"v4-8": [1],
54-
"v4-16": [1, 2],
55-
}
56-
clusters = {
57-
# accelerator: cluster name
58-
"v4-8": XpkClusters.TPU_V4_8_MAXTEXT_CLUSTER,
59-
"v4-16": XpkClusters.TPU_V4_16_CLUSTER,
60-
}
6151

6252
for mode, image in docker_images:
63-
for accelerator, slices in test_configs.items():
64-
cores = accelerator.rsplit("-", maxsplit=1)[-1]
65-
for slice_num in slices:
66-
for chkpt_mode in ["sync", "async"]:
67-
async_checkpointing = chkpt_mode == "async"
68-
run_name = f" checkpointing-{mode.value}-{slice_num}x-{accelerator}-{chkpt_mode}-{current_datetime}"
69-
command = (
70-
"bash end_to_end/test_checkpointing.sh"
71-
f" {run_name} {base_output_directory} {dataset_path}"
72-
f" true tfds autoselected {async_checkpointing}",
73-
)
74-
maxtext_v4_configs_test = gke_config.get_gke_config(
75-
num_slices=slice_num,
76-
cluster=clusters[accelerator],
77-
time_out_in_min=60,
78-
test_name=f"maxtext-checkpointing-{mode.value}-{chkpt_mode}",
79-
run_model_cmds=command,
80-
docker_image=image.value,
81-
test_owner=test_owner.SURBHI_J,
82-
).run()
53+
for chkpt_mode in ["sync", "async"]:
54+
async_checkpointing = chkpt_mode == "async"
55+
run_name = f"checkpointing-{mode.value}-{chkpt_mode}-{current_datetime}"
56+
command = (
57+
"bash end_to_end/test_checkpointing.sh "
58+
f" {run_name} {base_output_directory} {dataset_path}"
59+
f" true tfds autoselected {async_checkpointing}",
60+
)
61+
maxtext_v4_configs_test = gke_config.get_gke_config(
62+
num_slices=1,
63+
cluster=XpkClusters.TPU_V5P_8_CLUSTER,
64+
time_out_in_min=60,
65+
test_name=f"maxtext-checkpointing-{mode.value}-{chkpt_mode}",
66+
run_model_cmds=command,
67+
docker_image=image.value,
68+
test_owner=test_owner.SURBHI_J,
69+
).run()

dags/multipod/maxtext_sft_trainer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
'bash end_to_end/tpu/test_sft_trainer.sh',
5353
)
5454
maxtext_v4_configs_test = gke_config.get_gke_config(
55-
cluster=XpkClusters.TPU_V4_8_MAXTEXT_CLUSTER,
55+
cluster=XpkClusters.TPU_V5P_8_CLUSTER,
5656
time_out_in_min=60,
5757
test_name=f'sft-trainer-{mode.value}',
5858
run_model_cmds=command,

0 commit comments

Comments
 (0)