|
19 | 19 | from airflow import models |
20 | 20 | from dags import composer_env, gcs_bucket |
21 | 21 | 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 |
23 | 23 | from dags.multipod.configs import gke_config |
24 | 24 | from dags.multipod.configs.common import SetupMode |
25 | 25 |
|
|
48 | 48 | (SetupMode.STABLE, DockerImage.MAXTEXT_TPU_JAX_STABLE_STACK_CANDIDATE), |
49 | 49 | (SetupMode.NIGHTLY, DockerImage.MAXTEXT_TPU_STABLE_STACK_NIGHTLY_JAX), |
50 | 50 | ] |
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 | | - } |
61 | 51 |
|
62 | 52 | 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() |
0 commit comments