Fix/slurm mutually exclusive options#170
Merged
n-gao merged 9 commits intoMay 21, 2026
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously it wasn't possible to remove keys in higher priority configs that were set once in some base config.
For example,
cpus-per-taskis set in the defaultSLURM_CONFIG. On clusters that enforce requesting CPUs viacpus-per-gpu, it is not possible to unsetcpus-per-task.What does this implement/fix?
This PR fixes this via:
a) Introducing a custom yaml tag
!removefor removing keys from base configs.b) Automatically deleting mutually exclusive
sbatchoptions from the configs.