pypi optuna 5.0.0
v5.0.0

3 hours ago

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.

image4

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)

image2

Breaking Changes

  • Remove optuna.multi_objective module (#6686)
  • Remove deprecated integration wrappers for AllenNLP, Chainer, and MXNet (#6693)
  • Stabilize GPSampler (#6715)
  • Enable constant_liar by 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 PedAnovaImportanceEvaluator the default importance evaluator (#6748)
  • Make TPESampler the 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 RDBStorage and JournalStorage (#6776)
  • Remove axis_order argument from plot_pareto_front (#6781)
  • Remove system_attrs from StudySummary (#6782)
  • Remove categorical_distance_func from TPESampler (#6783)
  • Remove deprecated modules (optuna/optuna-integration#293)
  • Remove MXNetPruningCallback (optuna/optuna-integration#294)
  • Use constraints property in BoTorchSampler (optuna/optuna-integration#306)
  • Remove set_system_attr and system_attrs from TorchDistributedTrial (optuna/optuna-integration#309)
  • Remove set_system_attr and system_attrs from Study and Trial (#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 target is None (#6728)
  • Add constraints property to Trial (#6736)
  • Add set_constraint method to Trial (#6754)
  • Implement constraints and set_constraint in TorchDistributedTrial (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 qConstrainedLogEHVI in GPSampler (#6804, thanks @sawa3030!)
  • Add constraints argument in create_trial (#6816)

Enhancements

  • Fix QMCSampler fallback to independent sampling in distributed setups (#6638, thanks @Rishabh-git10!)
  • Speed up BruteForceSampler by avoiding full tree build based on tree size check (#6646)
  • Add search space fingerprint for quicker consistency check in BruteForceSampler (#6649)
  • Speed up BruteForceSampler by candidates caching (#6650)
  • Split BruteForceSampler refactoring [3/3] (#6657)
  • Refactor PED-ANOVA (#6681)
  • Add lazy tree node to BruteForceSampler for speedup (#6705)
  • Raise ValueError in PedAnovaImportanceEvaluator for multi-objective studies without target (#6716)
  • Fix for the GPSampler OMP issue (#6753)
  • Bind loop var in _get_constraint_funcs to avoid closure bug (optuna/optuna-integration#278, thanks @GopalGB!)
  • Fix GitHub Actions workflow to use Optuna master (optuna/optuna-integration#307)
  • Allow JournalStorage to read Rustuna journal files (#6790)
  • Warn against using CmaEsSampler in constrained optimization (#6802)
  • Preserve empty study names across storage backends (#6818, thanks @uczltw6!)

Bug Fixes

  • Handle insufficient trials without raising ValueError in importances (#6720)
  • Fix a concurrency issue when setting study attributes (#6751)
  • Use qLog variants in qehvi_candidates_func and qnehvi_candidates_func (optuna/optuna-integration#302, thanks @adrianhtt!)
  • Fix IntDistribution midpoint bias in _SearchSpaceTransform and add tests (#6771, thanks @yen-0!)
  • Preserve metric_names order in trials_dataframe columns (#6786, thanks @rkfshakti!)
  • Add log cache offset tests and fixed logic (#6794, thanks @yen-0!)
  • Add QMCSampler to TestRelativeSampler coverage 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 CmaEsSampler options (#6694)
  • Move deprecated TPESampler options to the end (#6696)
  • Fix typos in docstrings and duplicated author names in SPXCrossover citation (#6698, thanks @Divyansh-ag14!)
  • Fix wording in specify params tutorial (#6711, thanks @Ryo2611!)
  • Add a documentation about constrained TPESampler (#6712)
  • Enhance AutoSampler citation path (#6714)
  • Update sampler table (#6717)
  • Clarify n_warmup_steps boundary in MedianPruner and PercentilePruner (#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 GCSArtifactStore docstring example (#6815, thanks @maupatel!)

Examples

Tests

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 params validation 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

Other

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

Don't miss a new optuna release

NewReleases is sending notifications on new releases.