Skip to content

Commit ff9f15c

Browse files
committed
Remove Feature from custom settings
1 parent 82a43e2 commit ff9f15c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cookbooks/aws-parallelcluster-slurm/files/default/head_node_slurm/slurm/config_renderer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ def __init__(self, queue_name: str, compute_resource_config: Dict, no_gpu, memor
2424
self.name = compute_resource_config["Name"]
2525
self.disable_multithreading = compute_resource_config["DisableSimultaneousMultithreading"]
2626
self.custom_settings = compute_resource_config.get("CustomSlurmSettings", {})
27+
# If Features are in CustomSlurmSettings, fetch them and remove from CustomSlurmSettings
28+
self.custom_features = self.custom_settings.pop("Feature", "")
2729
self.spot_price = compute_resource_config.get("SpotPrice", None)
2830
self.instance_types = get_instance_types(compute_resource_config)
2931
self.real_memory = get_real_memory(
@@ -85,7 +87,7 @@ def _definitions(self, dynamic=False):
8587
return definitions
8688

8789
def _features(self, dynamic=False):
88-
features = set(self.custom_settings.get("Features", "").split(','))
90+
features = set(self.custom_features.split(','))
8991
# this is a simple workaround for empty Features: split will give [''] and we'll discard it
9092
# as well as all empty strings.
9193
features.discard('')

0 commit comments

Comments
 (0)