Skip to main content

HyperSweeper

PyPI Version Test Doc Status Ruff

Hydra sweeper integration of our favorite optimization packages, utilizing ask-and-tell interfaces.

Installation

We recommend installing hypersweeper via a uv virtual environment:

pip install uv
uv venv --python 3.10
source .venv/bin/activate
make install

For extra dependencies, add them like this:

uv sync --extra dev --extra carps

Note that CARP-S requires you to install benchmarks and optimizers on your own, e.g. by running:

python -m carps.build.make optimizer_smac

The full optimizer options are:

optimizer_smac optimizer_dehb optimizer_nevergrad optimizer_optuna optimizer_ax optimizer_skopt optimizer_synetune

Basic Usage

To use the sweeper, you need to specify a target function with a hydra interface (see our examples). Then you can add one of the Hypersweeper variations as a sweeper and run with the '-m' flag to start the optimization. This will start a sequential run of your selected optimizer. If you want to use Hypersweeper on a cluster, you should additionally add a launcher, e.g. the submitit launcher for slurm.

As an example, take black-box optimization for Branin using SMAC. Simply run:

python examples/branin.py -m

You should see the launched configurations in the terminal. The results are located in 'tmp', including a record of each run, the final config and a full runhistory. For more information, see our example ReadMe.

Current Sweeper Integrations

Hypersweeper currently interfaces the following optimizers:

  • SMAC
  • HEBO
  • Nevergrad
  • CARP-S (which contains many different optimizers in itself)

We also implement sweepers from scratch for:

  • Random Search
  • Grid Search (for collecting analysis data)
  • PBT, PB2 and BGPBT as adaptations of the original code
  • Local parameter importance (LPI)
  • Ablation Paths

We also have an interface for NePS, but due to them using an old configspace version, this sweeper is not usable out of the box and requires at least a change to the configspace version, possibly even some smaller changes to the config parsing.

Cite Us

If you use Hypersweeper in your project, please cite us:

@misc{eimer24,
  author    = {T. Eimer},
  title     = {Hypersweeper},
  year      = {2024},
  url = {https://github.com/automl/hypersweeper},

Metadata

Release files for HyperSweeper 0.2.3

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

Source distribution (sdist)

Source distribution for HyperSweeper 0.2.3
File Size Uploaded
hypersweeper-0.2.3.tar.gz 314.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for HyperSweeper 0.2.3
File Interpreter ABI Platform
hypersweeper-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 382.8 kB

Release files / hypersweeper-0.2.3.tar.gz

Download URL hypersweeper-0.2.3.tar.gz
Size 314.2 kB
Tags Source
SHA-256 checksum
How to use checksums
08e15f0ea4f9a0300c590a1399c828c3887d766d22b23293f096cfa2f0c279f7
BLAKE2b-256 checksum
How to use checksums
e8e50965a8b41096e8f883dea67dd6f354e19409d16cdb353826b1cc63df09ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / hypersweeper-0.2.3-py3-none-any.whl

Download URL hypersweeper-0.2.3-py3-none-any.whl
Size 68.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8e824af9d301f3863a267b74c6557a3ad99c0b553d8678743af36061b0ccb70
BLAKE2b-256 checksum
How to use checksums
ca8afcae1fd6c7c343a681db87558a58a75dcd66cc523c90386eda489093d992
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.0.1

2 release 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