Skip to content

Conversation

luccabb
Copy link
Member

@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 skalyan and gunchu 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

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
Member 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

@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
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
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