xpk 0.12.0__py3-none-any.whl → 0.14.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. xpk/commands/batch.py +17 -10
  2. xpk/commands/cluster.py +137 -123
  3. xpk/commands/cluster_gcluster.py +77 -14
  4. xpk/commands/cluster_gcluster_test.py +177 -0
  5. xpk/commands/common.py +13 -27
  6. xpk/commands/info.py +11 -9
  7. xpk/commands/inspector.py +22 -11
  8. xpk/commands/job.py +53 -9
  9. xpk/commands/kind.py +38 -40
  10. xpk/commands/kjob_common.py +4 -4
  11. xpk/commands/run.py +9 -2
  12. xpk/commands/shell.py +13 -10
  13. xpk/commands/storage.py +26 -2
  14. xpk/commands/version.py +0 -4
  15. xpk/commands/workload.py +58 -30
  16. xpk/core/blueprint/blueprint_generator.py +4 -40
  17. xpk/core/blueprint/blueprint_test.py +0 -6
  18. xpk/core/capacity.py +6 -5
  19. xpk/core/cluster.py +96 -195
  20. xpk/core/cluster_private.py +9 -12
  21. xpk/core/commands.py +21 -25
  22. xpk/core/config.py +1 -1
  23. xpk/core/docker_image.py +17 -9
  24. xpk/core/docker_resources.py +9 -4
  25. xpk/core/gcloud_context.py +26 -2
  26. xpk/core/gcloud_context_test.py +96 -0
  27. xpk/core/gcluster_manager.py +0 -3
  28. xpk/core/jobset.py +5 -8
  29. xpk/core/kjob.py +19 -29
  30. xpk/core/kueue_manager.py +383 -0
  31. xpk/core/kueue_manager_test.py +542 -0
  32. xpk/core/monitoring.py +1 -1
  33. xpk/core/nap.py +11 -16
  34. xpk/core/network.py +18 -19
  35. xpk/core/nodepool.py +65 -71
  36. xpk/core/nodepool_test.py +198 -1
  37. xpk/core/pathways.py +9 -5
  38. xpk/core/ray.py +11 -15
  39. xpk/core/resources.py +15 -10
  40. xpk/core/scheduling.py +23 -1
  41. xpk/core/scheduling_test.py +31 -0
  42. xpk/core/system_characteristics.py +335 -229
  43. xpk/core/vertex.py +1 -1
  44. xpk/core/workload.py +7 -8
  45. xpk/main.py +3 -2
  46. xpk/parser/cluster.py +50 -0
  47. xpk/parser/cluster_test.py +66 -0
  48. xpk/parser/common.py +11 -0
  49. xpk/parser/workload.py +62 -25
  50. xpk/parser/workload_test.py +82 -0
  51. xpk/utils/execution_context.py +28 -0
  52. xpk/utils/feature_flags.py +28 -0
  53. xpk/utils/file.py +25 -10
  54. xpk/utils/kueue.py +20 -0
  55. xpk/utils/network.py +4 -0
  56. xpk/utils/templates.py +2 -0
  57. xpk/utils/topology.py +37 -0
  58. xpk/utils/topology_test.py +43 -0
  59. xpk/utils/validation.py +79 -55
  60. xpk/utils/validation_test.py +37 -0
  61. {xpk-0.12.0.dist-info → xpk-0.14.0.dist-info}/METADATA +6 -1
  62. xpk-0.14.0.dist-info/RECORD +112 -0
  63. xpk/core/kueue.py +0 -545
  64. xpk-0.12.0.dist-info/RECORD +0 -100
  65. {xpk-0.12.0.dist-info → xpk-0.14.0.dist-info}/WHEEL +0 -0
  66. {xpk-0.12.0.dist-info → xpk-0.14.0.dist-info}/entry_points.txt +0 -0
  67. {xpk-0.12.0.dist-info → xpk-0.14.0.dist-info}/licenses/LICENSE +0 -0
  68. {xpk-0.12.0.dist-info → xpk-0.14.0.dist-info}/top_level.txt +0 -0
@@ -15,8 +15,8 @@ limitations under the License.
15
15
  """
16
16
 
17
17
  from dataclasses import dataclass
18
- from functools import reduce
19
- from operator import mul
18
+ from ..utils.topology import get_topology_product
19
+
20
20
 
21
21
  AcceleratorType = {'TPU': 1, 'GPU': 2, 'CPU': 3}
22
22
 
@@ -29,27 +29,52 @@ class AcceleratorCharacteristics:
29
29
 
30
30
 
31
31
  AcceleratorTypeToAcceleratorCharacteristics = {
32
- # TPU
33
32
  AcceleratorType['TPU']: AcceleratorCharacteristics(
34
- 'google.com/tpu',
35
- 'cloud.google.com/gke-tpu-accelerator',
36
- 'cloud.google.com/gke-tpu-topology',
33
+ resource_type='google.com/tpu',
34
+ accelerator_label='cloud.google.com/gke-tpu-accelerator',
35
+ machine_label='cloud.google.com/gke-tpu-topology',
37
36
  ),
38
- # GPU
39
37
  AcceleratorType['GPU']: AcceleratorCharacteristics(
40
- 'nvidia.com/gpu',
41
- 'cloud.google.com/gke-accelerator',
42
- 'cloud.google.com/gce-machine-type',
38
+ resource_type='nvidia.com/gpu',
39
+ accelerator_label='cloud.google.com/gke-accelerator',
40
+ machine_label='cloud.google.com/gce-machine-type',
43
41
  ),
44
- # CPU
45
42
  AcceleratorType['CPU']: AcceleratorCharacteristics(
46
- 'cpu', '', 'cloud.google.com/gke-nodepool'
43
+ resource_type='cpu',
44
+ accelerator_label='',
45
+ machine_label='cloud.google.com/gke-nodepool',
47
46
  ),
48
47
  }
49
48
 
50
49
 
51
50
  @dataclass
52
51
  class SystemCharacteristics:
52
+ """Contains the defining characteristics of a specific accelerator system.
53
+
54
+ This dataclass holds the hardware and configuration details for a given
55
+ accelerator type, such as its topology, machine type, and chip count. It
56
+ provides a standardized way to access system-specific information throughout
57
+ the application.
58
+
59
+ Attributes:
60
+ topology: The physical or logical layout of the accelerator chips (e.g.,
61
+ '2x2x1' for TPUs, 'N/A' for single-VM GPUs).
62
+ vms_per_slice: The number of Virtual Machines that constitute a single
63
+ accelerator slice.
64
+ gke_accelerator: The name of the accelerator as recognized by GKE (e.g.,
65
+ 'nvidia-l4', 'tpu7x').
66
+ gce_machine_type: The GCE machine type that hosts the accelerator (e.g.,
67
+ 'g2-standard-12').
68
+ chips_per_vm: The number of accelerator chips attached to a single VM.
69
+ accelerator_type: The category of the accelerator (e.g., TPU, GPU, CPU)
70
+ from the AcceleratorType enum.
71
+ device_type: A user-facing name for the specific hardware configuration
72
+ (e.g., 'l4-1', 'h100-80gb-8').
73
+ supports_sub_slicing: Whether the Sub-slicing feature is supported.
74
+ requires_workload_policy: A boolean indicating if a GCE resource
75
+ workload policy is required. This is automatically set to True for GPUs.
76
+ """
77
+
53
78
  topology: str
54
79
  vms_per_slice: int
55
80
  gke_accelerator: str
@@ -57,6 +82,12 @@ class SystemCharacteristics:
57
82
  chips_per_vm: int
58
83
  accelerator_type: int # TODO: use enums
59
84
  device_type: str
85
+ supports_sub_slicing: bool
86
+ requires_workload_policy: bool = False
87
+
88
+ def __post_init__(self):
89
+ if self.accelerator_type == AcceleratorType['GPU']:
90
+ self.requires_workload_policy = True
60
91
 
61
92
 
62
93
  def get_system_characteristics(
@@ -99,21 +130,25 @@ def get_tpu_system_characteristics_map(
99
130
  gke_accelerator: str,
100
131
  machine_type: str,
101
132
  supported_topologies: list[str],
133
+ supports_sub_slicing: bool,
134
+ requires_workload_policy: bool = False,
102
135
  ) -> dict[str, SystemCharacteristics]:
103
136
  system_characteristics_map = {}
104
137
  for topology in supported_topologies:
105
- total_chips = reduce(mul, (int(x) for x in topology.split('x')), 1)
138
+ total_chips = get_topology_product(topology)
106
139
  num_tensorcores = total_chips * tensorcores_per_chip
107
140
  chips_per_vm = 1 if total_chips == 1 else 4
108
141
  vms_per_slice = total_chips // chips_per_vm
109
142
  system = SystemCharacteristics(
110
- topology,
111
- vms_per_slice,
112
- gke_accelerator,
113
- machine_type,
114
- chips_per_vm,
115
- AcceleratorType['TPU'],
116
- f'{prefix}-{num_tensorcores}',
143
+ topology=topology,
144
+ vms_per_slice=vms_per_slice,
145
+ gke_accelerator=gke_accelerator,
146
+ gce_machine_type=machine_type,
147
+ chips_per_vm=chips_per_vm,
148
+ accelerator_type=AcceleratorType['TPU'],
149
+ device_type=f'{prefix}-{num_tensorcores}',
150
+ requires_workload_policy=requires_workload_policy,
151
+ supports_sub_slicing=supports_sub_slicing,
117
152
  )
118
153
  system_characteristics_map[f'{prefix}-{topology}'] = system
119
154
  system_characteristics_map[f'{prefix}-{num_tensorcores}'] = system
@@ -131,126 +166,166 @@ UserFacingNameToSystemCharacteristics = {
131
166
  # GPU system characteristics
132
167
  # l4-$CHIPSc
133
168
  'l4-1': SystemCharacteristics(
134
- 'N/A',
135
- 1,
136
- 'nvidia-l4',
137
- 'g2-standard-12',
138
- 1,
139
- AcceleratorType['GPU'],
140
- 'l4-1',
169
+ topology='N/A',
170
+ vms_per_slice=1,
171
+ gke_accelerator='nvidia-l4',
172
+ gce_machine_type='g2-standard-12',
173
+ chips_per_vm=1,
174
+ accelerator_type=AcceleratorType['GPU'],
175
+ device_type='l4-1',
176
+ supports_sub_slicing=False,
141
177
  ),
142
178
  'l4-2': SystemCharacteristics(
143
- 'N/A',
144
- 1,
145
- 'nvidia-l4',
146
- 'g2-standard-24',
147
- 2,
148
- AcceleratorType['GPU'],
149
- 'l4-2',
179
+ topology='N/A',
180
+ vms_per_slice=1,
181
+ gke_accelerator='nvidia-l4',
182
+ gce_machine_type='g2-standard-24',
183
+ chips_per_vm=2,
184
+ accelerator_type=AcceleratorType['GPU'],
185
+ device_type='l4-2',
186
+ supports_sub_slicing=False,
150
187
  ),
151
188
  'l4-4': SystemCharacteristics(
152
- 'N/A',
153
- 1,
154
- 'nvidia-l4',
155
- 'g2-standard-48',
156
- 4,
157
- AcceleratorType['GPU'],
158
- 'l4-4',
189
+ topology='N/A',
190
+ vms_per_slice=1,
191
+ gke_accelerator='nvidia-l4',
192
+ gce_machine_type='g2-standard-48',
193
+ chips_per_vm=4,
194
+ accelerator_type=AcceleratorType['GPU'],
195
+ device_type='l4-4',
196
+ supports_sub_slicing=False,
159
197
  ),
160
198
  'l4-8': SystemCharacteristics(
161
- 'N/A',
162
- 1,
163
- 'nvidia-l4',
164
- 'g2-standard-96',
165
- 8,
166
- AcceleratorType['GPU'],
167
- 'l4-8',
199
+ topology='N/A',
200
+ vms_per_slice=1,
201
+ gke_accelerator='nvidia-l4',
202
+ gce_machine_type='g2-standard-96',
203
+ chips_per_vm=8,
204
+ accelerator_type=AcceleratorType['GPU'],
205
+ device_type='l4-8',
206
+ supports_sub_slicing=False,
168
207
  ),
169
208
  # A100-40gb-$CHIPSc
170
209
  'a100-40gb-1': SystemCharacteristics(
171
- 'N/A',
172
- 1,
173
- 'nvidia-tesla-a100',
174
- 'a2-highgpu-1g',
175
- 1,
176
- AcceleratorType['GPU'],
177
- 'a100-40gb-1',
210
+ topology='N/A',
211
+ vms_per_slice=1,
212
+ gke_accelerator='nvidia-tesla-a100',
213
+ gce_machine_type='a2-highgpu-1g',
214
+ chips_per_vm=1,
215
+ accelerator_type=AcceleratorType['GPU'],
216
+ device_type='a100-40gb-1',
217
+ supports_sub_slicing=False,
178
218
  ),
179
219
  'a100-40gb-2': SystemCharacteristics(
180
- 'N/A',
181
- 1,
182
- 'nvidia-tesla-a100',
183
- 'a2-highgpu-2g',
184
- 2,
185
- AcceleratorType['GPU'],
186
- 'a100-40gb-2',
220
+ topology='N/A',
221
+ vms_per_slice=1,
222
+ gke_accelerator='nvidia-tesla-a100',
223
+ gce_machine_type='a2-highgpu-2g',
224
+ chips_per_vm=2,
225
+ accelerator_type=AcceleratorType['GPU'],
226
+ device_type='a100-40gb-2',
227
+ supports_sub_slicing=False,
187
228
  ),
188
229
  'a100-40gb-4': SystemCharacteristics(
189
- 'N/A',
190
- 1,
191
- 'nvidia-tesla-a100',
192
- 'a2-highgpu-4g',
193
- 4,
194
- AcceleratorType['GPU'],
195
- 'a100-40gb-4',
230
+ topology='N/A',
231
+ vms_per_slice=1,
232
+ gke_accelerator='nvidia-tesla-a100',
233
+ gce_machine_type='a2-highgpu-4g',
234
+ chips_per_vm=4,
235
+ accelerator_type=AcceleratorType['GPU'],
236
+ device_type='a100-40gb-4',
237
+ supports_sub_slicing=False,
196
238
  ),
197
239
  'a100-40gb-8': SystemCharacteristics(
198
- 'N/A',
199
- 1,
200
- 'nvidia-tesla-a100',
201
- 'a2-highgpu-8g',
202
- 8,
203
- AcceleratorType['GPU'],
204
- 'a100-40gb-8',
240
+ topology='N/A',
241
+ vms_per_slice=1,
242
+ gke_accelerator='nvidia-tesla-a100',
243
+ gce_machine_type='a2-highgpu-8g',
244
+ chips_per_vm=8,
245
+ accelerator_type=AcceleratorType['GPU'],
246
+ device_type='a100-40gb-8',
247
+ supports_sub_slicing=False,
248
+ ),
249
+ 'gb200-4': SystemCharacteristics(
250
+ topology='1x72',
251
+ vms_per_slice=1,
252
+ gke_accelerator='nvidia-gb200',
253
+ gce_machine_type='a4x-highgpu-4g',
254
+ chips_per_vm=4,
255
+ accelerator_type=AcceleratorType['GPU'],
256
+ device_type='gb200-4',
257
+ supports_sub_slicing=False,
258
+ ),
259
+ 'gb200-4-nolssd': SystemCharacteristics(
260
+ topology='1x72',
261
+ vms_per_slice=1,
262
+ gke_accelerator='nvidia-gb200',
263
+ gce_machine_type='a4x-highgpu-4g-nolssd',
264
+ chips_per_vm=4,
265
+ accelerator_type=AcceleratorType['GPU'],
266
+ device_type='gb200-4',
267
+ supports_sub_slicing=False,
205
268
  ),
206
269
  'b200-8': SystemCharacteristics(
207
- 'N/A',
208
- 1,
209
- 'nvidia-b200',
210
- 'a4-highgpu-8g',
211
- 8,
212
- AcceleratorType['GPU'],
213
- 'b200-8',
270
+ topology='N/A',
271
+ vms_per_slice=1,
272
+ gke_accelerator='nvidia-b200',
273
+ gce_machine_type='a4-highgpu-8g',
274
+ chips_per_vm=8,
275
+ accelerator_type=AcceleratorType['GPU'],
276
+ device_type='b200-8',
277
+ supports_sub_slicing=False,
214
278
  ),
215
279
  'h200-141gb-8': SystemCharacteristics(
216
- 'N/A',
217
- 1,
218
- 'nvidia-h200-141gb',
219
- 'a3-ultragpu-8g',
220
- 8,
221
- AcceleratorType['GPU'],
222
- 'h200-141gb-8',
280
+ topology='N/A',
281
+ vms_per_slice=1,
282
+ gke_accelerator='nvidia-h200-141gb',
283
+ gce_machine_type='a3-ultragpu-8g',
284
+ chips_per_vm=8,
285
+ accelerator_type=AcceleratorType['GPU'],
286
+ device_type='h200-141gb-8',
287
+ supports_sub_slicing=False,
223
288
  ),
224
289
  # H100-80gb-$CHIPS
225
290
  'h100-80gb-8': SystemCharacteristics(
226
- 'N/A',
227
- 1,
228
- 'nvidia-h100-80gb',
229
- 'a3-highgpu-8g',
230
- 8,
231
- AcceleratorType['GPU'],
232
- 'h100-80gb-8',
291
+ topology='N/A',
292
+ vms_per_slice=1,
293
+ gke_accelerator='nvidia-h100-80gb',
294
+ gce_machine_type='a3-highgpu-8g',
295
+ chips_per_vm=8,
296
+ accelerator_type=AcceleratorType['GPU'],
297
+ device_type='h100-80gb-8',
298
+ supports_sub_slicing=False,
233
299
  ),
234
300
  # H100-mega-80gb-$CHIPS
235
301
  'h100-mega-80gb-8': SystemCharacteristics(
236
- 'N/A',
237
- 1,
238
- 'nvidia-h100-mega-80gb',
239
- 'a3-megagpu-8g',
240
- 8,
241
- AcceleratorType['GPU'],
242
- 'h100-mega-80gb-8',
302
+ topology='N/A',
303
+ vms_per_slice=1,
304
+ gke_accelerator='nvidia-h100-mega-80gb',
305
+ gce_machine_type='a3-megagpu-8g',
306
+ chips_per_vm=8,
307
+ accelerator_type=AcceleratorType['GPU'],
308
+ device_type='h100-mega-80gb-8',
309
+ supports_sub_slicing=False,
243
310
  ),
244
311
  # TPU system characteristics
245
312
  **get_tpu_system_characteristics_map(
246
- 'tpu7x', 2, 'tpu7x', 'tpu7x-standard-1t', ['1x1x1']
313
+ prefix='tpu7x',
314
+ tensorcores_per_chip=2,
315
+ gke_accelerator='tpu7x',
316
+ machine_type='tpu7x-standard-1t',
317
+ supported_topologies=['1x1x1'],
318
+ requires_workload_policy=True,
319
+ supports_sub_slicing=False,
247
320
  ),
248
321
  **get_tpu_system_characteristics_map(
249
- 'tpu7x',
250
- 2,
251
- 'tpu7x',
252
- 'tpu7x-standard-4t',
253
- [
322
+ prefix='tpu7x',
323
+ tensorcores_per_chip=2,
324
+ gke_accelerator='tpu7x',
325
+ machine_type='tpu7x-standard-4t',
326
+ requires_workload_policy=True,
327
+ supports_sub_slicing=False,
328
+ supported_topologies=[
254
329
  '12x12x12',
255
330
  '12x12x16',
256
331
  '12x12x20',
@@ -352,21 +427,36 @@ UserFacingNameToSystemCharacteristics = {
352
427
  ],
353
428
  ),
354
429
  **get_tpu_system_characteristics_map(
355
- 'v6e', 1, 'tpu-v6e-slice', 'ct6e-standard-1t', ['1x1']
430
+ prefix='v6e',
431
+ tensorcores_per_chip=1,
432
+ gke_accelerator='tpu-v6e-slice',
433
+ machine_type='ct6e-standard-1t',
434
+ supports_sub_slicing=False,
435
+ supported_topologies=['1x1'],
356
436
  ),
357
437
  **get_tpu_system_characteristics_map(
358
- 'v6e',
359
- 1,
360
- 'tpu-v6e-slice',
361
- 'ct6e-standard-4t',
362
- ['2x2', '2x4', '4x4', '4x8', '8x8', '8x16', '16x16'],
438
+ prefix='v6e',
439
+ tensorcores_per_chip=1,
440
+ gke_accelerator='tpu-v6e-slice',
441
+ machine_type='ct6e-standard-4t',
442
+ supports_sub_slicing=True,
443
+ supported_topologies=[
444
+ '2x2',
445
+ '2x4',
446
+ '4x4',
447
+ '4x8',
448
+ '8x8',
449
+ '8x16',
450
+ '16x16',
451
+ ],
363
452
  ),
364
453
  **get_tpu_system_characteristics_map(
365
- 'v5p',
366
- 2,
367
- 'tpu-v5p-slice',
368
- 'ct5p-hightpu-4t',
369
- [
454
+ prefix='v5p',
455
+ tensorcores_per_chip=2,
456
+ gke_accelerator='tpu-v5p-slice',
457
+ machine_type='ct5p-hightpu-4t',
458
+ supports_sub_slicing=False,
459
+ supported_topologies=[
370
460
  '2x2x1',
371
461
  '2x2x2',
372
462
  '2x2x4',
@@ -466,18 +556,20 @@ UserFacingNameToSystemCharacteristics = {
466
556
  ],
467
557
  ),
468
558
  **get_tpu_system_characteristics_map(
469
- 'v5litepod',
470
- 1,
471
- 'tpu-v5-lite-podslice',
472
- 'ct5lp-hightpu-4t',
473
- ['2x4', '4x4', '4x8', '8x8', '8x16', '16x16'],
559
+ prefix='v5litepod',
560
+ tensorcores_per_chip=1,
561
+ gke_accelerator='tpu-v5-lite-podslice',
562
+ machine_type='ct5lp-hightpu-4t',
563
+ supports_sub_slicing=False,
564
+ supported_topologies=['2x4', '4x4', '4x8', '8x8', '8x16', '16x16'],
474
565
  ),
475
566
  **get_tpu_system_characteristics_map(
476
- 'v4',
477
- 2,
478
- 'tpu-v4-podslice',
479
- 'ct4p-hightpu-4t',
480
- [
567
+ prefix='v4',
568
+ tensorcores_per_chip=2,
569
+ gke_accelerator='tpu-v4-podslice',
570
+ machine_type='ct4p-hightpu-4t',
571
+ supports_sub_slicing=False,
572
+ supported_topologies=[
481
573
  '2x2x1',
482
574
  '2x2x2',
483
575
  '2x2x4',
@@ -496,131 +588,145 @@ UserFacingNameToSystemCharacteristics = {
496
588
  # There are no chips in CPUs.
497
589
  # m1-megamem-#vCPUs-#VMs
498
590
  'm1-megamem-96-1': SystemCharacteristics(
499
- 'N/A',
500
- 1,
501
- 'N/A',
502
- 'm1-megamem-96',
503
- 96,
504
- AcceleratorType['CPU'],
505
- 'm1-megamem-96-1',
591
+ topology='N/A',
592
+ vms_per_slice=1,
593
+ gke_accelerator='N/A',
594
+ gce_machine_type='m1-megamem-96',
595
+ chips_per_vm=96,
596
+ accelerator_type=AcceleratorType['CPU'],
597
+ device_type='m1-megamem-96-1',
598
+ supports_sub_slicing=False,
506
599
  ),
507
600
  # n2-standard-#vCPUs-#VMs
508
601
  'n2-standard-64-1': SystemCharacteristics(
509
- 'N/A',
510
- 1,
511
- 'N/A',
512
- 'n2-standard-64',
513
- 64,
514
- AcceleratorType['CPU'],
515
- 'n2-standard-64-1',
602
+ topology='N/A',
603
+ vms_per_slice=1,
604
+ gke_accelerator='N/A',
605
+ gce_machine_type='n2-standard-64',
606
+ chips_per_vm=64,
607
+ accelerator_type=AcceleratorType['CPU'],
608
+ device_type='n2-standard-64-1',
609
+ supports_sub_slicing=False,
516
610
  ),
517
611
  'n2-standard-32-1': SystemCharacteristics(
518
- 'N/A',
519
- 1,
520
- 'N/A',
521
- 'n2-standard-32',
522
- 32,
523
- AcceleratorType['CPU'],
524
- 'n2-standard-32-1',
612
+ topology='N/A',
613
+ vms_per_slice=1,
614
+ gke_accelerator='N/A',
615
+ gce_machine_type='n2-standard-32',
616
+ chips_per_vm=32,
617
+ accelerator_type=AcceleratorType['CPU'],
618
+ device_type='n2-standard-32-1',
619
+ supports_sub_slicing=False,
525
620
  ),
526
621
  'n2-standard-32-2': SystemCharacteristics(
527
- 'N/A',
528
- 2,
529
- 'N/A',
530
- 'n2-standard-32',
531
- 32,
532
- AcceleratorType['CPU'],
533
- 'n2-standard-32-2',
622
+ topology='N/A',
623
+ vms_per_slice=2,
624
+ gke_accelerator='N/A',
625
+ gce_machine_type='n2-standard-32',
626
+ chips_per_vm=32,
627
+ accelerator_type=AcceleratorType['CPU'],
628
+ device_type='n2-standard-32-2',
629
+ supports_sub_slicing=False,
534
630
  ),
535
631
  'n2-standard-32-4': SystemCharacteristics(
536
- 'N/A',
537
- 4,
538
- 'N/A',
539
- 'n2-standard-32',
540
- 32,
541
- AcceleratorType['CPU'],
542
- 'n2-standard-32-4',
632
+ topology='N/A',
633
+ vms_per_slice=4,
634
+ gke_accelerator='N/A',
635
+ gce_machine_type='n2-standard-32',
636
+ chips_per_vm=32,
637
+ accelerator_type=AcceleratorType['CPU'],
638
+ device_type='n2-standard-32-4',
639
+ supports_sub_slicing=False,
543
640
  ),
544
641
  'n2-standard-32-8': SystemCharacteristics(
545
- 'N/A',
546
- 8,
547
- 'N/A',
548
- 'n2-standard-32',
549
- 32,
550
- AcceleratorType['CPU'],
551
- 'n2-standard-32-8',
642
+ topology='N/A',
643
+ vms_per_slice=8,
644
+ gke_accelerator='N/A',
645
+ gce_machine_type='n2-standard-32',
646
+ chips_per_vm=32,
647
+ accelerator_type=AcceleratorType['CPU'],
648
+ device_type='n2-standard-32-8',
649
+ supports_sub_slicing=False,
552
650
  ),
553
651
  'n2-standard-32-16': SystemCharacteristics(
554
- 'N/A',
555
- 16,
556
- 'N/A',
557
- 'n2-standard-32',
558
- 32,
559
- AcceleratorType['CPU'],
560
- 'n2-standard-32-16',
652
+ topology='N/A',
653
+ vms_per_slice=16,
654
+ gke_accelerator='N/A',
655
+ gce_machine_type='n2-standard-32',
656
+ chips_per_vm=32,
657
+ accelerator_type=AcceleratorType['CPU'],
658
+ device_type='n2-standard-32-16',
659
+ supports_sub_slicing=False,
561
660
  ),
562
661
  'n2-standard-32-32': SystemCharacteristics(
563
- 'N/A',
564
- 32,
565
- 'N/A',
566
- 'n2-standard-32',
567
- 32,
568
- AcceleratorType['CPU'],
569
- 'n2-standard-32-32',
662
+ topology='N/A',
663
+ vms_per_slice=32,
664
+ gke_accelerator='N/A',
665
+ gce_machine_type='n2-standard-32',
666
+ chips_per_vm=32,
667
+ accelerator_type=AcceleratorType['CPU'],
668
+ device_type='n2-standard-32-32',
669
+ supports_sub_slicing=False,
570
670
  ),
571
671
  'n2-standard-32-64': SystemCharacteristics(
572
- 'N/A',
573
- 64,
574
- 'N/A',
575
- 'n2-standard-32',
576
- 32,
577
- AcceleratorType['CPU'],
578
- 'n2-standard-32-64',
672
+ topology='N/A',
673
+ vms_per_slice=64,
674
+ gke_accelerator='N/A',
675
+ gce_machine_type='n2-standard-32',
676
+ chips_per_vm=32,
677
+ accelerator_type=AcceleratorType['CPU'],
678
+ device_type='n2-standard-32-64',
679
+ supports_sub_slicing=False,
579
680
  ),
580
681
  'n2-standard-32-128': SystemCharacteristics(
581
- 'N/A',
582
- 128,
583
- 'N/A',
584
- 'n2-standard-32',
585
- 32,
586
- AcceleratorType['CPU'],
587
- 'n2-standard-32-128',
682
+ topology='N/A',
683
+ vms_per_slice=128,
684
+ gke_accelerator='N/A',
685
+ gce_machine_type='n2-standard-32',
686
+ chips_per_vm=32,
687
+ accelerator_type=AcceleratorType['CPU'],
688
+ device_type='n2-standard-32-128',
689
+ supports_sub_slicing=False,
588
690
  ),
589
691
  'n2-standard-32-256': SystemCharacteristics(
590
- 'N/A',
591
- 256,
592
- 'N/A',
593
- 'n2-standard-32',
594
- 32,
595
- AcceleratorType['CPU'],
596
- 'n2-standard-32-256',
692
+ topology='N/A',
693
+ vms_per_slice=256,
694
+ gke_accelerator='N/A',
695
+ gce_machine_type='n2-standard-32',
696
+ chips_per_vm=32,
697
+ accelerator_type=AcceleratorType['CPU'],
698
+ device_type='n2-standard-32-256',
699
+ supports_sub_slicing=False,
597
700
  ),
598
701
  'n2-standard-32-512': SystemCharacteristics(
599
- 'N/A',
600
- 512,
601
- 'N/A',
602
- 'n2-standard-32',
603
- 32,
604
- AcceleratorType['CPU'],
605
- 'n2-standard-32-512',
702
+ topology='N/A',
703
+ vms_per_slice=512,
704
+ gke_accelerator='N/A',
705
+ gce_machine_type='n2-standard-32',
706
+ chips_per_vm=32,
707
+ accelerator_type=AcceleratorType['CPU'],
708
+ device_type='n2-standard-32-512',
709
+ supports_sub_slicing=False,
606
710
  ),
607
711
  'n2-standard-32-1024': SystemCharacteristics(
608
- 'N/A',
609
- 1024,
610
- 'N/A',
611
- 'n2-standard-32',
612
- 32,
613
- AcceleratorType['CPU'],
614
- 'n2-standard-32-1024',
712
+ topology='N/A',
713
+ vms_per_slice=1024,
714
+ gke_accelerator='N/A',
715
+ gce_machine_type='n2-standard-32',
716
+ chips_per_vm=32,
717
+ accelerator_type=AcceleratorType['CPU'],
718
+ device_type='n2-standard-32-1024',
719
+ supports_sub_slicing=False,
615
720
  ),
616
721
  'n2-standard-32-2048': SystemCharacteristics(
617
- 'N/A',
618
- 2048,
619
- 'N/A',
620
- 'n2-standard-32',
621
- 32,
622
- AcceleratorType['CPU'],
623
- 'n2-standard-32-2048',
722
+ topology='N/A',
723
+ vms_per_slice=2048,
724
+ gke_accelerator='N/A',
725
+ gce_machine_type='n2-standard-32',
726
+ chips_per_vm=32,
727
+ accelerator_type=AcceleratorType['CPU'],
728
+ device_type='n2-standard-32-2048',
729
+ supports_sub_slicing=False,
624
730
  ),
625
731
  }
626
732
  """ If you modify UserFacingNameToSystemCharacteristics you should also modify