Skip to content

feat(slurm): add reservation support to job configuration#147

Open
mkuznet1 wants to merge 1 commit into
developfrom
fix/slurm-reservation-templated
Open

feat(slurm): add reservation support to job configuration#147
mkuznet1 wants to merge 1 commit into
developfrom
fix/slurm-reservation-templated

Conversation

@mkuznet1

Copy link
Copy Markdown
Contributor

This pull request adds support for specifying a Slurm reservation in job submissions. The main changes ensure that the reservation parameter from the Slurm configuration is passed through the deployment code and correctly rendered in the Slurm job script template.

Support for Slurm reservation:

  • Added the reservation field to the Slurm job configuration dictionary in slurm.py, so it can be accessed and used when generating job scripts.
  • Updated the Slurm job script template (job.sh.j2) to include the #SBATCH --reservation directive if a reservation is specified.- Updated SlurmDeployment to include a new "reservation" field in the job configuration, allowing users to specify job reservations.
  • Modified job.sh.j2 template to conditionally include the reservation directive in the SLURM job script if a reservation is provided.

This enhancement improves the flexibility of job submissions in SLURM environments.

- Updated SlurmDeployment to include a new "reservation" field in the job configuration, allowing users to specify job reservations.
- Modified job.sh.j2 template to conditionally include the reservation directive in the SLURM job script if a reservation is provided.

This enhancement improves the flexibility of job submissions in SLURM environments.
Copilot AI review requested due to automatic review settings June 22, 2026 12:31
@mkuznet1 mkuznet1 self-assigned this Jun 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds end-to-end support for specifying a Slurm reservation when submitting jobs via the Slurm deployment path, ensuring the configuration value is available to the job-script renderer and emitted as an #SBATCH directive.

Changes:

  • Passes reservation from slurm_config into the Jinja template render context.
  • Updates the Slurm job script template to conditionally emit #SBATCH --reservation when provided.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/madengine/deployment/templates/slurm/job.sh.j2 Conditionally adds #SBATCH --reservation={{ reservation }} to the generated job script.
src/madengine/deployment/slurm.py Adds reservation to the template context so the script template can render it.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mkuznet1 mkuznet1 added the enhancement New feature or request label Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants