This is the release note for v5.0.0.
Highlights
Major Enhancements to the Default Sampler
Optuna v5.0 introduces the first major update to its default sampler configuration since v1.5. For single-objective optimization, TPESampler now enables multivariate TPE (#6746) and the constant liar strategy by default (#6738), together with enhanced bandwidth computation (Watanabe 2023). For multi-objective optimization, TPESampler replaces NSGAIISampler as the default sampler (#6766). These settings were selected through comprehensive benchmarking to improve optimization performance.
New Core APIs for Constrained Optimization
Constrained optimization is now represented directly in Optuna’s core Trial API. Constraint values can be set inside the objective function using trial.set_constraint() and retrieved through trial.constraints, providing a consistent interface across supported samplers. Accordingly, the sampler-specific constraints_func arguments are now deprecated. (#6736, #6754, #6773)
PED-ANOVA Becomes the Default Parameter Importance Evaluator
Optuna v5.0 makes PedAnovaImportanceEvaluator the default evaluator used by optuna.importance.get_param_importances(), replacing f-ANOVA. PED-ANOVA computes parameter importances substantially faster, works with Optuna’s standard dependencies, and now supports conditional search spaces and multi-objective studies. The conditional extension, Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces, was accepted at KDD 2026. (#6682, #6728, #6748)
Improved Parallel Optimization with GPSampler
GPSampler, now a stable API in Optuna v5.0, introduces Monte Carlo-based q-batch acquisition functions that account for trials currently under evaluation. Rather than assigning each running trial a single heuristic pseudo-value, these acquisition functions integrate over possible outcomes sampled from the Gaussian process posterior, allowing predictive uncertainty to inform subsequent suggestions.
The new acquisition functions cover all four major problem settings: qLogEI for unconstrained single-objective optimization, qLogCEI for constrained single-objective optimization, qLogEHVI for unconstrained multi-objective optimization, and qLogCEHVI for constrained multi-objective optimization. This provides a more principled approach to parallel Bayesian optimization across the problem settings supported by GPSampler. (#6715, #6640, #6744, #6792, #6804)
Breaking Changes
- Remove
optuna.multi_objectivemodule (#6686) - Remove deprecated integration wrappers for AllenNLP, Chainer, and MXNet (#6693)
- Stabilize
GPSampler(#6715) - Enable
constant_liarby default (#6738) - Support categorical parameters in
QMCSampler(#6742, thanks @saivedant169!) - Enable multivariate by default in
TPESampler(#6746) - Remove deprecated positional-arg compatibility from study and trial APIs (#6747, thanks @yen-0!)
- Make
PedAnovaImportanceEvaluatorthe default importance evaluator (#6748) - Make
TPESamplerthe default sampler for multi-objective optimization (#6766) - Deprecate
constraints_func(#6773) - Change to treat cases without constraints as feasible (#6774)
- Normalize trial timestamps to UTC in
RDBStorageandJournalStorage(#6776) - Remove
axis_orderargument fromplot_pareto_front(#6781) - Remove
system_attrsfromStudySummary(#6782) - Remove
categorical_distance_funcfromTPESampler(#6783) - Remove deprecated modules (optuna/optuna-integration#293)
- Remove
MXNetPruningCallback(optuna/optuna-integration#294) - Use
constraintsproperty inBoTorchSampler(optuna/optuna-integration#306) - Remove
set_system_attrandsystem_attrsfromTorchDistributedTrial(optuna/optuna-integration#309) - Remove
set_system_attrandsystem_attrsfromStudyandTrial(#6834)
New Features
- Implement qLogEI acquisition function (#6640, thanks @sawa3030!)
- Add support for conditional search spaces in PED-ANOVA (#6682)
- Add conditional gp regressor (#6721)
- Add mutation to ga (#6724, thanks @hrntsm!)
- Use MOTPE-like split in PED-ANOVA for multi-objective studies when
targetisNone(#6728) - Add
constraintsproperty toTrial(#6736) - Add
set_constraintmethod toTrial(#6754) - Implement
constraintsandset_constraintinTorchDistributedTrial(optuna/optuna-integration#308) - Add
qConstrainedLogEI(#6744, thanks @sawa3030!) - Extend parallel coordinate plots to conditional, multi-objective, and constrained studies (#6763)
- Add
qLogEHVI(#6792, thanks @sawa3030!) - Add
qConstrainedLogEHVIinGPSampler(#6804, thanks @sawa3030!) - Add
constraintsargument increate_trial(#6816)
Enhancements
- Fix
QMCSamplerfallback to independent sampling in distributed setups (#6638, thanks @Rishabh-git10!) - Speed up
BruteForceSamplerby avoiding full tree build based on tree size check (#6646) - Add search space fingerprint for quicker consistency check in
BruteForceSampler(#6649) - Speed up
BruteForceSamplerby candidates caching (#6650) - Split
BruteForceSamplerrefactoring [3/3] (#6657) - Refactor PED-ANOVA (#6681)
- Add lazy tree node to
BruteForceSamplerfor speedup (#6705) - Raise
ValueErrorinPedAnovaImportanceEvaluatorfor multi-objective studies withouttarget(#6716) - Fix for the
GPSamplerOMP issue (#6753) - Bind loop var in
_get_constraint_funcsto avoid closure bug (optuna/optuna-integration#278, thanks @GopalGB!) - Fix GitHub Actions workflow to use Optuna master (optuna/optuna-integration#307)
- Allow
JournalStorageto read Rustuna journal files (#6790) - Warn against using
CmaEsSamplerin constrained optimization (#6802) - Preserve empty study names across storage backends (#6818, thanks @uczltw6!)
Bug Fixes
- Handle insufficient trials without raising
ValueErrorin importances (#6720) - Fix a concurrency issue when setting study attributes (#6751)
- Use qLog variants in
qehvi_candidates_funcandqnehvi_candidates_func(optuna/optuna-integration#302, thanks @adrianhtt!) - Fix
IntDistributionmidpoint bias in_SearchSpaceTransformand add tests (#6771, thanks @yen-0!) - Preserve
metric_namesorder intrials_dataframecolumns (#6786, thanks @rkfshakti!) - Add log cache offset tests and fixed logic (#6794, thanks @yen-0!)
- Add
QMCSamplertoTestRelativeSamplercoverage and clamp log-float untransform at low bound (#6799, thanks @yen-0!) - Fix NaN comparison when skipping enqueued trials (#6803, thanks @ishitta-iyer!)
Documentation
- Add ablation study tutorial using
BruteForceSampler(#6652) - Simplify the document for deprecated
CmaEsSampleroptions (#6694) - Move deprecated
TPESampleroptions to the end (#6696) - Fix typos in docstrings and duplicated author names in
SPXCrossovercitation (#6698, thanks @Divyansh-ag14!) - Fix wording in specify params tutorial (#6711, thanks @Ryo2611!)
- Add a documentation about constrained
TPESampler(#6712) - Enhance
AutoSamplercitation path (#6714) - Update sampler table (#6717)
- Clarify
n_warmup_stepsboundary inMedianPrunerandPercentilePruner(#6733, thanks @vin0san!) - Fix trial report doc (#6735)
- Consolidate instruction for external dependency (#6749)
- Update sampler table for constrained optimization (#6775)
- Fix undefined variable in
GCSArtifactStoredocstring example (#6815, thanks @maupatel!)
Examples
- Specify workflow permissions explicitly (optuna/optuna-examples#359)
- Remove call for external example contributions (optuna/optuna-examples#360)
- Add CODEOWNERS file (optuna/optuna-examples#361)
Tests
- Refactoring importance tests (#6725)
- Add importance evaluator test cases to
optuna.testing(#6765) BoTorchSamplerunit test using optuna pytest samplers (optuna/optuna-integration#305, thanks @yen-0!)
Code Fixes
- Refactor batched distribution classes to reduce branch duplication (#6689)
- Reduce redundancy in
test_brute_force.py(#6706) - Replace SciPy with Torch in
gp.py(#6710) - Fix and refactor
paramsvalidation in PED-ANOVA (#6729) - Show all study names upon load/create study failure (#6750)
- Debug and refactor q-logEI (#6760)
- Changed type of study's direction into
Literal | StudyDirection(#6762, thanks @yen-0!) - Fix unused mypy ignores in
optuna/visualization/matplotlib/_rank.py(#6767) - Avoid unnecessary trial values in storage tests (#6769)
- Fix mypy errors (#6778)
- Fix flake8 errors in comet and botorch modules (optuna/optuna-integration#310, thanks @ShamikOfficial!)
- Separate Scott Parzen from TPE Parzen (followup of PED-ANOVA refactoring) (#6743)
- Refactor
qConstrainedLogEI(#6779, thanks @sawa3030!) - Fix type annotations for
contextmanager(#6793, thanks @yen-0!) - Match the acquisition function naming to existing BoTorch literature (#6807)
- Fix mypy errors in parallel coordinate plot (#6808)
Continuous Integration
- Specify workflow permissions explicitly (#6687)
- Capture Windows stdout (#6699)
- Fix logging tests broken by pytest 9.1.0 caplog behavior change (#6719)
- Hotfix for Sphinx CI (#6726)
- Fix mypy errors with latest NumPy stubs (#6730)
- Skip flaky gRPC journal storage tests (#6770)
- Migrate CI and development setup to uv (optuna/optuna-integration#296)
- Specify workflow permissions explicitly (optuna/optuna-integration#297)
- Specify action hash in workflow files (optuna/optuna-integration#298)
- Remove duplicate normalized extra names (optuna/optuna-integration#300)
- Fix for CI (optuna/optuna-integration#303)
- Fix for lightgbm CI (optuna/optuna-integration#304)
- Pin
plotly<7wherekaleido<1is required (#6829) - Temporarily disable -W option on Sphinx build (#6839)
Other
- Bump up to version number v5.0.0.dev (#6685)
- Add
attestations: falseto fix release workflow (#6690) - Update README with Optuna 4.9.0 release news (#6701)
- Add CODEOWNERS file (#6718)
- Bump the version up to
5.0.0rc1(#6784) - Bump up version (optuna/optuna-integration#289)
- Add
attestations: falseto fix the release workflow (optuna/optuna-integration#291) - Add
CODEOWNERSfile (optuna/optuna-integration#301) - Bump the version up to v5.0.0 (optuna/optuna-integration#311)
- Update news section on README for v5.0.0-rc1 release (#6788)
- Add Rustuna section and remove Integration section on README (#6795)
- Add a checkbox to state the use of LLM (#6813)
- Bump up version to 5.0.0 (#6840)
Thanks to All the Contributors!
This release was made possible by the authors and the people who participated in the reviews and discussions.
@Alnusjaponica, @Divyansh-ag14, @GopalGB, @Rishabh-git10, @Ryo2611, @ShamikOfficial, @adrianhtt, @c-bata, @gen740, @himkt, @hrntsm, @ishitta-iyer, @kAIto47802, @maupatel, @nabenabe0928, @not522, @porink0424, @rkfshakti, @saivedant169, @sawa3030, @uczltw6, @vin0san, @y0z, @yen-0