blockrun.dask_runner¶
Dask cluster startup for local or SLURM execution.
The config’s first jobqueue key selects the cluster type: local ->
LocalCluster, slurm -> SLURMCluster (scale submits sbatch). The client
process must stay alive for the whole run; on exit the cluster (and its SLURM jobs)
are torn down.
Config loading — bundled templates, layered overrides, key validation — lives in
blockrun.dask_config.
Functions¶
|
Start a Dask cluster from one or more YAML configs; yield a connected Client. |
Module Contents¶
- blockrun.dask_runner.start_dask(num_workers: int, config_path: str | Sequence[str] = 'dask-local', label: str = 'job', logger: logging.Logger | None = None, wait_timeout: int = 600, effective_config_path: str | None = None) Iterator[dask.distributed.Client]¶
Start a Dask cluster from one or more YAML configs; yield a connected Client.
config_pathis a bundled name (seebundled_configs()), a path, or a sequence of either, deep-merged left to right; unrecognised keys raise (seeblockrun.dask_config). The default,dask-local, works from any directory.- The config’s first
jobqueuekey selects the cluster type: "local": a LocalCluster withnum_workerssingle-threaded workers."slurm": a SLURMCluster;scale(num_workers)submits sbatch jobs.
Tears the cluster (and its SLURM jobs) down on exit.
effective_config_path(a directory or file) records the merged config, worth keeping with a run.- The config’s first