Skip to content

Commit 7ee71d5

Browse files
committed
fix: trn1 instance family does not support volume size
1 parent 7b1a7ad commit 7ee71d5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/sagemaker/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,7 @@ def volume_size_supported(instance_type: str) -> bool:
14621462
and not family.startswith("g5")
14631463
and not family.startswith("g6")
14641464
and not family.startswith("p5")
1465+
and not family.startswith("trn1")
14651466
)
14661467
except Exception as e:
14671468
raise ValueError(f"Failed to parse instance type '{instance_type}': {str(e)}")

tests/unit/test_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,6 +1815,8 @@ def test_volume_size_not_supported(self):
18151815
"local",
18161816
"local_gpu",
18171817
ParameterString(name="InstanceType", default_value="ml.m4.xlarge"),
1818+
"ml.trn1.32xlarge",
1819+
"ml.trn1n.32xlarge",
18181820
]
18191821

18201822
for instance in instances_that_dont_support_volume_size:

0 commit comments

Comments
 (0)