Skip to main content

slurm_sweep: hyperparameter sweeps with W&B on SLURM clusters

Tests Coverage Pre-commit.ci PyPI Downloads

slurm_sweep is the missing (small) piece to efficiently run hyperparameter sweeps on SLURM clusters by combining the power of weights and biases (W&B) and simple_slurm. It allows you to efficiently parallelize sweeps with job arrays, while tracking experiments and results on W&B. All you need is:

  • W&B account.
  • config.yaml file that defines your sweep.
  • train.py script, that specifies the actual training and evaluation.

Getting started

Create an account on W&B and take a look at our examples in the examples folder. These contain both config.yaml and train.py scripts.

The config file

You need config file in yaml format. This file should have three sections:

  • general: you need to define at least the project_name and the entity for the sweep on wandB.
  • slurm: any valid slurm option. Depends on your cluster, see the simple_slurm docs.
  • wandb: standard W&B config for a hyperparameter sweep.

The training script

This needs to be a python script that defines the training and evaluation logic. It should call wandb.init() and retrieve parameters from wandb.config. It can log values using wandb.log. See the W&B docs.

Submission

Once you're ready, you can test your config file using slurm-sweep validate-config config.yaml. If this passes, create a submission script using slurm-sweep configure-sweep config.yaml, and submit with sbatch submit.sh.

Installation

You need to have Python 3.12 or newer installed on your system. If you don't have Python installed, we recommend installing uv.

There are two alternative options to install slurm_sweep:

  • Install the latest release from PyPI:

    pip install slurm_sweep
    
  • Install the latest development version:

    pip install git+https://github.com/quadbio/slurm_sweep.git@main
    

Release notes

See the changelog.

Contact

If you found a bug, please use the issue tracker.

Metadata

Release files for slurm-sweep 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slurm-sweep 0.3.0
File Size Uploaded Provenance Actions
slurm_sweep-0.3.0.tar.gz 1.6 MB With provenance Details for slurm_sweep-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for slurm-sweep 0.3.0
File Interpreter ABI Platform Actions
slurm_sweep-0.3.0-py3-none-any.whl Python 3 none any Details for slurm_sweep-0.3.0-py3-none-any.whl

Total release size: 1.6 MB

Release files / slurm_sweep-0.3.0.tar.gz

Download URL slurm_sweep-0.3.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
a332ed7e87ec285d888c0821bf26b7b8e4f2ca932a71c9f0990cf8081fff30d3
BLAKE2b-256 checksum
How to use checksums
b1b7d714047cecab9608bd57a162f29c01e8b2575749197911207876fc48425e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / slurm_sweep-0.3.0-py3-none-any.whl

Download URL slurm_sweep-0.3.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ffa6bb2aeb0649ba848060ea31301fefb86dec1c7612d937df233b6ea5d7292c
BLAKE2b-256 checksum
How to use checksums
d30d64b64aebceb4f68b311d40ff75258f20acea99151f9be6581eb46474e6c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for slurm-sweep 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for slurm_sweep-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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