pypi optuna 4.7.0
v4.7.0

5 hours ago

This is the release note of v4.7.0.

Highlights

Two New Multi-Objective Samplers Added to OptunaHub!

hype-sampler

@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 JournalStorage lock 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 -W option on Sphinx build (#6373)

Examples

Tests

  • Fix TC006 violation in tests/visualization_tests/test_utils.py (#6387, thanks @jiayusu!)

Code Fixes

  • Replace .format() with f-string in _setup_studies (#6326, thanks @haitham404!)
  • Update _upload.py for TYPE_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 .format with f-strings in optuna/importance/_base (#6342, thanks @VihaanMotwani!)
  • updated _terminator_improvement.py for TYPE_CHECKING (#6343, thanks @satyarth7srivastava!)
  • Replace .format with 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 .format with f-string in tutorial/20_recipes/004_cli.py (#6350, thanks @RektPunk!)
  • Replace .format with f-string in optuna/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/ and tutorials/ files with Ruff (#6360)
  • Remove redundant _color_supported() check (#6363)
  • Add StorageTestCase class in optuna.testing package (#6369)
  • Change string formatting in optuna/pruners/_hyperband.py (#6370, thanks @eleannapapaio!)
  • Refactor test_study.py to 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_CHECKING in test_visualizations.py (#6380, thanks @Sip4818!)
  • Move type-only imports to TYPE_CHECKING in _constrained_optimization.py (#6381, thanks @Sip4818!)
  • Replace format with f-string (#6383, thanks @varundevr!)
  • Move type-only imports to TYPE_CHECKING in _multi_objective.py (#6385, thanks @Sip4818!)
  • Move FrozenTrial import under TYPE_CHECKING for _study_summary.py file (#6386, thanks @Sip4818!)
  • Move type-check imports to TYPE_CHECKING in optuna/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 StorageTestCase scenarios involving trial state and values (#6391)
  • Move type-hint import inside Type-Checking block in optuna\terminator\erroreval.py (#6395, thanks @Sip4818!)
  • Move type-check imports to TYPE_CHECKING in optuna\terminator\improvement\emmr.py (#6396, thanks @Sip4818!)
  • Move typing-only imports under TYPE_CHECKING in matplotlib/_slice.py (#6399, thanks @kapishyadav!)
  • Use logger.warning instead of optuna_warn for lock-acquisition delay notifications (#6400)
  • Update string formatting in optuna/samplers/_grid.py (#6401, thanks @kapishyadav!)
  • Updating storages/_in_memory.py to use f-strings (#6404, thanks @jrings!)
  • Move type-hint imports into type-checking block in optuna\terminator\improvement\evaluator.py (#6405, thanks @Sip4818!)
  • Move type-hint imports into type-checking block in median_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

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, @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

Don't miss a new optuna release

NewReleases is sending notifications on new releases.