slurm_sweep: hyperparameter sweeps with W&B on SLURM clusters
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.yamlfile that defines your sweep.train.pyscript, 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 theproject_nameand theentityfor the sweep on wandB.slurm: any valid slurm option. Depends on your cluster, see thesimple_slurmdocs.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.11 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.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| slurm_sweep-0.2.1.tar.gz | 1.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| slurm_sweep-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.6 MB
Release files / slurm_sweep-0.2.1.tar.gz
| Download URL | slurm_sweep-0.2.1.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2dc60539dd38a1d5d8e4ae9c70248be9c6a7d3ac718e1982a79745085828b0ab
|
|
BLAKE2b-256 checksum How to use checksums |
bb611d98818f28f3a06d1769fd6d8f59592814defad4ad5a57a81b54e671fe2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 24, 2025.
Transparency logRelease files / slurm_sweep-0.2.1-py3-none-any.whl
| Download URL | slurm_sweep-0.2.1-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16c4427d9f665a67d8a962e813e0f1c7f503b45d192a301e3ae02ff06f62b2ef
|
|
BLAKE2b-256 checksum How to use checksums |
eec10f355bc94f063a345340a28f4df00809f25f9ab96b31a31019cafa2fd47b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 24, 2025.
Transparency log