Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 925 Bytes

README.md

File metadata and controls

34 lines (22 loc) · 925 Bytes

Hydra Optuna Sweeper plugin

Provides a plugin for Hydra applications to utilize Optuna for the optimization of the parameters of experiments.

Installation

You can install Optuna plugin by using pip:

pip install -e .

Usage

Please set hydra/sweeper to optuna in your config file.

defaults:
  - hydra/sweeper: optuna

Alternatively, add hydra/sweeper=optuna option to your command line.

You can see an example in this directory. example/quadratic.py implements a simple quadratic function to be minimized.

python example/quadratic.py -m 'x=interval(-5.0, 5.0)' 'y=interval(1, 10)'

By default, interval is converted to UniformDistribution. You can use IntUniformDistribution or LogUniformDistribution by specifying the tags:

python example/quadratic.py -m 'x=tag(int, interval(-5.0, 5.0))' 'y=tag(log, interval(1, 10))'