File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,12 @@ def get_types_info(client: EC2Client) -> Dict[str, NodeTypeInfo]:
9393 for page in client .get_paginator ("describe_instance_types" ).paginate ()
9494 for i in page ["InstanceTypes" ]
9595 }
96+
97+ def is_cluster_group (d ):
98+ if "PlacementGroupInfo" not in d :
99+ return False
100+ return "cluster" in d ["PlacementGroupInfo" ]["SupportedStrategies" ]
101+
96102 return {
97103 s : {
98104 "memory" : d ["MemoryInfo" ]["SizeInMiB" ]
@@ -102,7 +108,7 @@ def get_types_info(client: EC2Client) -> Dict[str, NodeTypeInfo]:
102108 ),
103109 "threads_per_core" : d ["VCpuInfo" ].get ("DefaultThreadsPerCore" , 1 ),
104110 "arch" : d ["ProcessorInfo" ]["SupportedArchitectures" ][0 ],
105- "cluster_group" : 'cluster' in d [ "PlacementGroupInfo" ][ "SupportedStrategies" ]
111+ "cluster_group" : is_cluster_group ( d ),
106112 }
107113 for s , d in instances .items ()
108114 }
You can’t perform that action at this time.
0 commit comments