sweeps
Weights and Biases Hyperparameter Sweeps Engine.
What it is and what it does
Sweeps is a hyperparameter optimization engine that powers Weights & Biases' sweep functionality. It takes a sweep configuration (defining the optimization method, parameter ranges, and metric to optimize) and a list of completed runs, then suggests the next hyperparameter values to try. It supports multiple search strategies including Bayesian optimization and grid search, and can identify runs to stop early using methods like Hyperband to save compute resources.
The package validates configurations against a JSON schema, routes to the appropriate search algorithm, and returns structured suggestions. It's designed as a backend component but is also available as a standalone library for local hyperparameter tuning workflows. Dependencies include numpy, scipy, scikit-learn for numerical computation, and pydantic for configuration validation.
Use it for:
- Suggest next hyperparameters in a machine learning training loop using Bayesian optimization to balance exploration and exploitation.
- Implement early stopping in parallel hyperparameter searches by identifying underperforming runs via Hyperband.
- Validate and parse sweep configurations to ensure they conform to the expected schema before running experiments.
- Integrate hyperparameter optimization into a local training pipeline without relying on external services.
- Grid search over discrete parameter combinations with deterministic parameter assignment.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates hyperparameter sweep suggestions using Bayesian optimization, grid search, and other methods, and identifies runs to early-terminate based on performance.
Yes. The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and offers low-friction installation. It solves a concrete problem—suggesting hyperparameters and early-stopping decisions—with established algorithms. Install it if you need programmatic hyperparameter optimization or are integrating with Weights & Biases sweeps locally.
Install
sweeps on PyPI
pip
pip install sweepsuv
uv add sweepspoetry
poetry add sweepsInstalling sweeps
Before you install
Low friction install with a pure-Python wheel. Actively maintained as of August 2026 with no known vulnerabilities. Depends on established scientific libraries (numpy, scipy, scikit-learn, pydantic).
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute freely provided you include the license notice.
Quickstart
pip install sweeps
from sweeps import next_run, SweepRun, RunState
config = {
"metric": {"name": "loss", "goal": "minimize"},
"method": "bayes",
"parameters": {"v1": {"min": 1, "max": 10}},
}
runs = []
suggestion = next_run(config, runs)
Verify before relying
- Whether the package is actively developed beyond August 2026 or if maintenance has stalled since the last release in August 2022.
- Performance characteristics and scalability limits for large numbers of runs or high-dimensional parameter spaces.
- Availability of documentation beyond the README examples provided.
Package facts
| License | MIT license (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — numpy, scipy, PyYAML, jsonschema, jsonref, pydantic, scikit-learn |
| Maintenance | actively maintained — 1,460 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 103,140/month — #12,828 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sweeps-0.2.0-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
keras-tunerKerasTuner automates hyperparameter…
permissive · top 15,000 on PyPI
pyannote-pipelineDefines and optimizes tunable hyperparameter…
unclear · top 5,000 on PyPI
hydra-optuna-sweeperIntegrates Optuna hyperparameter optimization…
permissive · top 15,000 on PyPI
azureml-train-restclients-hyperdriveProvides REST client classes for creating and…
unclear · top 15,000 on PyPI
hyperoptHyperopt performs serial and parallel…
permissive · top 5,000 on PyPI
azureml-train-automlAutomatically discovers and trains the best…
unclear · top 15,000 on PyPI
wandbwandb is a machine learning experiment tracking…
permissive · top 1,000 on PyPI
optunaOptuna is a hyperparameter optimization…
permissive · top 5,000 on PyPI
FLAMLFLAML automates machine learning workflows by…
permissive · top 15,000 on PyPI
azureml-train-automl-clientAutomatically selects and tunes machine…
unclear · top 15,000 on PyPI