stilt.execution.SlurmExecutor#

class stilt.execution.SlurmExecutor(n_workers: 'int', cpus_per_task: 'int' = 1, array_parallelism: 'int | None' = None, setup: 'list[str] | None' = None, **kwargs: 'Any') 'None'[source]#

Fire-and-forget executor that submits Slurm array jobs via sbatch.

Always uses push dispatch — the coordinator writes immutable chunk files before calling start(), and SlurmExecutor derives the chunk directory from spec.output_dir and spec.batch_id.

Parameters

n_workers

Number of array tasks to use for the submission. Each task processes one chunk.

cpus_per_task

Number of CPUs to request per array task. This is passed to the push worker via --cpus, enabling parallel execution within each task if greater than 1.

array_parallelism

Maximum number of array tasks to run in parallel (%N suffix).

setup

Optional list of shell commands to run before the push worker command.

**kwargs

Additional keyword arguments passed as --key=value sbatch directives.

Methods#

from_config(config)

Build a Slurm executor from ModelConfig.execution values.

start(pending, *, project[, n_workers, ...])

Write chunk files, generate a submission script, submit via sbatch.

Attributes#

dispatch

n_workers

Return the default array-task count used by this executor.