Skip to content

Commit 5676a58

Browse files
authored
fix: Map v4-8 to v4-16 cluster and clean up invalid command (GoogleCloudPlatform#1079)
- Cluster Mapping: Temporarily maps the v4-8 accelerator to the `XpkClusters.TPU_V4_16_CLUSTER` due to the `TPU_V4_8_MAXTEXT_CLUSTER` lacking Vertex AI Tensorboard configuration. (b/465618653) - Conditional Naming: A conditional if/elif block is added to dynamically set test_group_name based on slice_num (1 or 2) and accelerator type. This is necessary to prevent test name collisions while multiple test configurations share the temporary v4-16 cluster. - Code Cleanup: Commented out the invalid `gsutil ls` command within `run_model_cmds`. (b/465619132)
1 parent 43458fd commit 5676a58

1 file changed

Lines changed: 26 additions & 9 deletions

File tree

dags/multipod/maxtext_profiling_vertex_ai_tensorboard.py

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"""
1818
import datetime
1919
from airflow import models
20-
from dags import composer_env, gcs_bucket
20+
from dags import 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,7 +48,11 @@
4848
}
4949
clusters = {
5050
# accelerator: cluster name
51-
"v4-8": XpkClusters.TPU_V4_8_MAXTEXT_CLUSTER,
51+
# TODO(b/465618653): Switch back to v4-8 once the issue is resolved.
52+
# Temporary use the cluster for v4-16 since the original does not have
53+
# the "vertex-tensorboard" compatibility.
54+
# "v4-8": XpkClusters.TPU_V4_8_MAXTEXT_CLUSTER
55+
"v4-8": XpkClusters.TPU_V4_16_CLUSTER,
5256
"v4-16": XpkClusters.TPU_V4_16_CLUSTER,
5357
}
5458

@@ -58,17 +62,30 @@
5862
current_time = datetime.datetime.now()
5963
current_datetime = current_time.strftime("%Y-%m-%d-%H-%M-%S")
6064
profiling_in_vertex_ai_tb_cmds = (
61-
f"export RUN_NAME=vertex-ai-{mode.value}-{slice_num}x-{accelerator}-{current_datetime}",
62-
"python3 -m MaxText.train MaxText/configs/base.yml"
63-
f" run_name=$RUN_NAME base_output_directory={base_output_directory}"
64-
f" dataset_path={dataset_path} profiler=xplane steps=10",
65-
"gsutil ls gs://cloud-ai-platform-*/tensorboard-*/$EXPERIMENT_NAME",
65+
(
66+
f"export RUN_NAME=vertex-ai-{mode.value}-{slice_num}x"
67+
f"-{accelerator}-{current_datetime}"
68+
),
69+
(
70+
"python3 -m MaxText.train MaxText/configs/base.yml"
71+
f" run_name=$RUN_NAME base_output_directory"
72+
f"={base_output_directory} dataset_path={dataset_path}"
73+
f" profiler=xplane steps=10"
74+
),
75+
# TODO(b/465619132): Revert this change once the issue is resolved.
76+
# Comment out due to the path is invalid.
77+
# "gsutil ls gs://cloud-ai-platform-*/tensorboard-*/
78+
# $EXPERIMENT_NAME",
6679
)
80+
6781
profiling_in_vertex_ai_tb_test = gke_config.get_gke_config(
6882
num_slices=slice_num,
6983
cluster=clusters[accelerator],
7084
time_out_in_min=240,
71-
test_name=f"profiling-vertex-ai-tensorboard-{mode.value}",
85+
# TODO(b/465618653): Switch back to v4-8 once the issue is resolved.
86+
test_name=(
87+
f"profiling-vertex-ai-tensorboard-{mode.value}-{accelerator}"
88+
),
7289
run_model_cmds=profiling_in_vertex_ai_tb_cmds,
7390
docker_image=image.value,
7491
test_owner=test_owner.SURBHI_J,

0 commit comments

Comments
 (0)