slurm-workflows: HPC workflow helpers for Slurm clusters.
slurm-workflows lets you run Python functions on a Slurm cluster
without writing sbatch scripts by hand.
It provides a concurrent.futures-inspired
interface that launches long-lived pilot jobs and dispatches tasks to them,
so Slurm's queueing latency is paid once per worker instead of once per task.
Features
- Pilot-job task execution — pay the queue wait once, then dispatch tasks at queue-latency speed.
- Dynamic scaling — grow or shrink a pool of workers at runtime
with
scale_workers. - Stateful actors — keep expensive per-worker state (loaded models, DB connections) warm across many tasks.
- Transparent serialization — functions, arguments, and return values are cloudpickled, so closures and lambdas work.
- Non-fatal remote errors — an exception on a worker doesn't kill the driver script; it comes back as the task's result.
- Batch Bayesian optimization — a botorch optimizer that proposes a whole batch of points at once and evaluates them across the worker pool, over mixed integer / float / log-float / categorical spaces.
Requirements
- Python >= 3.12
- Access to a Slurm cluster (
sbatch,squeue,scancelonPATH) - A running
ds-serviceserver, reachable from the login node and the compute nodes. The client library is installed as a dependency; the server is a separate install.
Installation
pip install -U slurm-workflows
Documentation
- How to use slurm-workflows — the user guide: concepts, quick start, stateful actors, one worker per job vs per task, running the task-queue server, and troubleshooting.
- API reference —
SlurmPilotExecutor,Task,check_for_error, and the worker environment. - Batch Bayesian optimization with botorch — the batch Bayesian optimizer that proposes a whole batch of points per round.
- How to run the tests — running the suite, what is mocked and what is real, and notes for changing the tests.
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
slurm_workflows-1.2.0.tar.gz
(19.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slurm_workflows-1.2.0.tar.gz.
File metadata
- Download URL: slurm_workflows-1.2.0.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78d31e59c3a08bebb26f8e612e5049d4cdcd0974c3371b5b0619a2fe9f8c0d22
|
|
| MD5 |
816c638f57e403d0c26b5741ea2a3fdf
|
|
| BLAKE2b-256 |
abf923a5ff85f346372c20aa1952f78494f72fafd86d34fe1ce4b0d20474930b
|
File details
Details for the file slurm_workflows-1.2.0-py3-none-any.whl.
File metadata
- Download URL: slurm_workflows-1.2.0-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4daadd4ad3be8228d25cd72f848b264336fb362c2609916a4ff4ff57964c5e0c
|
|
| MD5 |
036f8fe94ccb2716acfb4cef0827c6a5
|
|
| BLAKE2b-256 |
d8e942bae7bb0acf66a0bbd13a580757e27bcb15b118181618624a434831849d
|