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.1.0.tar.gz (19.2 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.1.0-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

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

Hashes for slurm_workflows-1.1.0.tar.gz
Algorithm Hash digest
SHA256 078b237322d2dc061114478f277d4b6599f499fcd623fcefc661cdd4f1767f25
MD5 149a1e788c386ab622cfb956c8499d8e
BLAKE2b-256 d88597064fdf4ce49e96835c42efaa2b11f6e4bed35014b055894294113db181

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slurm_workflows-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35d19f3fb46beec1edd97226bbaaadb4b2c617d8eedda9418e46c4255c01d343
MD5 f54d0cfcc43de5b6f50b849d33a9d5a0
BLAKE2b-256 4609b51456b5cd8a027100f64cf15cd5ad5fa266ed668f9a81d29ada13db0aea

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.0

2 files

1.2.0

2 files

This release

1.1.0 This release

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