Skip to content

Commit 0cf705c

Browse files
committed
add comment for regex
1 parent 6d11398 commit 0cf705c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/sagemaker/image_uris.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ def _processor(instance_type, available_processors):
168168
if instance_type.startswith("local"):
169169
processor = "cpu" if instance_type == "local" else "gpu"
170170
else:
171+
# looks for either "ml.<family>.<size>" or "ml_<family>"
171172
match = re.match(r"^ml[\._]([a-z\d]+)\.?\w*$", instance_type)
172173
if match:
173174
family = match[1]

0 commit comments

Comments
 (0)