Skip to content

Commit 8ba23ff

Browse files
Pathways-on-Cloud Teamcopybara-github
authored andcommitted
Update TPU type validation: rename tpuv5p to tpuv5
The regular expression for validating TPU instance strings is updated to allow 'tpuv5' in addition to 'tpuv5e' and 'tpuv6e', replacing 'tpuv5p'. Pathways uses 'tpuv5' for TPU v5p. PiperOrigin-RevId: 844841628
1 parent 073335f commit 8ba23ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pathwaysutils/experimental/shared_pathways_service/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def _validate_tpu_supported(tpu_instance_with_topology: str) -> None:
5151
# tpuv6e:2x4 -> type='tpuv6e', topology='2x4'
5252
# tpuv5p:2x2x1 -> type='tpuv5p', topology='2x2x1'
5353
match = re.match(
54-
r"^(?:tpuv(?:5e|5p|6e)):(?P<topology>\d+(?:x\d+){1,2})$",
54+
r"^(?:tpuv(?:5e|5|6e)):(?P<topology>\d+(?:x\d+){1,2})$",
5555
tpu_instance_with_topology,
5656
)
5757

0 commit comments

Comments
 (0)