Skip to content

adding slurm cmd option to CLI [3/n]#100

Draft
luccabb wants to merge 1 commit into
add_opt_argsfrom
add_slurm_cmd
Draft

adding slurm cmd option to CLI [3/n]#100
luccabb wants to merge 1 commit into
add_opt_argsfrom
add_slurm_cmd

Conversation

@luccabb
Copy link
Copy Markdown
Contributor

@luccabb luccabb commented Oct 2, 2025

Summary

allowing users to pass slurm cmd via the CLI and auto-ingest this in sbatch/srun output

Test Plan

observe how sbatch and srun now has the slurm cmd:

$ cscope job-gen task slurm --num-gpus=4 --partition=h100 --format=sbatch --time="1234234" --qos='learn' --slurm-cmd='python my.python.training'
#!/bin/bash
#SBATCH --cpus-per-task=96
#SBATCH --mem=999G
#SBATCH --ntasks-per-node=1
#SBATCH --gres=gpu:4
#SBATCH --partition=h100
#SBATCH --qos=learn
#SBATCH --time=1234234
python my.python.training
$ cscope job-gen task slurm --num-gpus=4 --partition=h100 --format=srun --tim
e="1234234" --qos='learn' --slurm-cmd='python my.python.training'
srun --cpus-per-task=96 --mem=999G --ntasks-per-node=1 --gres=gpu:4 --partition=h100 --qos=learn --time=1234234 python my.python.training

@luccabb luccabb requested review from gunchu and skalyan as code owners October 2, 2025 21:42
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 2, 2025
@luccabb luccabb requested a review from uralik October 2, 2025 21:46
@gunchu
Copy link
Copy Markdown
Contributor

gunchu commented Oct 2, 2025

How do we expect cscope job-gen task slurm... and such commands? My assumption was - they'll run it, copy paste the output where necessary (ex: top of their sbatch script) and keep iterating after that. The sbatch script can get quite large eventually.

@luccabb
Copy link
Copy Markdown
Contributor Author

luccabb commented Oct 2, 2025

@gunchu yeah that's correct, this optional arg is just in case you want custom cmds to be appended to srun and sbatch

Copy link
Copy Markdown
Contributor

@gunchu gunchu left a comment

Choose a reason for hiding this comment

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

Let's sit on this one for a while

@skalyan
Copy link
Copy Markdown
Contributor

skalyan commented Oct 6, 2025

Can we convert this and PR99 to Draft state, given @gunchu guidance.

@luccabb luccabb marked this pull request as draft October 6, 2025 17:40
@meta-cla
Copy link
Copy Markdown

meta-cla Bot commented May 27, 2026

Hi @luccabb!

Thank you for your pull request.

We require contributors to sign our Contributor License Agreement, and yours needs attention.

You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants