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.1.0.tar.gz
(19.2 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.1.0.tar.gz.
File metadata
- Download URL: slurm_workflows-1.1.0.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
078b237322d2dc061114478f277d4b6599f499fcd623fcefc661cdd4f1767f25
|
|
| MD5 |
149a1e788c386ab622cfb956c8499d8e
|
|
| BLAKE2b-256 |
d88597064fdf4ce49e96835c42efaa2b11f6e4bed35014b055894294113db181
|
File details
Details for the file slurm_workflows-1.1.0-py3-none-any.whl.
File metadata
- Download URL: slurm_workflows-1.1.0-py3-none-any.whl
- Upload date:
- Size: 22.4 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 |
35d19f3fb46beec1edd97226bbaaadb4b2c617d8eedda9418e46c4255c01d343
|
|
| MD5 |
f54d0cfcc43de5b6f50b849d33a9d5a0
|
|
| BLAKE2b-256 |
4609b51456b5cd8a027100f64cf15cd5ad5fa266ed668f9a81d29ada13db0aea
|