Skip to content

Commit 3a2f5c4

Browse files
authored
Merge pull request GoogleCloudPlatform#4786 from Neelabh94/improvement/slurm_gpu_daily_tests
feat: Add default partition GPU check to A* SLURM daily tests
2 parents 54462ef + c3d9372 commit 3a2f5c4

6 files changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
- name: Assert variables are defined
16+
ansible.builtin.assert:
17+
that:
18+
- custom_vars.gpu_partition is defined
19+
20+
- name: Get default partition configuration
21+
ansible.builtin.shell: "scontrol show config | grep '^DefaultPartition'"
22+
register: default_partition_config
23+
retries: 10
24+
delay: 12
25+
until: default_partition_config.stdout | length > 0
26+
changed_when: false
27+
28+
- name: Extract default partition name
29+
set_fact:
30+
default_partition: "{{ (default_partition_config.stdout.split('='))[1] | trim }}"
31+
32+
- name: Assert default partition is the GPU partition
33+
ansible.builtin.assert:
34+
that:
35+
- default_partition == custom_vars.gpu_partition
36+
msg: "The default partition is '{{ default_partition }}', but expected '{{ custom_vars.gpu_partition }}'."

tools/cloud-build/daily-tests/tests/ml-a3-highgpu-slurm-cluster.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ network: default
2727
post_deploy_tests:
2828
- test-validation/test-mounts.yml
2929
- test-validation/test-partitions.yml
30+
- test-validation/test-default-partition.yml
3031
- test-validation/test-enroot.yml
3132
- test-validation/test-gpus-slurm.yml
3233
custom_vars:

tools/cloud-build/daily-tests/tests/ml-a3-megagpu-slurm-ubuntu.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ sub_network: "{{ deployment_name }}-sub-net-0"
3030
post_deploy_tests:
3131
- test-validation/test-mounts.yml
3232
- test-validation/test-partitions.yml
33+
- test-validation/test-default-partition.yml
3334
- test-validation/test-enroot.yml
3435
- test-validation/test-gpus-slurm.yml
3536
- test-validation/test-nccl.yml

tools/cloud-build/daily-tests/tests/ml-a3-ultragpu-slurm.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ network: "{{ test_name }}-net-0"
2828
post_deploy_tests:
2929
- test-validation/test-mounts.yml
3030
- test-validation/test-partitions.yml
31+
- test-validation/test-default-partition.yml
3132
- test-validation/test-enroot.yml
3233
- test-validation/test-gpus-slurm.yml
3334
post_destroy_tasks:

tools/cloud-build/daily-tests/tests/ml-a4-highgpu-slurm-flex.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ network: "{{ test_name }}-net-0"
2828
post_deploy_tests:
2929
- test-validation/test-mounts.yml
3030
- test-validation/test-partitions.yml
31+
- test-validation/test-default-partition.yml
3132
- test-validation/test-enroot.yml
3233
- test-validation/test-gpus-slurm.yml
3334
post_destroy_tasks:

tools/cloud-build/daily-tests/tests/ml-a4-highgpu-slurm.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ network: "{{ test_name }}-net-0"
2828
post_deploy_tests:
2929
- test-validation/test-mounts.yml
3030
- test-validation/test-partitions.yml
31+
- test-validation/test-default-partition.yml
3132
- test-validation/test-enroot.yml
3233
- test-validation/test-gpus-slurm.yml
3334
post_destroy_tasks:

0 commit comments

Comments
 (0)