# optuna

> A hyperparameter optimization framework

- **URL**: https://www.freshcrate.ai/projects/optuna
- **Author**: Takuya Akiba
- **Category**: Frameworks
- **Latest version**: `v4.9.0` (2026-06-01)
- **License**: Unknown
- **Source**: https://github.com/optuna/optuna/issues
- **Homepage**: https://pypi.org/project/optuna/
- **Language**: Python
- **GitHub**: 14,019 stars, 1,314 forks
- **Registry**: pypi (`optuna`)
- **Tags**: `pypi`

## Description

<div align="center"><img src="https://raw.githubusercontent.com/optuna/optuna/master/docs/image/optuna-logo.png" width="800"/></div>

# Optuna: A hyperparameter optimization framework

[![Python](https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)](https://www.python.org)
[![pypi](https://img.shields.io/pypi/v/optuna.svg)](https://pypi.python.org/pypi/optuna)
[![conda](https://img.shields.io/conda/vn/conda-forge/optuna.svg)](https://anaconda.org/conda-forge/optuna)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/optuna/optuna)
[![Read the Docs](https://readthedocs.org/projects/optuna/badge/?version=stable)](https://optuna.readthedocs.io/en/stable/)

:link: [**Website**](https://optuna.org/)
| :page_with_curl: [**Docs**](https://optuna.readthedocs.io/en/stable/)
| :gear: [**Install Guide**](https://optuna.readthedocs.io/en/stable/installation.html)
| :pencil: [**Tutorial**](https://optuna.readthedocs.io/en/stable/tutorial/index.html)
| :bulb: [**Examples**](https://github.com/optuna/optuna-examples)
| [**Twitter**](https://twitter.com/OptunaAutoML)
| [**LinkedIn**](https://www.linkedin.com/showcase/optuna/)
| [**Medium**](https://medium.com/optuna)

*Optuna* is an automatic hyperparameter optimization software framework, particularly designed
for machine learning. It features an imperative, *define-by-run* style user API. Thanks to our
*define-by-run* API, the code written with Optuna enjoys high modularity, and the user of
Optuna can dynamically construct the search spaces for the hyperparameters.

## :loudspeaker: News
Help us create the next version of Optuna!

Optuna 5.0 Roadmap published for review. Please take a look at [the planned improvements to Optuna](https://medium.com/optuna/optuna-v5-roadmap-ac7d6935a878), and share your feedback in [the github issues](https://github.com/optuna/optuna/labels/v5). PR contributions also welcome!

Please take a few minutes to fill in [this survey](https://forms.gle/wVwLCQ9g6st6AXuq9), and let us know how you use Optuna now and what improvements you'd like.🤔
All questions are optional. 🙇‍♂️

<!-- TODO: when you add a new line, please delete the oldest line -->
* **Jan 19, 2026**: Optuna 4.7.0 is out! Check out [the release note](https://github.com/optuna/optuna/releases/tag/v4.7.0) for details.
* **Nov 10, 2025**: A new article [Announcing Optuna 4.6](https://medium.com/optuna/announcing-optuna-4-6-a9e82183ab07) has been published.
* **Oct 28, 2025**: A new article [AutoSampler: Full Support for Multi-Objective & Constrained Optimization](https://medium.com/optuna/autosampler-full-support-for-multi-objective-constrained-optimization-c1c4fc957ba2) has been published.
* **Sep 22, 2025**: A new article [[Optuna v4.5] Gaussian Process-Based Sampler (GPSampler) Can Now Perform Constrained Multi-Objective Optimization](https://medium.com/optuna/optuna-v4-5-81e78d8e077a) has been published.
* **Jun 16, 2025**: Optuna 4.4.0 has been released! Check out [the release blog](https://medium.com/optuna/announcing-optuna-4-4-ece661493126).
* **May 26, 2025**: Optuna 5.0 roadmap has been published! See [the blog](https://medium.com/optuna/optuna-v5-roadmap-ac7d6935a878) for more details.

## :fire: Key Features

Optuna has modern functionalities as follows:

- [Lightweight, versatile, and platform agnostic architecture](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/001_first.html)
  - Handle a wide variety of tasks with a simple installation that has few requirements.
- [Pythonic search spaces](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/002_configurations.html)
  - Define search spaces using familiar Python syntax including conditionals and loops.
- [Efficient optimization algorithms](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/003_efficient_optimization_algorithms.html)
  - Adopt state-of-the-art algorithms for sampling hyperparameters and efficiently pruning unpromising trials.
- [Easy parallelization](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/004_distributed.html)
  - Scale studies to tens or hundreds of workers with little or no changes to the code.
- [Quick visualization](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/005_visualization.html)
  - Inspect optimization histories from a variety of plotting functions.


## Basic Concepts

We use the terms *study* and *trial* as follows:

- Study: optimization based on an objective function
- Trial: a single execution of the objective function

Please refer to the sample code below. The goal of a *study* is to find out the optimal set of
hyperparameter values (e.g., `regressor` and `svr_c`) through multiple *trials* (e.g.,
`n_trials=100`). Optuna is a framework designed for automation and acceleration of
optimization *studies*.

<details open>
<summary>Sample code with scikit-learn</summary>

[![Open in Colab](https://colab.resea

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v4.9.0` | 2026-06-01 | High | This is the release note of [v4.9.0](https://github.com/optuna/optuna/milestone/74?closed=1).  # Highlights  ### Enhance Multi-Objective Constrained Parallel Optimization in GPSampler  @sawa3030 introduces parallelization enhancements to `GPSampler`, leveraging the **Kriging Believer** approach for constrained and multi-objective optimization (#6481). This improvement allows for more efficient exploration when multiple trials are running concurrently.  <img width="1400" height="616" alt= |
| `4.8.0` | 2026-04-21 | Low | Imported from PyPI (4.8.0) |
| `v4.8.0` | 2026-03-16 | Low | This is the release note of [v4.8.0](https://github.com/optuna/optuna/milestone/73?closed=1).  # Highlights  ## Support for Constant Liar Strategy to GPSampler  A constant liar strategy for efficient parallelization has been introduced to GPSampler by @sawa3030. The figures (left: v4.7.0, right: v4.8.0) show that the overlap of search points has decreased, and a wider variety of solutions are being explored. The experiment uses `n_jobs = 10` and `n_trials = 100`. Currently, this feature su |
| `v4.8.0` | 2026-03-16 | Low | This is the release note of [v4.8.0](https://github.com/optuna/optuna/milestone/73?closed=1).  # Highlights  ## Support for Constant Liar Strategy to GPSampler  A constant liar strategy for efficient parallelization has been introduced to GPSampler by @sawa3030. The figures (left: v4.7.0, right: v4.8.0) show that the overlap of search points has decreased, and a wider variety of solutions are being explored. The experiment uses `n_jobs = 10` and `n_trials = 100`. Currently, this feature su |
| `v4.8.0` | 2026-03-16 | Low | This is the release note of [v4.8.0](https://github.com/optuna/optuna/milestone/73?closed=1).  # Highlights  ## Support for Constant Liar Strategy to GPSampler  A constant liar strategy for efficient parallelization has been introduced to GPSampler by @sawa3030. The figures (left: v4.7.0, right: v4.8.0) show that the overlap of search points has decreased, and a wider variety of solutions are being explored. The experiment uses `n_jobs = 10` and `n_trials = 100`. Currently, this feature su |
| `v4.8.0` | 2026-03-16 | Low | This is the release note of [v4.8.0](https://github.com/optuna/optuna/milestone/73?closed=1).  # Highlights  ## Support for Constant Liar Strategy to GPSampler  A constant liar strategy for efficient parallelization has been introduced to GPSampler by @sawa3030. The figures (left: v4.7.0, right: v4.8.0) show that the overlap of search points has decreased, and a wider variety of solutions are being explored. The experiment uses `n_jobs = 10` and `n_trials = 100`. Currently, this feature su |
| `v4.8.0` | 2026-03-16 | Low | This is the release note of [v4.8.0](https://github.com/optuna/optuna/milestone/73?closed=1).  # Highlights  ## Support for Constant Liar Strategy to GPSampler  A constant liar strategy for efficient parallelization has been introduced to GPSampler by @sawa3030. The figures (left: v4.7.0, right: v4.8.0) show that the overlap of search points has decreased, and a wider variety of solutions are being explored. The experiment uses `n_jobs = 10` and `n_trials = 100`. Currently, this feature su |
| `v4.8.0` | 2026-03-16 | Low | This is the release note of [v4.8.0](https://github.com/optuna/optuna/milestone/73?closed=1).  # Highlights  ## Support for Constant Liar Strategy to GPSampler  A constant liar strategy for efficient parallelization has been introduced to GPSampler by @sawa3030. The figures (left: v4.7.0, right: v4.8.0) show that the overlap of search points has decreased, and a wider variety of solutions are being explored. The experiment uses `n_jobs = 10` and `n_trials = 100`. Currently, this feature su |
| `v4.8.0` | 2026-03-16 | Low | This is the release note of [v4.8.0](https://github.com/optuna/optuna/milestone/73?closed=1).  # Highlights  ## Support for Constant Liar Strategy to GPSampler  A constant liar strategy for efficient parallelization has been introduced to GPSampler by @sawa3030. The figures (left: v4.7.0, right: v4.8.0) show that the overlap of search points has decreased, and a wider variety of solutions are being explored. The experiment uses `n_jobs = 10` and `n_trials = 100`. Currently, this feature su |
| `v4.8.0` | 2026-03-16 | Low | This is the release note of [v4.8.0](https://github.com/optuna/optuna/milestone/73?closed=1).  # Highlights  ## Support for Constant Liar Strategy to GPSampler  A constant liar strategy for efficient parallelization has been introduced to GPSampler by @sawa3030. The figures (left: v4.7.0, right: v4.8.0) show that the overlap of search points has decreased, and a wider variety of solutions are being explored. The experiment uses `n_jobs = 10` and `n_trials = 100`. Currently, this feature su |

## Citation

- HTML: https://www.freshcrate.ai/projects/optuna
- Markdown: https://www.freshcrate.ai/projects/optuna.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/optuna/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
