Metadata-Version: 2.4
Name: HyperSweeper
Version: 0.2.2
Summary: Hydra sweeper integration of our favorite optimization packages, utilizing ask-and-tell interfaces.
Author-email: AutoML Hannover <automl@ai.uni-hannover.de>
License: 
        
        BSD License
        
        Copyright (c) 2024, AutoML Hannover
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without modification,
        are permitted provided that the following conditions are met:
        
        * Redistributions of source code must retain the above copyright notice, this
          list of conditions and the following disclaimer.
        
        * Redistributions in binary form must reproduce the above copyright notice, this
          list of conditions and the following disclaimer in the documentation and/or
          other materials provided with the distribution.
        
        * Neither the name of the copyright holder nor the names of its
          contributors may be used to endorse or promote products derived from this
          software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
        ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
        WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
        IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
        INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
        BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
        DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
        OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
        OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
        OF THE POSSIBILITY OF SUCH DAMAGE.
        
License-File: AUTHORS.md
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development
Requires-Python: >=3.10
Requires-Dist: bump-my-version
Requires-Dist: configspace~=1.2.0
Requires-Dist: coverage
Requires-Dist: hydra-colorlog
Requires-Dist: hydra-core~=1.3.2
Requires-Dist: hydra-submitit-launcher
Requires-Dist: mypy
Requires-Dist: numpy~=1.24.4
Requires-Dist: pandas~=2.1.0
Requires-Dist: pre-commit
Requires-Dist: pytest>=7.0
Requires-Dist: ruff
Requires-Dist: smac~=2.1
Requires-Dist: tomli
Requires-Dist: tox==3.14.0
Requires-Dist: twine~=5.1.1
Requires-Dist: typing-extensions
Requires-Dist: wandb==0.16.6
Provides-Extra: all
Requires-Dist: carps[dehb,hebo,nevergrad,optuna,skopt,smac,synetune]; extra == 'all'
Requires-Dist: dehb==0.1.1; extra == 'all'
Requires-Dist: gpy; extra == 'all'
Requires-Dist: hebo==0.3.5; extra == 'all'
Requires-Dist: nevergrad==1.0.2; extra == 'all'
Provides-Extra: carps
Requires-Dist: carps[dehb,hebo,nevergrad,optuna,skopt,smac,synetune]; extra == 'carps'
Provides-Extra: dehb
Requires-Dist: dehb==0.1.1; extra == 'dehb'
Provides-Extra: dev
Requires-Dist: automl-sphinx-theme; extra == 'dev'
Requires-Dist: commitizen; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cases; extra == 'dev'
Requires-Dist: pytest-coverage; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: doc
Requires-Dist: automl-sphinx-theme; extra == 'doc'
Provides-Extra: examples
Requires-Dist: deepcave; extra == 'examples'
Requires-Dist: scikit-learn; extra == 'examples'
Requires-Dist: stable-baselines3; extra == 'examples'
Provides-Extra: hebo
Requires-Dist: hebo==0.3.5; extra == 'hebo'
Provides-Extra: nevergrad
Requires-Dist: nevergrad==1.0.2; extra == 'nevergrad'
Provides-Extra: pbt
Requires-Dist: gpy; extra == 'pbt'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cases; extra == 'test'
Requires-Dist: pytest-coverage; extra == 'test'
Provides-Extra: tooling
Requires-Dist: commitizen; extra == 'tooling'
Requires-Dist: pre-commit; extra == 'tooling'
Requires-Dist: ruff; extra == 'tooling'
Description-Content-Type: text/markdown

# HyperSweeper

[![PyPI Version](https://img.shields.io/pypi/v/hypersweeper.svg)](https://pypi.python.org/pypi/hypersweeper)
[![Test](https://github.com/automl-private/hypersweeper/actions/workflows/pytest.yml/badge.svg)](https://github.com/automl-private/hypersweeper/actions/workflows/pytest.yml)
[![Doc Status](https://github.com/automl-private/hypersweeper/actions/workflows/docs.yml/badge.svg)](https://github.com/automl-private/hypersweeper/actions/workflows/docs.yml)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)


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

- Free software: BSD license
- Documentation: https://automl.github.io/hypersweeper

## Installation 
We recommend installing hypersweeper via a uv virtual environment:

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

For extra dependencies, add them like this:
```bash
uv sync --extra dev --extra carps
```

## 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:
```bash
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
- Random Search
- SMAC
- HEBO
- PBT
- CARP-S (which contains many different optimizers in itself)

## Cite Us

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

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