phenotypic.sdk_.slurm.effective_sbatch_option#

phenotypic.sdk_.slurm.effective_sbatch_option(slurm_args: dict[str, Any], option: str) → str | None[source]#

The value sbatch will use for --<option> from slurm_args.

Read back from format_sbatch_directives(), the one formatter, so every spelling it accepts counts (partition and slurm_partition both render --partition), and the LAST directive wins, as sbatch applies #SBATCH lines in order. A check that reads one dict key instead misses the GUI’s partition= spelling, and with both spellings present asks about the partition the job will not run in (spec 2026-09-24-cli-preflight, Phase E review E3).

Parameters:
  • slurm_args (dict[str, Any]) – The profile, as --slurm/--gpu-slurm parse it.

  • option (str) – The long option name without dashes, e.g. "partition".

Returns:

The value of the last --<option>= directive, or None.

Return type:

str | None