Simple HPO Benchmark Datasets
This repository provides a set of simple single-objective HPO benchmark datasets:
- HPOBench (Apache-2.0 License)
- HPOLib (BSD-3-Clause License)
- NAS-Bench-201 (MIT License)
Installation & Requirements
The requirements of this repository are:
- Python 3.8 or later
- NumPy
You can simply install the package via:
$ pip install simple-hpo-bench
Examples
Examples are available at examples/.
For example, HPOBench can be optimized by Optuna as follows:
from __future__ import annotations
from hpo_benchmarks import HPOBench
import optuna
# Instatiate the benchmark function.
bench = HPOBench(dataset_name="australian")
def objective(trial: optuna.Trial) -> list[float]:
params = {}
for param_name, choices in bench.search_space.items():
params[param_name] = choices[trial.suggest_int(f"{param_name}_index", low=0, high=len(choices) - 1)]
results = bench(params)
return [results[name] for name in bench.metric_names]
study = optuna.create_study(direction=[bench.directions[name] for name in bench.metric_names])
study.optimize(objective, n_trials=30)
For benchmark functions, the argument for these classes is only dim, which determines the dimension of the function.
For tabular benchmarks (HPOLib, HPOBench, and NASBench201), the arguments are:
dataset_name: one of the dataset names of the benchmark dataset of interest, andseed: the random seed for the benchmark dataset.
The available dataset names for each benchmark dataset are as follows:
| Benchmark Dataset | Available Dataset Names |
|---|---|
HPOLib |
naval_propulsion, parkinsons_telemonitoring, protein_structure, slice_localization |
HPOBench |
australian, blood_transfusion, car, credit_g, kc1, phoneme, segment, vehicle |
NASBench201 |
cifar10, cifar100, imagenet |
Search Space
In this section, bench is an instantiated benchmark.
The search space of the benchmark functions are [bench.param_range[0], bench.param_range[1]]^bench.dim.
The search space of HPOLib, HPOBench, and NASBench201 is defined in bench.search_space.
bench.search_space is a dict that takes param_name as a key and the corresponding possible choices as a value.
bench.param_types defines the types of each parameter.
int is for an integer parameter, str is for a categorical parameter, and float is for a non-integer numerical parameter.
Metadata
Release files for simple-hpo-bench 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simple_hpo_bench-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for simple_hpo_bench-0.2.0-py3-none-any.whl |
Release files / simple_hpo_bench-0.2.0-py3-none-any.whl
| Download URL | simple_hpo_bench-0.2.0-py3-none-any.whl |
|---|---|
| Size | 36.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f76495fa70fa96c234c4bc3ad18c8e8283bec4c2f66f08ef59071b1d286d720
|
|
BLAKE2b-256 checksum How to use checksums |
ece3799b57c24ae86dc4c79468fde3e23e3d4133f2b070e1eadf780421c26fbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.11
|
Security for simple-hpo-bench 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.