Welcome to OptunaHub’s documentation!
OptunaHub is a platform for black-box optimization. It hosts a registry of third-party packages designed for Optuna, allowing users to share and discover Optuna packages that are not included in the official Optuna distribution. The optunahub library provides Python APIs to load and use packages from the OptunaHub registry. Please check out Tutorials for Users as well.
If you are interested in registering your own features in OptunaHub, please visit the optunahub-registry repository and submit a pull request there. More details are available in Tutorials for Contributors.
Getting Started
Learn Optuna Fundamentals
Are you already familiar with Optuna? If so, you can skip this section. If not, let’s learn about the concept and basic usage of Optuna first, since OptunaHub is built on top of Optuna.
To get started with OptunaHub, you should at least know the concepts of Study, Trial, how to specify a sampler, how to define search space in a dynamic manner, and how to run optimization with Optuna.
The following resources are available to learn Optuna. Note that these are external links to the official Optuna documentation.
The Optuna official tutorial provides more detailed lectures for learning Optuna, so please check it out if you want to learn more about Optuna.
Basic Usage of OptunaHub
Let’s learn how to use the OptunaHub library.
First, please install the optunahub package.
From PyPI:
pip install optunahub
From conda-forge:
conda install -c conda-forge optunahub
Then, load the package you want from the OptunaHub registry. In the next example code, you will load the AutoSampler from the samplers/auto_sampler package.
The details for AutoSampler can be found in this article.
import optuna
import optunahub
def objective(trial: optuna.Trial) -> float:
x = trial.suggest_float("x", -5, 5)
y = trial.suggest_float("y", -5, 5)
return x**2 + y**2
mod = optunahub.load_module("samplers/auto_sampler")
study = optuna.create_study(sampler=mod.AutoSampler())
study.optimize(objective, n_trials=10)
print(study.best_trial.value, study.best_trial.params)
Now that you’ve successfully loaded a package from the OptunaHub registry, you can start using optunahub in your optimization!
Get ready to explore the most suitable packages for your problems in the OptunaHub registry.
Learn More about OptunaHub
Learn more about OptunaHub through the following contents.
Contents:
- Reference
- Tutorials for Users
- Tutorials for Contributors
- How to Implement Your Sampler with OptunaHub
- How to Register Your Package with OptunaHub
- How to Implement Your Pruners with OptunaHub
- How to Implement Your Own Visualization Function
- How to Debug Your Algorithm Before Registering in OptunaHub
- How to Implement Your Benchmark Problems with OptunaHub (Basic)
- How to Implement Your Benchmark Problems with OptunaHub (Advanced)
- How to Implement Unit Tests using Optuna’s Testing Module
- FAQ
Reference
Please cite the OptunaHub paper with the following format when you use it in your project:
@article{ozaki2025optunahub,
title={{OptunaHub}: A Platform for Black-Box Optimization},
author={Ozaki, Yoshihiko and Watanabe, Shuhei and Yanase, Toshihiko},
journal={arXiv preprint arXiv:2510.02798},
year={2025}
}