Skip to main content

slurm-workflows: HPC workflow helpers for Slurm clusters.

Futuristic banner image.

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, scancel on PATH)
  • A running ds-service server, 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 referenceSlurmPilotExecutor, 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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slurm_workflows-1.2.0-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

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

Hashes for slurm_workflows-1.2.0.tar.gz
Algorithm Hash digest
SHA256 78d31e59c3a08bebb26f8e612e5049d4cdcd0974c3371b5b0619a2fe9f8c0d22
MD5 816c638f57e403d0c26b5741ea2a3fdf
BLAKE2b-256 abf923a5ff85f346372c20aa1952f78494f72fafd86d34fe1ce4b0d20474930b

See more details on using hashes here.

File details

Details for the file slurm_workflows-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for slurm_workflows-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4daadd4ad3be8228d25cd72f848b264336fb362c2609916a4ff4ff57964c5e0c
MD5 036f8fe94ccb2716acfb4cef0827c6a5
BLAKE2b-256 d8e942bae7bb0acf66a0bbd13a580757e27bcb15b118181618624a434831849d

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.0

2 files

This release

1.2.0 This release

2 files

1.1.0

2 files

1.0.2

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page