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(
255255 container ["jobRoleArn" ] = job_role_arn
256256 if execution_role_arn :
257257 container ["executionRoleArn" ] = execution_role_arn
258- if role .num_replicas > 1 :
258+ if role .num_replicas > 0 :
259259 instance_type = instance_type_from_resource (role .resource )
260260 if instance_type is not None :
261261 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:
195195 node_groups [0 ]["container" ]["instanceType" ],
196196 )
197197
198- def test_submit_dryrun_no_instance_type_singlenode (self ) -> None :
198+ def test_submit_dryrun_instance_type_singlenode (self ) -> None :
199199 cfg = AWSBatchOpts ({"queue" : "ignored_in_test" , "privileged" : True })
200200 resource = specs .named_resources_aws .aws_p3dn_24xlarge ()
201201 app = _test_app (num_replicas = 1 , resource = resource )
202202 info = create_scheduler ("test" ).submit_dryrun (app , cfg )
203203 # pyre-ignore[16]
204204 node_groups = info .request .job_def ["nodeProperties" ]["nodeRangeProperties" ]
205205 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" ])
207207
208208 def test_submit_dryrun_no_instance_type_non_aws (self ) -> None :
209209 cfg = AWSBatchOpts ({"queue" : "ignored_in_test" , "privileged" : True })
You can’t perform that action at this time.
0 commit comments