Skip to content

Fix/slurm mutually exclusive options#170

Merged
n-gao merged 9 commits into
TUM-DAML:masterfrom
Grutschus:fix/slurm-mutually-exclusive-options
May 21, 2026
Merged

Fix/slurm mutually exclusive options#170
n-gao merged 9 commits into
TUM-DAML:masterfrom
Grutschus:fix/slurm-mutually-exclusive-options

Conversation

@Grutschus
Copy link
Copy Markdown
Contributor

Previously it wasn't possible to remove keys in higher priority configs that were set once in some base config.
For example, cpus-per-task is set in the default SLURM_CONFIG. On clusters that enforce requesting CPUs via cpus-per-gpu, it is not possible to unset cpus-per-task.

What does this implement/fix?

This PR fixes this via:
a) Introducing a custom yaml tag !remove for removing keys from base configs.
b) Automatically deleting mutually exclusive sbatch options from the configs.

Grutschus and others added 9 commits February 25, 2026 19:05
Introduces a REMOVE singleton (and !remove YAML tag) that can be used as
a value in any config dict to delete a key that would otherwise be
inherited from a lower-priority config via merge_dicts. This allows e.g.
removing the default cpus-per-task when switching to cpus-per-gpu in a
user settings.py or experiment YAML without re-specifying the full
default block.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a higher-priority slurm config (template or experiment yaml) sets an
option that belongs to a mutually exclusive group, conflicting options
inherited from the base are now automatically removed during
assemble_slurm_config_dict. Covers all pairs documented in the sbatch
man page: cpus-per-task/cpus-per-gpu, mem/mem-per-cpu/mem-per-gpu,
exclusive/oversubscribe, core-spec/thread-spec, and the three
ntasks-per-gpu incompatibilities.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@n-gao n-gao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@n-gao n-gao merged commit e0417e2 into TUM-DAML:master May 21, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants