@@ -64,9 +64,9 @@ def test_has_gpu_quota_allocation_resources(self, memory_in_gib, vcpu, accelerat
64
64
("ml.g5.12xlarge" , "nvidia.com/gpu" , 4 ),
65
65
("ml.g6.48xlarge" , "nvidia.com/gpu" , 8 ),
66
66
# Trainium instances
67
- ("ml.trn1.32xlarge" , "aws.amazon.com/neuron " , 16 ),
68
- ("ml.trn1n.32xlarge" , "aws.amazon.com/neuron " , 16 ),
69
- ("ml.trn2.48xlarge" , "aws.amazon.com/neuron " , 16 ),
67
+ ("ml.trn1.32xlarge" , "aws.amazon.com/neurondevice " , 16 ),
68
+ ("ml.trn1n.32xlarge" , "aws.amazon.com/neurondevice " , 16 ),
69
+ ("ml.trn2.48xlarge" , "aws.amazon.com/neurondevice " , 16 ),
70
70
# CPU-only instances
71
71
("ml.c5.large" , None , 0 ),
72
72
("ml.m5.xlarge" , None , 0 ),
@@ -110,7 +110,7 @@ def test_get_resources_from_compute_quotas_trainium_instance(self):
110
110
result = _get_resources_from_compute_quotas ("ml.trn1.32xlarge" , None , None , 8 )
111
111
# ml.trn1.32xlarge has 16 trainium, 128 CPUs, 512GB memory
112
112
# 8 trainium is half, so we should get half of CPU and memory
113
- assert result == {"cpu" : "64.0" , "memory" : "256.0Gi" , "aws.amazon.com/neuron " : 8 }
113
+ assert result == {"cpu" : "64.0" , "memory" : "256.0Gi" , "aws.amazon.com/neurondevice " : 8 }
114
114
115
115
def test_get_resources_from_compute_quotas_cpu_only_instance (self ):
116
116
result = _get_resources_from_compute_quotas ("ml.c5.large" , 1.0 , 2.0 , 1 )
@@ -137,8 +137,8 @@ def test_get_resources_from_compute_quotas_accelerators_and_cpu_only(self):
137
137
("ml.g5.xlarge" , 1 , {"cpu" : "4" , "memory" : "16Gi" , "nvidia.com/gpu" : 1 }),
138
138
("ml.g5.xlarge" , 3 , {"cpu" : "12" , "memory" : "48Gi" , "nvidia.com/gpu" : 3 }),
139
139
# Trainium instances
140
- ("ml.trn1.32xlarge" , 1 , {"cpu" : "128" , "memory" : "512Gi" , "aws.amazon.com/neuron " : 16 }),
141
- ("ml.trn1.32xlarge" , 2 , {"cpu" : "256" , "memory" : "1024Gi" , "aws.amazon.com/neuron " : 32 }),
140
+ ("ml.trn1.32xlarge" , 1 , {"cpu" : "128" , "memory" : "512Gi" , "aws.amazon.com/neurondevice " : 16 }),
141
+ ("ml.trn1.32xlarge" , 2 , {"cpu" : "256" , "memory" : "1024Gi" , "aws.amazon.com/neurondevice " : 32 }),
142
142
# CPU-only instances
143
143
("ml.c5.large" , 1 , {"cpu" : "2" , "memory" : "4Gi" }),
144
144
("ml.c5.large" , 5 , {"cpu" : "10" , "memory" : "20Gi" }),
@@ -177,7 +177,7 @@ def test_get_limits_zero_values(self):
177
177
178
178
def test_get_limits_trainium_instance (self ):
179
179
result = _get_limits ("ml.trn1.32xlarge" , 8.0 , 32.0 , 4 )
180
- assert result == {"cpu" : "8.0" , "memory" : "32.0Gi" , "aws.amazon.com/neuron " : 4 }
180
+ assert result == {"cpu" : "8.0" , "memory" : "32.0Gi" , "aws.amazon.com/neurondevice " : 4 }
181
181
182
182
def test_get_limits_cpu_only_instance (self ):
183
183
result = _get_limits ("ml.c5.large" , 2.0 , 8.0 , 1 )
0 commit comments