An open source hyperparameter optimization framework to automate hyperparameter search
open sourceMITfree
Optuna is a Python framework that searches for the best hyperparameters of a machine learning model automatically. You write an objective function and define the search space as you go with ordinary Python conditionals and loops, and Optuna runs trials with state-of-the-art samplers (TPE, CMA-ES, NSGA-II for several objectives among them), prunes unpromising trials early, and parallelizes over threads or processes without code changes. It works with any ML framework (PyTorch, TensorFlow, Keras, scikit-learn, LightGBM), stores studies in a database, and Optuna Dashboard shows them live in a browser, Jupyter Lab or VS Code. OptunaHub shares community samplers, and Rustuna is a faster Rust implementation of its samplers. Preferred Networks develops it with community contributors.
Problems it solves
- tune my model's hyperparameters automatically instead of grid searching by hand
- stop bad training runs early during a hyperparameter search
- run a hyperparameter search in parallel across several machines
- optimize a model for accuracy and speed at the same time
Features
- define-by-run search spaces with Python conditionals and loops
- TPE, CMA-ES and NSGA-II samplers
- pruning of unpromising trials
- parallel and distributed optimization
- multi-objective optimization
- studies stored in a database such as SQLite
- Optuna Dashboard web UI, Jupyter Lab and VS Code extensions
- works with PyTorch, TensorFlow, Keras, scikit-learn and LightGBM
- OptunaHub community samplers
Alternatives
The same job
These do what Optuna does.
- Weights & Biases The AI developer platform
