Releases: optuna/optuna
v4.8.0
This is the release note of v4.8.0.
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 supports single-objective and unconstrained optimization. Further extensions are coming in v4.9.0.
| v4.7.0 | v4.8.0 |
|---|---|
![]() |
![]() |
SHAP-like beeswarm plot visualization
@yasumorishima introduces the new visualization to OptunaHub. Please refer to https://hub.optuna.org/visualization/plot_beeswarm/ for details.
New Features
- Add Trackio Integration for Optuna (optuna/optuna-integration#259, thanks @ParagEkbote!)
- Add constant liar strategy to
GPSampler(#6430)
Enhancements
- Validate artifact_id in FileSystemArtifactStore to prevent path traversal (#6432, thanks @RinZ27!)
- fix: correct inverted warning message in pareto front plot (#6498, thanks @aerosta!)
Bug Fixes
- Fix shared callback state in parallel OptunaSearchCV with LightGBM (optuna/optuna-integration#260, thanks @Quant-Quasar!)
- Fix GPSampler crash when torch default device is CUDA (#6418, thanks @VedantMadane!)
- Fix combination between
PartialFixedSamplerandTPESamplerwith group decomposed search space (#6428) - Fix
TPESamplerwithmultivariateandconstant_liar(#6505)
Documentation
- Add documentation indicating that
WilcoxonPrunerrequiresscipy(#6477) - Remove version & language selectors in the sidebar of docs (#6482)
Examples
- Apply black 26.1.0 (optuna/optuna-examples#348)
- Remove CI workflow for allennlp since no longer maintained (optuna/optuna-examples#351)
- Reduce the frequency of scheduled CI triggers (optuna/optuna-examples#352)
- Remove the scheduled trigger for
aimCI (optuna/optuna-examples#353) - Add constraint to
transformers(optuna/optuna-examples#355)
Tests
- Add
SamplerTestCaseclass inoptuna.testing package(#6424) - Move
test_before_trialandtest_after_trial_*totest_trial.pyandtest_study.py, respectively (#6429)
Code Fixes
- Move type-only imports to TYPE_CHECKING in
_param_importances.py(#6423, thanks @dotz0ver!) - Use future.annotations in matplotlib/_intermediate_values (#6425, thanks @Lakshman142!)
- Reformat files with the latest version of ruff (#6426)
- Replace
.format()with f-strings in_parallel_coordinate.py(#6431, thanks @yasumorishima!) - Use
TYPE_CHECKINGfor import inpruners/_base.py(#6434, thanks @yasumorishima!) - Use f-strings in
optuna/storages/_base.py(#6435, thanks @edwiniac!) - Use f-strings in
_contour.py(#6436, thanks @edwiniac!) - Use f-strings in
_intermediate_values.py(#6437, thanks @edwiniac!) - Use f-strings in
cli.py(#6438, thanks @edwiniac!) - Use f-strings in
optuna/testing/storages.py(#6439, thanks @edwiniac!) - Use f-strings in
optuna/storages/journal/_storage.py(#6440, thanks @edwiniac!) - Use f-strings in
_imports.py(#6442, thanks @edwiniac!) - Use f-strings in
_deprecated.py(#6443, thanks @edwiniac!) - Use
TYPE_CHECKINGfor import inpruners/_hyperband.py(#6447, thanks @yasumorishima!) - Use
TYPE_CHECKINGfor typing-only imports intest_timeline.py(#6451, thanks @KRMed!) - Refactor: Use f string in multi_objective tutorial (#6455, thanks @ryota717!)
- refactor: move type-only imports into TYPE_CHECKING in samplers/_grid.py (#6466, thanks @dhruvildarji!)
- refactor: move BaseDistribution into TYPE_CHECKING in search_space/intersection.py (#6467, thanks @dhruvildarji!)
- Simplify Union type alias in optuna/samplers/_cmaes.py (#6478, thanks @roli-lpci!)
- Use f-string in
_convert_positional_args.py(#6483, thanks @toroleapinc!) - Add acqf import inside a
TYPE_CHECKINGblock (#6484, thanks @acabellom!) - Refactor
__repr__intrial/_frozen.pyto use f-strings (#6485, thanks @Bhavyag1337!) - Use
TYPE_CHECKINGinpruners/_threshold.py(#6487, thanks @LuciferDono!) - Use f-string in
tutorial/10_key_features/005_visualization.py(#6489, thanks @maheer14!) - Move
JSONSerializableimport toTYPE_CHECKINGinstudy/study.py(#6490, thanks @yasumorishima!) - Use f-string and {var_name=} instead of .format and var_name={var_name} (#6494, thanks @buddy0452004!)
- Move
optunaimport toTYPE_CHECKINGinpruners/_patient.py(#6501, thanks @yasumorishima!) - Move application import to
TYPE_CHECKINGinpruners/_patient.py(#6502, thanks @nightcityblade!) - Move application import to
TYPE_CHECKINGinpruners/_successive_halving.py(#6503, thanks @nightcityblade!) - Replace
.format()with f-strings in002_configurations.py(#6506, thanks @acabellom!) - Fix type checking (#6507, thanks @sateeshkumarb!)
Continuous Integration
- Fix test for
FastAIV2PruningCallback(optuna/optuna-integration#265) - Fix windows-test failure due to
NamedTemporaryFilePool(#6417) - Fix checks-optional CI (#6422)
- Fix mypy errors in GP module (#6492)
Other
- Bump up version number to
4.8.0.dev(optuna/optuna-integration#263) - Bump the version up to v4.8.0 (optuna/optuna-integration#269)
- Bump up version to 4.8.0.dev (#6414)
- Update news section for the v4.7 release (#6420)
Thanks to All the Contributors!
This release was made possible by the authors and the people who participated in the reviews and discussions.
@Bhavyag1337, @KRMed, @Lakshman142, @LuciferDono, @ParagEkbote, @Quant-Quasar, @RinZ27, @VedantMadane, @acabellom, @aerosta, @buddy0452004, @c-bata, @dhruvildarji, @dotz0ver, @edwiniac, @gen740, @kAIto47802, @maheer14, @nabenabe0928, @nightcityblade, @not522, @roli-lpci, @ryota717, @sateeshkumarb, @sawa3030, @toroleapinc, @y0z, @yasumorishima
v4.7.0
This is the release note of v4.7.0.
Highlights
Two New Multi-Objective Samplers Added to OptunaHub!
@hrntsm introduces two new multi-objective samplers—SPEA-II (Strength Pareto Evolutionary Algorithm 2) and HypE (Hypervolume Estimation Algorithm)—to OptunaHub. SPEA-II is an improved multi-objective evolutionary algorithm that differs from NSGA-II in its selection mechanism. HypE is a fast, hypervolume-based evolutionary algorithm designed for many-objective optimization problems. Please refer to the following pages for more details:
PedAnovaImportanceEvaluator Now Supports Local Hyperparameter Importance Computation
The target_quantile and region_quantile arguments have been introduced to PedAnovaImportanceEvaluator. This change allows you to investigate local hyperparameter importance rather than the global one with region_quantile < 1.0. See the original paper for the technical details.
Enhancements
- Introduce stacklevel-aware custom warnings (#6293)
- Cache distributions to skip consistency check (#6301)
- Add warnings when
JournalStoragelock acquisition is delayed (#6361) - Add support for local HPI in PED-ANOVA (#6362)
Bug Fixes
- Fix log PDF of discrete trunc log-norm distribution for
TPESampler(#6258) - Fix coefficient in PED-ANOVA (#6358)
- Fix GPSampler crash when default torch device is CUDA (#6397, thanks @Quant-Quasar!)
Documentation
- Add
SECURITY.md(#6317) - Add a note for future dev of exclusive HV (#6318)
- Update GPSampler documentation to include D-BE optimization details (#6347, thanks @Kaichi-Irie!)
- Revert PR #6354 to enable
-Woption on Sphinx build (#6373)
Examples
- Disable scheduled runs for PyTorch and visualization temporarily (optuna/optuna-examples#337)
- Fix skorch example: Replace unavailable OpenML MNIST (optuna/optuna-examples#338, thanks @sotagg!)
- Pin
minioversion to<=7.2.18to fix CI & stop daily CI running (optuna/optuna-examples#339) - fix spark example (optuna/optuna-examples#342, thanks @fritshermans!)
- Pin scikit-learn to < 1.6.0 for lightgbm (optuna/optuna-examples#343)
- Remove python 3.9 due to EOL Status (optuna/optuna-examples#344, thanks @ParagEkbote!)
- Add IPython as a dependency of fastai example (optuna/optuna-examples#347)
Tests
Code Fixes
- Replace
.format()with f-string in_setup_studies(#6326, thanks @haitham404!) - Update
_upload.pyforTYPE_CHECKING(#6327, thanks @satyarth7srivastava!) - Replace .format() with f-string in progress_bar.py (#6328, thanks @Nayil97!)
- Use f-strings in
optuna/samplers/_cmaes.py(#6331, thanks @swativdusane!) - Replace
.format()with f-string in_parallel_coordinate.py(#6333, thanks @satyarth7srivastava!) - Refactor/fstring storage rdb (#6336, thanks @gadmin7!)
- Migrate to ruff from black/blackdoc/isort/flake8 (#6341)
- Replace
.formatwith f-strings inoptuna/importance/_base(#6342, thanks @VihaanMotwani!) - updated
_terminator_improvement.pyforTYPE_CHECKING(#6343, thanks @satyarth7srivastava!) - Replace
.formatwith f-string in_param_importances.py(#6345, thanks @Harshadev-24!) - Replace .format() with f-strings in several modules (#6348, thanks @varundevr!)
- Replace more .format() calls with f-strings (#6349, thanks @varundevr!)
- Replace
.formatwith f-string intutorial/20_recipes/004_cli.py(#6350, thanks @RektPunk!) - Replace
.formatwith f-string inoptuna/study/_optimize.py(#6351, thanks @RektPunk!) - Format
optuna/files with Ruff (#6352) - Refactor: Use f-string in 001_rdb.py (#6356, thanks @sotagg!)
- Format
tests/andtutorials/files with Ruff (#6360) - Remove redundant
_color_supported()check (#6363) - Add
StorageTestCaseclass inoptuna.testingpackage (#6369) - Change string formatting in
optuna/pruners/_hyperband.py(#6370, thanks @eleannapapaio!) - Refactor
test_study.pyto use f-string instead of.format()(#6372, thanks @nepersoned!) - Fix mypy error for np.select (#6374)
- Change string formatting for
_successive_halving.py(#6375, thanks @spenam!) - Fix type annotations for
optuna/trial/_frozen.py(#6377, thanks @spenam!) - fix type annotations for
optuna/study/study.py(#6378, thanks @spenam!) - Fix type annotations for
tests/study_tests/test_study.py(#6379, thanks @spenam!) - Move type-only imports to
TYPE_CHECKINGintest_visualizations.py(#6380, thanks @Sip4818!) - Move type-only imports to
TYPE_CHECKINGin_constrained_optimization.py(#6381, thanks @Sip4818!) - Replace format with f-string (#6383, thanks @varundevr!)
- Move type-only imports to
TYPE_CHECKINGin_multi_objective.py(#6385, thanks @Sip4818!) - Move
FrozenTrialimport underTYPE_CHECKINGfor_study_summary.pyfile (#6386, thanks @Sip4818!) - Move type-check imports to
TYPE_CHECKINGinoptuna/terminator/callback.py(#6388, thanks @Sip4818!) - Using f-string instead of
.format()(#6389, thanks @Lakshman142!) - Use f-strings in
optuna/_experimental.py(#6390, thanks @Rohan0497!) - Fix invalid
StorageTestCasescenarios involving trial state and values (#6391) - Move
type-hintimport insideType-Checkingblock inoptuna\terminator\erroreval.py(#6395, thanks @Sip4818!) - Move
type-checkimports toTYPE_CHECKINGinoptuna\terminator\improvement\emmr.py(#6396, thanks @Sip4818!) - Move typing-only imports under
TYPE_CHECKINGinmatplotlib/_slice.py(#6399, thanks @kapishyadav!) - Use
logger.warninginstead ofoptuna_warnfor lock-acquisition delay notifications (#6400) - Update string formatting in
optuna/samplers/_grid.py(#6401, thanks @kapishyadav!) - Updating
storages/_in_memory.pyto use f-strings (#6404, thanks @jrings!) - Move
type-hintimports intotype-checkingblock inoptuna\terminator\improvement\evaluator.py(#6405, thanks @Sip4818!) - Move
type-hintimports intotype-checkingblock inmedian_erroreval.py(#6408, thanks @Sip4818!) - Replace
.format()with f-string in_rank.py(#6409, thanks @jwalith!) - Replace .format() with f-string in test_hyperband.py (#6411, thanks @Banjiola!)
- Replace .format() with f-string in _fixed.py (#6412, thanks @VedantMadane!)
Continuous Integration
- Fix for CI (optuna/optuna-integration#258)
- Add ipython as a dependency of fastai (optuna/optuna-integration#261)
- Remove FastAIV2PruningCallback from docs to resolve warning (optuna/optuna-integration#264)
- Dispose SQLAlchemy's engine in
storage_tests/test_with_server.py(#6330) - Dispose SQLAlchemy's engine in
storage_tests/test_cached_storage.py(#6337) - Dispose SQLAlchemy's engine in
storage_tests/rdb_tests/test_storage.py(#6338) - Support Python 3.14 (#6339)
- Temporarily disable
-Woption on Sphinx build (#6354)
Other
- Bump up version (optuna/optuna-integration#256)
- Bump up version number to 4.7.0 (optuna/optuna-integration#262)
- Bump up to the version number
v4.7.0.dev(#6325) - Update the news section on README (#6335)
- Remove Codecov usage (#6340)
- Remove
formats.shand tidy upCONTRIBUTING.md(#6353) - Remove
asvand the speed benchmark workflow (#6393) - Bump up version to v4.7.0 (#6413)
Thanks to All the Contributors!
This release was made possible by the authors and the people who participated in the reviews and discussions.
@Alnusjaponica, @Banjiola, @Harshadev-24, @HideakiImamura, @Kaichi-Irie, @Lakshman142, @Nayil97, @ParagEkbote, @Quant-Quasar, @RektPunk, @Rohan0497, @Sip4818, @VedantMadane, @VihaanMotwani, @c-bata, @eleannapapaio, @fritshermans, @fusawa-yugo, @gadmin7, @gen740, @haitham404, @jiayusu, @jrings, @jwalith, @kAIto47802, @kapishyadav, @nabenabe0928, @nepersoned, @not522, @nzw0301, @satyarth7srivastava, @sawa3030, @sotagg, @spenam, @swativdusane, @toshihikoyanase, @varundevr, @y0z
v4.6.0
This is the release note of v4.6.0.
Highlights
Optuna Dashboard LLM Integration
Optuna Dashboard is a web-based tool that helps you easily explore and visualize your Optuna optimization history. The latest release, v0.20.0, introduces LLM integration, enabling the natural language-based Trial filtering and automatic Plotly chart generation. Please refer to the release blog for more details.
Further Speed Enhancements for GPSampler
GPSampler becomes significantly faster owing to parallelized multi-start acquisition function optimization via PyTorch batching, and to optimized NumPy operations.
Full Support for Multi-objective and Constrained Optimization in AutoSampler
We have fully implemented sampler selection rules for multi-objective and constrained optimization in AutoSampler. For more details, please see our blog post, "AutoSampler: Full Support for Multi-Objective & Constrained Optimization."
Additions of Robust Bayesian Optimization Packages
Robust Bayesian optimization methods have been added to OptunaHub. Robust Bayesian optimization enables suggesting more robust parameters against input perturbations. This is especially helpful for Sim2Real transfer scenarios.
Breaking Changes
- Drop Python 3.8 & Support Python 3.13 (optuna/optuna-integration#253)
- Change
TrialState.__repr__andTrialState.__str__(#6281, thanks @ktns!) - Drop Python 3.8 (#6302)
Enhancements
- Use iterator for lazy evaluation in journal storage’s
read_logs(#6144) - Cache pair-wise distances to speed up
GPSampler(#6244) - Speed up LogEI implementation (#6248)
- Speed up EHVI by optimizing tensor operation order (#6257)
- Use the decremental approach in the hypervolume contribution calculation (#6264)
- Use cached trials in
TPESampler'ssample_relative(#6265) - Remove
find_or_raise_by_idin_set_trial_value_without_commit(#6266) - Speed up
GPSamplerby Batching Acquisition Function Evaluations (#6268, thanks @Kaichi-Irie!) - Use cached study direction and trial for
_CachedStorage'sget_best_trial(#6270) - Add upsert in
_set_trial_attr_without_commitfor PostgreSQL (#6282, thanks @jaikumarm!) - Add
statesargument to_read_trials_from_remote_storage(#6288) - Use cached trials for intersection search space calculation (#6291)
- Replace
np.linalg.invwithnp.linalg.choleskyto speed upGPSamplerfornumpy>=2.0.0(#6296)
Bug Fixes
- Skip trial validation on copy_study (#6249)
- Fix incremental update algorithm in
_CachedStorage's_read_trials_from_remote_storage(#6310) - Add safety guard for exhaustive search (#6321)
Documentation
- Add
AutoSamplerto the sampler comparison table in the API reference (#6260, thanks @Kaichi-Irie!) - Update the
GPSamplerdocument to reflect support for constrained multi-objective optimization (#6262) - Add a link to the metric TPE paper in the
TPESamplerdocument (#6263) - Update announcement (#6285)
- Update the table of Samplers in docs (#6287, thanks @fusawa-yugo!)
- Fix the table of samplers in the docs (#6290)
Examples
- Add example of OpenTelemetry in Optuna Dashboard (optuna/optuna-examples#330)
- [hotfix] Fix transformers example by adding the version constraint on transformers (optuna/optuna-examples#332)
- Drop Python 3.8 (optuna/optuna-examples#334)
- Remove Version Constraint for Transformers (optuna/optuna-examples#335, thanks @ParagEkbote!)
Tests
- Add unit tests for batched L-BFGS-B (#6274, thanks @Kaichi-Irie!)
Code Fixes
- Update target version of black from Python 3.8 to 3.9 (optuna/optuna-integration#254)
- Move
fit_kernel_paramstoGPRegressor(#6243) - Modify
TYPE_CHECKINGin_brute_force.py(#6259, thanks @Kaichi-Irie!) - Move SciPy to the lazy import section in
_gp/scipy_blas_thread_patch.py(#6269, thanks @Kaichi-Irie!) - Make the interface of
batched_lbfgsbmodule compatible withscipy.optimize(#6273, thanks @Kaichi-Irie!) - Fix type checking in
optuna.study._frozen.py(#6275, thanks @GabrielRomaoG!) - Move typing-only imports under
TYPE_CHECKINGinoptuna.importance.__init__(#6278, thanks @euangoodbrand!) - Move typing-only imports under TYPE_CHECKING in
FanovaImportanceEvaluator(#6279, thanks @euangoodbrand!) - Move typing-only imports under
TYPE_CHECKINGin/study/_optimize.py(#6280, thanks @euangoodbrand!) - Use
TYPE_CHECKINGinoptuna/pruners/_nop.py(#6297, thanks @AddyM!) - Use
TYPE_CHECKINGinoptuna/samplers/_random.py(#6298, thanks @AddyM!) - Speed up squared distance computation (#6300)
- Refactor emmr (#6304)
- Fix string format of
optuna/distributions.py(#6306) - Fix string format of
tests/samplers_tests/tpe_tests/test_truncnorm.py(#6307) - Update black target to Python 3.9 (#6308)
- Fix string format for
optuna/study/study.py(#6309, thanks @unKnownNG!) - Changed the old
.formatcode to the new f string format in thetest_journal.py(#6312, thanks @Zrahay!) - Update string formatting in
visualization/_pareto_front.py(#6314, thanks @dross20!) - Use f-string in
001_first.py(#6315, thanks @satyarth7srivastava!) - Use f-strings in
_intermediate_values.py(#6316, thanks @nihalsiddiqui7!) - Refactor
.formatto f-string in_percentile.py(#6323, thanks @Jongwan93!)
Continuous Integration
- Update
sklearn.pyto fix mypy checks (optuna/optuna-integration#249) - Fix CI (optuna/optuna-integration#250)
- Fix fragile
test_parallel_optimize_with_sleep(#6241) - Fix type checking in GP for CI (#6276)
- Fix CI (#6284)
- Limit the blackdoc version (#6289)
- Migrate
.coveragerctopyproject.toml(#6292, thanks @ParagEkbote!) - Explicitly close DB connections when discarding SQLAlchemy's
Engine(#6303)
Other
- Bump up the version number to
4.6.0.dev(optuna/optuna-integration#245) - Add
__version__to init (optuna/optuna-integration#247) - Migrate
.coveragerctopyproject.toml(optuna/optuna-integration#252, thanks @ParagEkbote!) - Bump up version (optuna/optuna-integration#255)
- Bump up version to v4.6.0.dev (#6252)
- Update NEWS section (#6319)
- Bump up to version number 4.6.0 (#6324)
Thanks to All the Contributors!
This release was made possible by the authors and the people who participated in the reviews and discussions.
@AddyM, @GabrielRomaoG, @Jongwan93, @Kaichi-Irie, @ParagEkbote, @Zrahay, @c-bata, @contramundum53, @dross20, @euangoodbrand, @fusawa-yugo, @gen740, @jaikumarm, @kAIto47802, @ktns, @nabenabe0928, @nihalsiddiqui7, @not522, @satyarth7srivastava, @sawa3030, @toshihikoyanase, @unKnownNG, @y0z
v4.5.0
This is the release note of v4.5.0.
Highlights
GPSampler for constrained multi-objective optimization
GPSampler is now able to handle multiple objective and constraints simultaneously using the newly introduced constrained LogEHVI acquisition function.
The figures below show the difference between GPSampler (LogEHVI, unconstrained) vs GPSampler (constrained LogEHVI, new feature). The 3-dimensional version of the C2DTLZ2 benchmark problem we used is a problem where some areas of the Pareto front of the original DTLZ2 problem are made infeasible by constraints. Therefore, even if constraints are not taken into account, it is possible to obtain the Pareto front. Experimental results show that both LogEHVI and constrained LogEHVI can approximate the Pareto front, but the latter has significantly fewer infeasible solutions, demonstrating its efficiency.
| Optuna v4.4 (LogEHVI) | Optuna v4.5 (Constrained LogEHVI) |
|---|---|
![]() |
![]() |
Significant speedup of TPESampler
TPESampler is significantly (about 5x as listed in the table below) faster! It enables a larger number of trials in each study. The speedup was achieved through a series of enhancements in constant factors.
The following table shows the speed comparison of TPESampler between v4.4.0 and v4.5.0. The experiments were conducted using multivariate=True on a search space with 3 continuous parameters and 3 numerical discrete parameters. Each row shows the runtime for each number of objectives and each column shows each number of trials to be evaluated. Each runtime is shown along with the standard error over 3 random seeds. The numbers in parentheses represent the speedup factor in comparison to v4.4.0. For example, (5.1x) means the runtime of v4.5.0 is 5.1 times faster than that of v4.4.0.
n_objectives/n_trials
|
500 | 1000 | 1500 | 2000 |
|---|---|---|---|---|
| 1 | 1.4 |
3.9 |
7.3 |
11.9 |
| 2 | 1.8 |
4.7 |
8.7 |
13.9 |
| 3 | 2.0 |
5.4 |
10.0 |
15.9 |
| 4 | 4.2 |
12.1 |
20.9 |
31.3 |
| 5 | 12.1 |
30.8 |
50.7 |
72.8 |
Significant speedup of plot_hypervolume_history
plot_hypervolume_history is essential to assess the performance of multi-objective optimization, but it was unbearably slow when a large number of trials are evaluated on a many-objective (The number of objectives > 3) problem. v4.5.0 addressed this issue by incrementally updating the hypervolume instead of calculating each hypervolume from scratch.
The following figure shows the elapsed times of hypervolume history plot in Optuna v4.4.0 and v4.5.0 using a four-objective problem. The x-axis represents the number of trials and the y-axis represents the elapsed times for each setup. The blue and red lines are the results of v4.4.0 and v4.5.0, respectively.
CmaEsSampler now supports 1D search space
Up until Optuna v4.4, CmaEsSampler could not handle one-dimensional space and fell back to random search. Optuna v4.5 now allows the CMA-ES algorithm to be used for one-dimensional space.
The optunahub library is available on conda-forge
Now, you can install the optunahub library via conda-forge as follows.
conda install conda-forge::optunahub
New Features
- Add
ConstrainedLogEHVI(#6198) - Add support for constrained multi-objective optimization in
GPSampler(#6224) - Support 1D Search Spaces in
CmaEsSampler(#6228)
Enhancements
- Move
optuna._lightgbm_tunermodule (optuna/optuna-integration#233, thanks @milkcoffeen!) - Fix numerical issue warning on
qehvi_candidates_func(optuna/optuna-integration#242, thanks @LukeGT!) - Calculate hypervolume in HSSP using sum of contributions (#6130)
- Use hypervolume difference as upperbound of contribs in HSSP (#6131)
- Refactor
tell_with_warningto avoid unnecessaryget_trialcall (#6133) - Print fully qualified name of experimental function by default (#6162, thanks @ktns!)
- Include
scipy-stubsin the type-check dependencies (#6174, thanks @jorenham!) - Warn when
GPSamplerfalls back toRandomSampler(#6179, thanks @sisird864!) - Handle slowdown of
GPSamplerdue to L-BFGS in SciPy v1.15 (#6191) - Use the Newton method instead of bisect in
ndtri_exp(#6194) - Speed up erf for
TPESampler(#6200) - Avoid duplications in
_log_gauss_massevaluations (#6202) - Remove unnecessary NumPy usage (#6215)
- Use subset comparator to judge if trials are included in search space (#6218)
- Speed up log pdf in
_BatchedTruncNormDistributionsby vectorization (#6220) - Speed up WFG by skipping
is_pareto_frontand using simple Python loops (#6223) - Vectorize
ndtri_exp(#6229) - Speed up
plot_hypervolume_history(#6232) - Speed up HSSP 4D+ by using a decremental approach (#6234)
- Use
lru_cacheto skip HSSP (#6240, thanks @fusawa-yugo!) - Add hypervolume computation for a zero size array (#6245)
Bug Fixes
- Fix: Resolve PG17 incompatibility for ENUMS in CASE statements (#6099, thanks @vcovo!)
- Fix ill-combination of journal and gRPC (#6175)
- Fix a bug in constrained
GPSampler(#6181) - Fix
TPESamplerwithmultivariateandconstant_liar(#6189)
Installation
- Remove version constraint for torch with Python 3.13 (#6233)
Documentation
- Add missing spaces in error message about inconsistent intermediate values (optuna/optuna-integration#239, thanks @Greesb!)
- Improve parallelization document (#6123)
- Add FAQ for case sensitivity problem with MySQL (#6127, thanks @fusawa-yugo!)
- Add an FAQ entry about specifying optimization parameters (#6157)
- Update link to survey (#6169)
- Add introduction of OptunaHub in docs (#6171, thanks @fusawa-yugo!)
- Add
GPSampleras a sampler that supports constraints (#6176, thanks @1kastner!) - Remove optuna-fast-fanova references from documentation (#6178)
- Fix stale docs in GP-related modules (#6184)
- Embed link to OptunaHub in documentation (#6192, thanks @fusawa-yugo!)
- Update
README.md(#6222, thanks @muhammadibrahim313!) - Add a note about unrelated changes in PR (#6226)
- Document the default evaluator in Optuna Dashboard (#6238)
Examples
- Add Spark example using ask-and-tell interface (optuna/optuna-examples#328, thanks @dhyeyinf!)
Tests
- Fix
test_log_completed_trial_skip_storage_access(#6208)
Code Fixes
- Clean up GP-related docs (#6125)
- Refactor return style #6136 (#6151, thanks @unKnownNG!)
- Refactor
KernelParamsTensortowards cleaner GP-related modules (#6152) - Rename
KernelParamsTensortoGPRegressor(#6153) - Refactor returns in
v3.0.0.d.py(#6154, thanks @dross20!) - Refactor acquisition function minimally (#6166)
- Implement Type-Checking for
optuna/_imports.py(#6167, thanks @AdrianStrymer!) - Fix type checking in
optuna.artifacts._download.py(#6177, thanks @dross20!) - Integrate
is_categoricalto search space (#6182) - Fix type checking in
optuna.artifacts._list_artifact_meta.py(#6187, thanks @dross20!) - Introduce the independent sampling warning template (#6188)
- Use warning template for independent sampling in
GPSampler(#6195) - Refactor
SearchSpacein GP (#6197) - Refactor
_truncnorm(#6201) - Use
TYPE_CHECKINGinoptuna/_gp/acqf.pyto avoid circular imports (#6204, thanks @CarvedCoder!) - Use
TYPE_CHECKINGinoptuna/_gp/optim_mixed.pyto avoid circular imports (#6205, thanks @Subodh-12!) - Flip the sign of constraints in
GPSampler(#6213) - Implement NSGA-III using
BaseGASampler(#6219) - Replace
torch.newaxiswithNonefor old PyTorch (#6237)
Continuous Integration
- Fix CI (optuna/optuna-integration#238)
- Add sklearn version constraint (optuna/optuna-integration#243)
- Fix
READMEforblackdoc==0.3.10(#6150) - Fix CI (#6161)
- Add
pytest-xdistto speed up the CI (#6170) - Delete
test_get_timeline_plot_with_killed_running_trials(#6210) - Fix fragile test
test_experimental(#6211) - Mark fragile test as
xfail(#6217) - Add unit tests for constrained multi-objective
GPSampler(#6235) - Fix CI (#6246)
Other
- Update the example list in the
README(optuna/optuna-integration#234, thanks @ParagEkbote!) - Bump up version number to
4.5.0.dev(optuna/optuna-integration#237) - Bump up the version number to 4.5.0 (optuna/optuna-integration#244)
- Bump up version number to v4.5.0.dev (#6149)
- Update News section in
README(#6159) - Bump up version to v4.5.0 (#6251)
Thanks to All the Contributors!
This release was made possible by the authors and the people who participated in the reviews and discussions.
@1kastner, @AdrianStrymer, @CarvedCoder, @Greesb, @HideakiImamura, @LukeGT, @ParagEkbote, @Subodh-12, @c-bata, @contramundum53, @dhyeyinf, @dross20, @fusaw...
v4.4.0
This is the release note of v4.4.0.
Highlights
In addition to new features, bug fixes, and improvements in documentation and testing, version 4.4 introduces a new tool called the Optuna MCP Server.
Optuna MCP Server
The Optuna MCP server can be accessed by any MCP client via uv — for instance, with Claude Desktop, simply add the following configuration to your MCP server settings file. Of course, other LLM clients like VSCode or Cline can also be used similarly. You can also access it via Docker. If you want to persist the results, you can use the — storage option. For details, please refer to the repository.
{
"mcpServers": {
… (Other MCP Servers' settings)
"Optuna": {
"command": "uvx",
"args": [
"optuna-mcp"
]
}
}
}
Gaussian Process-Based Multi-objective Optimization
Optuna’s GPSampler, introduced in version 3.6, offers superior speed and performance compared to existing Bayesian optimization frameworks, particularly when handling objective functions with discrete variables. In Optuna v4.4, we have extended this GPSampler to support multi-objective optimization problems. The applications of multi-objective optimization are broad, and the new multi-objective capabilities introduced in this GPSampler are expected to find applications in fields such as material design, experimental design problems, and high-cost hyperparameter optimization.
GPSampler can be easily integrated into your program and performs well against the existing BoTorchSampler. We encourage you to try it out with your multi-objective optimization problems.
sampler = optuna.samplers.GPSampler()
study = optuna.create_study(directions=["minimize", "minimize"], sampler=sampler)New Features in OptunaHub
During the development period of Optuna v4.4, several new features were also introduced to OptunaHub, the feature-sharing platform for Optuna:
- A sampler utilizing Google Vizier is now newly available.
- The CMA-ES-based sampler with restart strategy, which was previously part of the Optuna core, has been migrated to OptunaHub, making it simpler and more user-friendly.
- A benchmark problem solving aircraft design as a black-box optimization task has been added, further enhancing the convenience of algorithm development using OptunaHub.
- A visualization feature has also been added, allowing users to see how the acquisition function of the default TPESampler evolves as trials progress.
- A novel mutation operation has been added to the MOEA/D evolutionary computation algorithm for multi-objective optimization.
| Vizier sampler performance |
|---|
![]() |
| TPE acquisition visualizer |
|---|
![]() |
Breaking Changes
- Update
consider_priorBehavior and Remove Support forFalse(#6007) - Remove
restart_strategyandinc_popsizeto simplifyCmaEsSampler(#6025) - Make all arguments of
TPESamplerkeyword-only (#6041)
New Features
- Add a module to preprocess solutions for hypervolume improvement calculation (#6039)
- Add
AcquisitionFuncParamsfor LogEHVI (#6052) - Support Multi-Objective Optimization
GPSampler(#6069) - Add
n_recent_trialstoplot_timeline(#6110, thanks @msdsm!)
Enhancements
- Adapt
TYPE_CHECKINGofsamplers/_gp/sampler.py(#6059) - Avoid deepcopy in
_tell_with_warning(#6079) - Add
_compute_3dfor hypervolume computation (#6112, thanks @shmurai!) - Improve performance of
plot_hypervolume_history(#6115, thanks @shmurai!) - add deprecated/removed version specification to calls of
convert_positional_args(#6117, thanks @shmurai!) - Optimize
Study.best_trialperformance by avoiding unnecessary deep copy (#6119, thanks @msdsm!) - Refactor and speed up HV3D (#6124)
- Add
assume_paretofor hv calculation in_calculate_weights_below_for_multi_objective(#6129)
Bug Fixes
- Update vsbx (#6033, thanks @hrntsm!)
- Fix
request.valuesinOptunaStorageProxyService(#6044, thanks @hitsgub!) - Fix a bug in distributed optimization using NSGA-II/III (#6066, thanks @leevers!)
- Fix: fetch all trials in
BruteForceSamplerforHyperbandPruner(#6107)
Documentation
- Add Pycma Example (optuna/optuna-integration#226, thanks @ParagEkbote!)
- Add SHAP Example (optuna/optuna-integration#227, thanks @ParagEkbote!)
- Document Behavior of
optuna.pruners.MedianPrunerandoptuna.pruners.PatientPruner(#6055, thanks @ParagEkbote!) - Change the link of tutorial docs of optunahub (#6063, thanks @fusawa-yugo!)
- Update the documentation string of
GPSampler(#6081) - Add a warning about the combination of gRPC Proxy and Journal Storage (#6097)
- Cosmetic fix to the terminator documents (#6100)
- Note in docstring that heartbeat mechanism is experimental (#6111, thanks @lan496!)
- Update docstrings of
_get_best_trialto follow coding conventions (#6122)
Examples
- Add Example for Comet (optuna/optuna-examples#305, thanks @ParagEkbote!)
- Adding an OpenML example (optuna/optuna-examples#310, thanks @SubhadityaMukherjee!)
- Add workflow dispatch (optuna/optuna-examples#311)
- Update PyTorch Checkpoint Example using tempfile (optuna/optuna-examples#313, thanks @ParagEkbote!)
- [hotfix] Fix Dask-ML example by adding the version constraint on numpy (optuna/optuna-examples#315)
- Setup Pre-Commit (optuna/optuna-examples#316, thanks @ParagEkbote!)
- Remove Python 3.9 from haiku CI (optuna/optuna-examples#318)
- Add a transformers example (optuna/optuna-examples#322, thanks @ParagEkbote!)
- Add transformer item to
RAEDME.md(optuna/optuna-examples#323) - Remove version constraints of
tensorflowandnumpy(optuna/optuna-examples#324) - Update pre-commit hooks (optuna/optuna-examples#326, thanks @lan496!)
- Add preferential optimization picture (optuna/optuna-examples#327, thanks @milkcoffeen!)
Tests
- Add float precision tests for storages (#6040)
- Refactor
test_base_gasampler.py(#6104) - chore: run tests for importance only with in-memory (#6109)
- Improve test cases for
n_recent_trialsofplot_timeline(follow-up #6110) (#6116) - Performance optimization for
test_study.pyby removing redundancy (#6120)
Code Fixes
- Optional mypy check (#6028)
- Update Type-Checking for
optuna/_experimental.py(#6045, thanks @ParagEkbote!) - Update Type-Checking for
optuna/importance/_base.py(#6046, thanks @ParagEkbote!) - Update Type-Checking for
optuna/_convert_positional_args.py(#6050, thanks @ParagEkbote!) - Update Type-Checking for
optuna/_deprecated.py(#6051, thanks @ParagEkbote!) - Update Type-Checking for
optuna/_gp/gp.py(#6053, thanks @ParagEkbote!) - Add validate
etain sbx (#6056, thanks @hrntsm!) - Remove
CmaEsAttrKeysand_attr_keysfor Simplification (#6068) - Replace
np.isnanwithmath.isnan(#6080) - Refactor warning handling of
_tell_with_warning(#6082) - Implement Type-Checking for
optuna/distributions.py(#6086, thanks @AdrianStrymer!) - Update TYPE_CHECKING for
optuna/_gp/gp.py(#6090, thanks @Samarthi!) - Support mypy 1.16.0 (#6102)
- Emit
ExperimentalWarningif heartbeat is enabled (#6106, thanks @lan496!) - Simplify tuple return in
optuna/visualization/_terminator_improvement.py(#6139, thanks @Prashantdhaka23!) - Refactor return standardization in
optim_mixed.py(#6140, thanks @Ajay-Satish-01!) - Simplify tuple return in
test_trial.py(#6141, thanks @saishreyakumar!) - Refactor return statement style in
optuna/storages/_rdb/models.pyfor consistency among the codebase (#6143, thanks @Shubham05122002!)
Continuous Integration
- Add type ignore in
wandb(optuna/optuna-integration#228) - Fix to prevent daily
checks-optionalCI on the fork repositories (#6103) - Fix CI (#6137)
- [hotfix] Add version constraint on
blackdoc(#6145)
Other
- Bump up version number to v4.4.0.dev (optuna/optuna-integration#220)
- Add pre commit config (optuna/optuna-integration#231, thanks @milkcoffeen!)
- Bump up version number to 4.4.0 (optuna/optuna-integration#236)
- Bump up version to 4.4.0dev (#6038)
- Update the news section in README.md (#6049)
- Fix README for v5 roadmap (#6094)
- Update pre-commit hooks (#6108, thanks @lan496!)
Thanks to All the Contributors!
This release was made possible by the authors and the people who participated in the reviews and discussions.
@AdrianStrymer, @Ajay-Satish-01, @Alnusjaponica, @Copilot, @HideakiImamura, @ParagEkbote, @Prashantdhaka23, @Samarthi, @Shubham05122002, @SubhadityaMukherjee, @c-bata, @contramundum53, @copilot-pull-request-reviewer[bot], @fusawa-yugo, @gen740, @himkt, @hitsgub, @hrntsm, @kAIto47802, @lan496, @leevers, @milkcoffeen, @msdsm, @nabenabe0928, @not522, @nzw0301, @s...
v4.3.0
This is the release note of v4.3.0.
Highlights
This has various bug fixes and improvements to the documentation and more.
Breaking Changes
- [fix] lgbm 4.6.0 compatibility (optuna/optuna-integration#207, thanks @ffineis!)
Enhancements
- Accept custom objective in
LightGBMTuner(optuna/optuna-integration#203, thanks @sawa3030!) - Improve time complexity of
IntersectionSearchSpace(#5982, thanks @GittyHarsha!) - Add
_prev_waiting_trial_numberinInMemoryStorageto improve the efficiency of_pop_waiting_trial_id(#5993, thanks @sawa3030!) - Add arguments of versions to
convert_positional_args(#6009, thanks @fusawa-yugo!) - Add
wait_server_readymethod in GrpcStorageProxy (#6010, thanks @hitsgub!) - Remove warning messages for Matplotlib-based
plot_contourandplot_rank(#6011) - Fix type checking in
optuna._callbacks.py(#6030) - Enhance
SBXCrossover(#6008, thanks @hrntsm!)
Bug Fixes
- Convert storage into
InMemoryStoragebefore copying to the local (optuna/optuna-integration#213) - Fix contour plot of
matplotlib(#5892, thanks @fusawa-yugo!) - Fix threading lock logic (#5922)
- Use
_LazyImportfor grpcio package (#5954) - Prevent Lock Blocking by Adding Timeout to
JournalStorage(#5971, thanks @sawa3030!) - Fix a minor bug in GPSampler for objective that returns
inf(#5995) - Fix a bug that a gRPC server doesn't work with JournalStorage (#6004, thanks @fusawa-yugo!)
- Fix
_pop_waiting_trial_idfor finished trial (#6012) - Resolve the issue where
BruteForceSamplerfails to suggest all combinations (#5893)
Documentation
- Follow recent changes in
optuna/optuna's document sphinx config (optuna/optuna-integration#197) - Fix links to external modules (optuna/optuna-integration#198)
- Update
CONTRIBUTING.md(optuna/optuna-integration#200, thanks @sawa3030!) - Update comment in
.readthedocs.yml(#5976) - Add comments on the reproducibility of
HyperBandPruner(#6018)
Examples
- [hotfix] Add the version constraint on
dask(optuna/optuna-examples#296) - [hotfix] Add the version constraint on
daskfordask-ml(optuna/optuna-examples#297) - Extends execution span of
hiplotandsklearn(optuna/optuna-examples#298, thanks @fusawa-yugo!) - Apply black to fix CI (optuna/optuna-examples#300)
- Bump up to 3.12 for CI (optuna/optuna-examples#301)
- [hotfix] Add the version constraint on
lightgbm(optuna/optuna-examples#302) - Fix Skorch Example (optuna/optuna-examples#303, thanks @ParagEkbote!)
- Add version constraint for tensorflow-related CI (optuna/optuna-examples#304)
- Temporarily skip Python 3.9 in fastai example (optuna/optuna-examples#308)
- Run the
skorchexample in the CI (optuna/optuna-examples#309) - Fix
fastaiExample (optuna/optuna-examples#312)
Tests
Code Fixes
- Add
BaseGASampler(#5864) - Fix comments in
pyproject.toml(#5972) - Remove
FirstTrialOnlyRandomSampler(#5973, thanks @mehakmander11!) - Remove
_check_and_set_param_distribution(#5975, thanks @siddydutta!) - Remove
testing/distributions.py(#5977, thanks @mehakmander11!) - Remove
_StudyInfo'sparam_distributionin_cached_storage.py(#5978, thanks @tarunprabhu11!) - Introduce
UpdateFinishedTrialErrorto raise an error when attempting to modify a finished trial (#6001, thanks @sawa3030!) - Deprecate
consider_priorinTPESampler(#6005, thanks @sawa3030!) - Improve Code Readability by Following PEP8 Standards (#6006, thanks @sawa3030!)
- Made error message for
create_study's direction easier to understandoptuna.study(#6021, thanks @sinano1107!)
Continuous Integration
- Hotfix ci (optuna/optuna-integration#199)
- Add flake8 in CI (optuna/optuna-integration#201, thanks @sawa3030!)
- Remove test cases that uses
UnsupportedDistribution(optuna/optuna-integration#208) - Fix a mypy error when using
numpy>=2.2.4(optuna/optuna-integration#212) - Fix a bug of
lightgbmtuner for Python 3.8 users (optuna/optuna-integration#214) - Add a version constraint on
xgboost(optuna/optuna-integration#217) - Run (optuna/optuna-integration#218)
- Ensure gRPC server readiness before proceeding to prevent test failures (#5938, thanks @sawa3030!)
- Apply black to fix CI (#5952)
- Add
workflow_dispatchtrigger to all the CI (#6019) - Fix CI (#6026)
Other
- Bump up version number to 4.3.0.dev (optuna/optuna-integration#192)
- Bump the version up to v4.2.1 (optuna/optuna-integration#195)
- Set repository url (optuna/optuna-integration#196, thanks @ktns!)
- Bump up version number to v4.3.0 (optuna/optuna-integration#221)
- Bump the version up to v4.3.0.dev (#5927)
- Add the article to the news section (#5928)
- Update news section for 4.2.0 release (#5934)
- Update News (#5936)
- Update README with the new blog entry (#5980)
- Add
GPSamplerblog to the announcement (#6014) - Add grpc blog to README (#6020)
Thanks to All the Contributors!
This release was made possible by the authors and the people who participated in the reviews and discussions.
@Alnusjaponica, @GittyHarsha, @HideakiImamura, @ParagEkbote, @c-bata, @contramundum53, @ffineis, @fusawa-yugo, @gen740, @hitsgub, @hrntsm, @kAIto47802, @ktns, @mehakmander11, @nabenabe0928, @not522, @nzw0301, @porink0424, @sawa3030, @siddydutta, @sinano1107, @tarunprabhu11, @toshihikoyanase, @y0z
v4.2.1
This is the release note of v4.2.1. This release includes a bug fix addressing an issue where Optuna was unable to import if an older version of the grpcio package was installed.
Bug
- [backport] Use
_LazyImportfor grpcio package (#5965)
Other
- Bump up version number to v4.2.1 (#5964)
Thanks to All the Contributors!
This release was made possible by the authors and the people who participated in the reviews and discussions.
@c-bata @HideakiImamura @nabenabe0928







