• Stars
    star
    137
  • Rank 266,121 (Top 6 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created almost 5 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Collection of hyperparameter optimization benchmark problems

HPOBench

HPOBench is a library for providing benchmarks for (multi-fidelity) hyperparameter optimization and with a focus on reproducibility.

Further info:

Status

Status for Master Branch: Build Status codecov

Status for Development Branch: Build Status codecov

In 4 lines of code

Evaluate a random configuration using a singularity container

from hpobench.container.benchmarks.nas.tabular_benchmarks import SliceLocalizationBenchmark
b = SliceLocalizationBenchmark(rng=1)
config = b.get_configuration_space(seed=1).sample_configuration()
result_dict = b.objective_function(configuration=config, fidelity={"budget": 100}, rng=1)

All benchmarks can also be queried with fewer or no fidelities:

from hpobench.container.benchmarks.nas.tabular_benchmarks import SliceLocalizationBenchmark
b = SliceLocalizationBenchmark(rng=1)
config = b.get_configuration_space(seed=1).sample_configuration()
result_dict = b.objective_function(configuration=config, fidelity={"budget": 50}, rng=1)
# returns results on the highest budget
result_dict = b.objective_function(configuration=config, rng=1)

For each benchmark further info on the searchspace and fidelity space can be obtained:

from hpobench.container.benchmarks.nas.tabular_benchmarks import SliceLocalizationBenchmark
b = SliceLocalizationBenchmark(task_id=167149, rng=1)
cs = b.get_configuration_space(seed=1)
fs = b.get_fidelity_space(seed=1)
meta = b.get_meta_information()

Installation

We recommend using a virtual environment. To install HPOBench, please run the following:

git clone https://github.com/automl/HPOBench.git
cd HPOBench 
pip install .

Note: This does not install singularity (version 3.6). Please follow the steps described here: user-guide.
If you run into problems, using the most recent singularity version might help: here

Containerized Benchmarks

We provide all benchmarks as containerized versions to (i) isolate their dependencies and (ii) keep them reproducible. Our containerized benchmarks do not rely on external dependencies and thus do not change over time. For this, we rely on Singularity (version 3.6) and for now upload all containers to a gitlab registry

The only other requirements are: ConfigSpace, scipy and numpy

Run a Benchmark Locally

Each benchmark can also be run locally, but the dependencies must be installed manually and might conflict with other benchmarks. This can be arbitrarily complex and further information can be found in the docstring of the benchmark.

A simple example is the XGBoost benchmark which can be installed with pip install .[xgboost]

from hpobench.benchmarks.ml.xgboost_benchmark_old import XGBoostBenchmark

b = XGBoostBenchmark(task_id=167149)
config = b.get_configuration_space(seed=1).sample_configuration()
result_dict = b.objective_function(configuration=config,
                                   fidelity={"n_estimators": 128, "dataset_fraction": 0.5}, rng=1)

How to Build a Container Locally

With singularity installed run the following to built the, e.g. xgboost container

cd hpobench/container/recipes/ml
sudo singularity build xgboost_benchmark Singularity.XGBoostBenchmark

You can use this local image with:

from hpobench.container.benchmarks.ml.xgboost_benchmark import XGBoostBenchmark
b = XGBoostBenchmark(task_id=167149, container_name="xgboost_benchmark", 
                     container_source='./') # path to hpobench/container/recipes/ml
config = b.get_configuration_space(seed=1).sample_configuration()
result_dict = b.objective_function(config, fidelity={"n_estimators": 128, "dataset_fraction": 0.5})

Configure HPOBench

All of HPOBench's settings are stored in a file, the hpobenchrc-file. It is a .yaml file, which is automatically generated at the first use of HPOBench. By default, it is placed in $XDG_CONFIG_HOME (or if not set this defaults to '~/.config/hpobench'). This file defines where to store containers and datasets and much more. We highly recommend to have a look at this file once it's created. Furthermore, please make sure to have write permission in these directories or adapt if necessary. For more information on where data is stored, please see the section on HPOBench Data below.

Furthermore, for running containers, we rely on Unix sockets which by default are located in $TEMP_DIR (or if not set this defaults to \tmp).

Remove all data, containers, and caches

Feel free to use hpobench/util/clean_up_script.py to remove all data, downloaded containers and caches:

python ./hpobench/util/clean_up_script.py --help

If you like to delete only specific parts, i.e. a single container, you can find the benchmark's data, container, and caches in the following directories:

HPOBench Data

HPOBench stores downloaded containers and datasets at the following locations:

$XDG_CONFIG_HOME # ~/.config/hpobench
$XDG_CACHE_HOME # ~/.cache/hpobench
$XDG_DATA_HOME # ~/.local/share/hpobench

For crashes or when not properly shutting down containers, there might be socket files left under /tmp/hpobench_socket.

OpenML Data

OpenML data additionally maintains its cache which is located at ~/.openml/

Singularity Containers

Singularity additionally maintains its cache which can be removed with singularity cache clean

Use HPOBench Benchmarks in Research Projects

If you use a benchmark in your experiments, please specify the version number of the HPOBench as well as the version of the used container to ensure reproducibility. When starting an experiment, HPOBench writes automatically these two version numbers to the log.

Troubleshooting and Further Notes

  • Singularity throws an 'Invalid Image format' exception Use a singularity version > 3. For users of the Meta-Cluster in Freiburg, you have to set the following path: export PATH=/usr/local/kislurm/singularity-3.5/bin/:$PATH

  • A Benchmark fails with SystemError: Could not start an instance of the benchmark. Retried 5 times but the container can be started locally with singularity instance start <pathtocontainer> test See whether in ~/.singularity/instances/sing/$HOSTNAME/*/ there is a file that does not end with '}'. If yes delete this file and retry.

Note: If you are looking for a different or older version of our benchmarking library, you might be looking for HPOlib1.5

Reference

If you use HPOBench, please cite the following paper:

@inproceedings{
  eggensperger2021hpobench,
  title={{HPOB}ench: A Collection of Reproducible Multi-Fidelity Benchmark Problems for {HPO}},
  author={Katharina Eggensperger and Philipp M{\"u}ller and Neeratyoy Mallik and Matthias Feurer and Rene Sass and Aaron Klein and Noor Awad and Marius Lindauer and Frank Hutter},
  booktitle={Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 2)},
  year={2021},
  url={https://openreview.net/forum?id=1k4rJYEwda-}
}

More Repositories

1

auto-sklearn

Automated Machine Learning with scikit-learn
Python
7,574
star
2

Auto-PyTorch

Automatic architecture search and hyperparameter optimization for PyTorch
Python
2,358
star
3

TabPFN

Official implementation of the TabPFN paper (https://arxiv.org/abs/2207.01848) and the tabpfn package.
Python
1,187
star
4

SMAC3

SMAC3: A Versatile Bayesian Optimization Package for Hyperparameter Optimization
Python
1,067
star
5

HpBandSter

a distributed Hyperband implementation on Steroids
Python
609
star
6

NASLib

NASLib is a Neural Architecture Search (NAS) library for facilitating NAS research for the community by providing interfaces to several state-of-the-art NAS search spaces and optimizers.
Python
521
star
7

RoBO

RoBO: a Robust Bayesian Optimization framework
Python
480
star
8

autoweka

Auto-WEKA
Java
330
star
9

awesome-transformer-search

A curated list of awesome resources combining Transformers with Neural Architecture Search
254
star
10

ConfigSpace

Domain specific language for configuration spaces in Python. Useful for hyperparameter optimization and algorithm configuration.
Python
202
star
11

TransformersCanDoBayesianInference

Official Implementation of "Transformers Can Do Bayesian Inference", the PFN paper
Python
183
star
12

HPOlib

HPOlib is a hyperparameter optimization library. It provides a common interface to three state of the art hyperparameter optimization packages: SMAC, spearmint and hyperopt. This package is discontinued, please read the longer note in the info box below.
Python
167
star
13

RobustDARTS

Understanding and Robustifying DARTS
Python
153
star
14

trivialaugment

This is the official implementation of TrivialAugment and a mini-library for the application of multiple image augmentation strategies including RandAugment and TrivialAugment.
Python
147
star
15

pybnn

Bayesian neural network package
Jupyter Notebook
135
star
16

CARL

Benchmarking RL generalization in an interpretable way.
Python
129
star
17

CAAFE

Semi-automatic feature engineering process using Language Models and your dataset descriptions. Based on the paper "LLMs for Semi-Automated Data Science: Introducing CAAFE for Context-Aware Automated Feature Engineering" by Hollmann, MΓΌller, and Hutter (2023).
Python
124
star
18

nas_benchmarks

Python
91
star
19

ParameterImportance

Parameter Importance Analysis Tool
Python
75
star
20

nasbench301

Python
74
star
21

DEHB

Python
71
star
22

DeepCAVE

An interactive framework to visualize and analyze your AutoML process in real-time.
Python
70
star
23

HPOlib1.5

Python
69
star
24

nasbench-1shot1

Python
67
star
25

BOAH

BOAH: Bayesian Optimization & Analysis of Hyperparameters
Python
67
star
26

amltk

A build-it-yourself AutoML Framework
Python
62
star
27

labwatch

An extension to Sacred for automated hyperparameter optimization.
Python
59
star
28

learna

End-to-end RNA Design using deep reinforcement learning
Python
57
star
29

neps

Neural Pipeline Search (NePS): Helps deep learning experts find the best neural pipeline.
Python
54
star
30

CAVE

[deprecated] Configuration Assessment, Visualization and Evaluation
Python
46
star
31

PFNs

Our maintained PFN repository. Come here to train SOTA PFNs.
Python
44
star
32

zero-shot-automl-with-pretrained-models

Official repository for the paper "Zero-Shot AutoML with Pretrained Models"
Python
41
star
33

random_forest_run

C++
35
star
34

AutoFolio

Automated Algorithm Selection with Hyperparameter Optimization
Python
35
star
35

SEARL

Sample-Efficient Automated Deep Reinforcement Learning
Python
34
star
36

nes

Neural Ensemble Search for Uncertainty Estimation and Dataset Shift
Python
31
star
37

LCBench

A learning curve benchmark on OpenML data
Jupyter Notebook
29
star
38

DACBench

A benchmark library for Dynamic Algorithm Configuration.
PDDL
28
star
39

mdp-playground

A python package to design and debug RL agents.
Python
28
star
40

RNAformer

Scalable Deep Learning for RNA Secondary Structure Prediction
Python
27
star
41

auto-sklearn-talks

Presentations on Auto-sklearn
Jupyter Notebook
24
star
42

multi-obj-baselines

Python
22
star
43

PFNs4BO

The official implementation of PFNs4BO: In-Context Learning for Bayesian Optimization
Jupyter Notebook
22
star
44

CVPR24-MedSAM-on-Laptop

Data-aware Fine-Tuning (DAFT) Code related to the CPVR24 Competition for Image Segmentation on a Laptop.
Python
22
star
45

tabpfn-client

Python
21
star
46

learning_environments

Python
20
star
47

pynisher

Python
20
star
48

DE-NAS

Jupyter Notebook
19
star
49

DAC

Dynamic Algorithm Configuration
Jupyter Notebook
19
star
50

nas-bench-x11

Python
18
star
51

ProbTransformer

Probabilistic Transformer: Modelling Ambiguities and Distributions for RNA Folding and Molecule Design
Python
17
star
52

Mighty

The Mighty cRL library you've been looking for! πŸ’ͺ
Python
17
star
53

TempoRL

Python
15
star
54

HPO_for_RL

This is the code of reproducing the results of our paper: On the importance of Hyperparameter Optimization for Model-based Reinforcement Learning
Python
15
star
55

hierarchical_nas_construction

Official repository for "Construction of Hierarchical Neural Architecture Search Spaces based on Context-free Grammars" (NeurIPS 2023)
Python
14
star
56

transfer-hpo-framework

Code accompanying https://arxiv.org/abs/1802.02219
Python
14
star
57

jahs_bench_201

The first collection of surrogate benchmarks for Joint Architecture and Hyperparameter Search.
Python
14
star
58

Squirrel-Optimizer-BBO-NeurIPS20-automlorg

Python
13
star
59

SVGe

Smooth Variational Graph Embeddings for Efficient Neural Architecture Search
Python
13
star
60

is_mamba_capable_of_icl

Jupyter Notebook
12
star
61

ChaLearn_Automatic_Machine_Learning_Challenge_2015

Python
11
star
62

GenericWrapper4AC

C++
11
star
63

HW-GPT-Bench

HW-GPT-Bench: Hardware-Aware Architecture Benchmark for Language Models
Python
11
star
64

QTT

A framework for QuickTune
Jupyter Notebook
11
star
65

ifBO

In-context Bayesian Optimization
Python
11
star
66

arlbench

HPO and Architecture Benchmarking for RL: Dynamically, Reactive and Efficient
Python
10
star
67

lcpfn

Jupyter Notebook
10
star
68

ASKL2.0_experiments

Jupyter Notebook
9
star
69

mf-prior-bench

A collection of multi-fidelity benchmarks with first class support for user priors
Python
8
star
70

LTO-CMA

Code for the paper "Learning Step-Size Adaptation in CMA-ES"
Python
8
star
71

EfficientNAS

Python
8
star
72

HPOlibConfigSpace

Python
8
star
73

paramsklearn

Python
8
star
74

multibeep

A Multi Armed Bandit library written in C++ with Python bindings
C
8
star
75

MODNAS

Official Repo for "Multi-objective Differentiable Neural Architecture Search"
Python
8
star
76

TabularTempoRL

Code for the paper "Towards TempoRL: Learning When to Act"
Python
8
star
77

CARP-S

A Framework for Comparing N Hyperparameter Optimizers on M Benchmarks.
Jupyter Notebook
8
star
78

HPOBenchExperimentUtils

Experiment code to run large-scale experimente with HPOBench
Python
7
star
79

hypersweeper

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

HPOlib-hpconvnet

A wrapper for James Bergstras hyperopt convnet
Python
5
star
81

SPaCE

Jupyter Notebook
5
star
82

dac4automlcomp

DAC4AutoML Competition
HTML
5
star
83

IMFAS

Implicit Multi-Fidelity Algorithm Selection
Python
5
star
84

automl_common

This repository holds shared utilities that AutoML frameworks may benefit from.
Python
5
star
85

ParameterConfigSpace

parameter configuration space parser for SMAC format
Python
5
star
86

masif

MASIF: Meta-learned Algorithm Selection using Implicit Fidelity Information
Python
5
star
87

DAC4SGD

Python
5
star
88

automl_template

A template that provides all the tools to ensure the same project setup across all AutoML packages.
Python
5
star
89

AutoRL-Landscape

Python
4
star
90

SAWEI

Jupyter Notebook
4
star
91

hydra-smac-sweeper

Sweeper plugin based on SMAC for Hydra.
Python
4
star
92

DAC4RL

DAC4RL track of DAC4AutoML competition at AutoML Conf
Python
4
star
93

pi_is_back

Repo for "PI is back! Switching Acquisition Functions in Bayesian Optimization" (NeurIPS: Gaussian Process Workshop '22)
Python
4
star
94

BO-AFS

For BO: Select Acquisition Function (Schedule) with Meta-Learned Model Per-Run
Jupyter Notebook
4
star
95

HPOlib-AutoWEKA

Python
3
star
96

AutoDLComp19

AutoDL Competition Scripts 2019
Python
3
star
97

mf-prior-exp

Python
3
star
98

ICGen

Image Classification Dataset Generator
Python
3
star
99

AutomlCup2023

Code for the AutoMLCup 2023
Python
3
star
100

FOB

Python
3
star