clusterscope icon indicating copy to clipboard operation
clusterscope copied to clipboard

🚀[Feature Request]: Support API for resource-requirements given gpu-count

Open skalyan opened this issue 1 year ago • 2 comments

A clear and concise description of what you want to happen.

Get optimal slurm resource request parameters given number of GPUs. I think we might keep it simple with only num of gpus as start point that user pass, but we would return a dict with params and user could finetune that dict if needed in their request. Ideally this would be a dataclass with parameters that will have property to export that as #SBATCH directives, as well as as submitit arguments, so that its a directly usable

A clear and concise description of any alternative solutions or features you've considered, if any.

No response

Additional context

No response

skalyan avatar Sep 26 '25 22:09 skalyan

we have a working first version for this:

(py310) luccab@luccab-login-0:/storage/home/luccab/clusterscope$ cscope job-gen --num-gpus 3 --format json
{
  "cpu_cores": 48,
  "memory": "673G",
  "tasks_per_node": 1,
  "mem_gb": 673
}
(py310) luccab@luccab-login-0:/storage/home/luccab/clusterscope$ cscope job-gen --num-gpus 3 --format srun
srun --cpus-per-task=48 --mem=673G --ntasks-per-node=1
(py310) luccab@luccab-login-0:/storage/home/luccab/clusterscope$ cscope job-gen --num-gpus 3 --format sbatch
#!/bin/bash
#SBATCH --cpus-per-task=48
#SBATCH --mem=673G
#SBATCH --ntasks-per-node=1

luccabb avatar Sep 30 '25 20:09 luccabb

I'll close this, lets open new feature requests github issues to keep iterating over the first version

luccabb avatar Oct 01 '25 04:10 luccabb