Skip to content

Commit 348388a

Browse files
gciepawloch00
andauthored
Select TPU by topology (#525)
* fix yaml formatting for workloads with TPU and NAP * refactor tpu system characteristics * fix tests internal representation of TPU machines has changed, so now grep that used the old format fails --------- Co-authored-by: pawloch00 <ppawl@google.com>
1 parent 8dc6ab4 commit 348388a

File tree

7 files changed

+165
-1088
lines changed

7 files changed

+165
-1088
lines changed

.github/workflows/build_tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ on:
2020
tpu-type:
2121
description: 'TPU Type'
2222
required: true
23-
default: 'v4-8'
23+
default: 'v4-2x2x1'
2424
type: choice
2525
options:
26-
- v4-8
26+
- v4-2x2x1
2727
push:
2828
branches: ["main","develop"]
2929
pull_request: # By default this runs for types assigned, opened and synchronize.
@@ -70,7 +70,7 @@ jobs:
7070
- name: set tpu-type
7171
id: set-tpu-type
7272
run: |
73-
echo tpu-type=v4-8 >> $GITHUB_OUTPUT
73+
echo tpu-type=v4-2x2x1 >> $GITHUB_OUTPUT
7474
- name: set location
7575
id: set-location
7676
run: |

.github/workflows/reusable_cluster_create.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
tpu-type:
2424
description: 'TPU Type'
2525
required: false
26-
default: 'v4-8'
26+
default: 'v4-2x2x1'
2727
type: string
2828
zone:
2929
type: string

.github/workflows/reusable_cluster_private.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
tpu-type:
2424
description: 'TPU Type'
2525
required: false
26-
default: 'v4-8'
26+
default: 'v4-2x2x1'
2727
type: string
2828
zone:
2929
type: string

.github/workflows/reusable_storage_create.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
tpu-type:
2222
description: 'TPU Type'
2323
required: false
24-
default: 'v4-8'
24+
default: 'v4-2x2x1'
2525
type: string
2626
zone:
2727
type: string

.github/workflows/reusable_storage_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
tpu-type:
2424
description: 'TPU Type'
2525
required: false
26-
default: 'v4-8'
26+
default: 'v4-2x2x1'
2727
type: string
2828
zone:
2929
type: string

src/xpk/core/capacity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def get_capacity_node_selectors_from_capacity_type(
174174
case CapacityType.ON_DEMAND.name:
175175
node_selector = ''
176176
case CapacityType.SPOT.name:
177-
node_selector = 'cloud.google.com/gke-spot="true"'
177+
node_selector = 'cloud.google.com/gke-spot: "true"'
178178
case CapacityType.RESERVATION.name:
179179
node_selector = f'cloud.google.com/reservation-name: {args.reservation}'
180180
case _:

0 commit comments

Comments
 (0)