File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ def _role_to_node_properties(
255
255
container ["jobRoleArn" ] = job_role_arn
256
256
if execution_role_arn :
257
257
container ["executionRoleArn" ] = execution_role_arn
258
- if role .num_replicas > 1 :
258
+ if role .num_replicas > 0 :
259
259
instance_type = instance_type_from_resource (role .resource )
260
260
if instance_type is not None :
261
261
container ["instanceType" ] = instance_type
Original file line number Diff line number Diff line change @@ -195,15 +195,15 @@ def test_submit_dryrun_instance_type_multinode(self) -> None:
195
195
node_groups [0 ]["container" ]["instanceType" ],
196
196
)
197
197
198
- def test_submit_dryrun_no_instance_type_singlenode (self ) -> None :
198
+ def test_submit_dryrun_instance_type_singlenode (self ) -> None :
199
199
cfg = AWSBatchOpts ({"queue" : "ignored_in_test" , "privileged" : True })
200
200
resource = specs .named_resources_aws .aws_p3dn_24xlarge ()
201
201
app = _test_app (num_replicas = 1 , resource = resource )
202
202
info = create_scheduler ("test" ).submit_dryrun (app , cfg )
203
203
# pyre-ignore[16]
204
204
node_groups = info .request .job_def ["nodeProperties" ]["nodeRangeProperties" ]
205
205
self .assertEqual (1 , len (node_groups ))
206
- self .assertTrue ("instanceType" not in node_groups [0 ]["container" ])
206
+ self .assertTrue ("instanceType" in node_groups [0 ]["container" ])
207
207
208
208
def test_submit_dryrun_no_instance_type_non_aws (self ) -> None :
209
209
cfg = AWSBatchOpts ({"queue" : "ignored_in_test" , "privileged" : True })
You can’t perform that action at this time.
0 commit comments