Optuna is an open-source Python library designed for automatic hyperparameter optimization of machine learning models. It was introduced in 2018 by Preferred Networks and supports dynamic construction of search spaces during code execution through its define-by-run API. The framework efficiently searches large hyperparameter spaces, discards unpromising trials early, and supports parallelization across multiple threads or processes.