Hi,
Hopefully the description of what I’m trying to do makes sense, basically I want this behavior:
If the cpu
partition is selected, hide all GPU settings.
If the interactive
partition is selected, force the slurm_gpu_type
to a40
and force the slurm_gpus
to 1, leaving the slurm_gpu_constraint
widget hidden.
If the gpu
partition is selected, show the slurm_gpus
and slurm_gpu_type
widgets.
If gpu
partition is selected AND the slurm_gpu_type
is set to a100
, then display the slurm_gpu_constraint
widget to allow selecting an A100 sub-type.
The config below almost works, but the slurm_gpu_constraint
widget is never displayed regardless of my selections. Am I doing something wrong or is nesting/cascading levels like this not something that will work with dynamic widgets?
slurm_partition:
label: "Partition (--partition=THIS_VALUE):"
widget: "select"
help:
options:
- [
"cpu", "cpu",
data-hide-slurm-gpus: true,
data-hide-slurm-gpu-type: true,
data-hide-slurm-gpu-constraint: true
]
- [
"gpu", "gpu",
data-max-slurm-gpus: 4
]
- [
"interactive", "interactive",
data-max-slurm-gpus: 1,
data-hide-slurm-gpu-type: true,
data-set-slurm-gpu-type: "a40",
data-hide-slurm-gpu-constraint: true,
data-set-slurm-gpu-constraint: ""
]
value: 'cpu'
slurm_gpus:
label: "Number of gpus (--gres=gpu:THIS_VALUE)"
help: "This value sets the number of gpus that will be available to the job.
Select the gpu partition if this value is non-zero for best results ..."
widget: "number_field"
value: "0"
min: "0"
max: "8"
slurm_gpu_type:
label: "Optional GPU type. Using a specific type could result in longer queue times."
widget: "select"
options:
- [ "Any Available GPU", "", data-hide-slurm-gpu-constraint: true ]
- [ "A100", "a100" ]
- [ "A40", "a40", data-hide-slurm-gpu-constraint: true ]
- [ "A6000", "a6000", data-hide-slurm-gpu-constraint: true ]
value: ""
slurm_gpu_constraint:
label: "Optional GPU constraint, to select between different versions of the same GPU type."
widget: "select"
options:
- [ "Any available A100", "" ]
- [ "A100 80GB", "a100_80" ]
- [ "A100 40GB", "a100_40" ]
value: ""