Optuna

Latest version: v3.6.1

Safety actively analyzes 618506 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 17

192.168.1.88686

$ python dask_simple.py


A brand-new Redis storage

We have replaced the Redis storage backend with a JournalStorage-based one. The experimental `RedisStorage` class has been removed in v3.1. The following example shows how to use the new `JournalRedisStorage` class.

python
import optuna
from optuna.storages import JournalStorage, JournalRedisStorage

def objective(trial):


storage = JournalStorage(JournalRedisStorage("redis://localhost:6379"))
study = optuna.create_study(storage=storage)
study.optimize(objective)


Sampler for brute-force search

`BruteForceSampler`, a new sampler for brute-force search, tries all combinations of parameters. In contrast to `GridSampler`, it does not require passing the search space as an argument and works even with branches. This sampler constructs the search space with the define-by-run style, so it works by just adding `sampler=optuna.samplers.BruteForceSampler()`.

python
import optuna

def objective(trial):
c = trial.suggest_categorical("c", ["float", "int"])
if c == "float":
return trial.suggest_float("x", 1, 3, step=0.5)
elif c == "int":
a = trial.suggest_int("a", 1, 3)
b = trial.suggest_int("b", a, 3)
return a + b

study = optuna.create_study(sampler=optuna.samplers.BruteForceSampler())
study.optimize(objective)


Breaking Changes

- Allow users to call `study.optimize()` in multiple threads (4068)
- Use all trials in `TPESampler` even when `multivariate=True` (4079)
- Drop Python 3.6 (4150)
- Remove `RedisStorage` (4156)
- Deprecate `set_system_attr` in `Study` and `Trial` (4188)
- Deprecate `system_attrs` in `Study` class (4250)

New Features

- Add Dask integration (2023, thanks jrbourbeau!)
- Add journal-style log storage (3854)
- Support CMA-ES with margin in `CmaEsSampler` (4016)
- Add journal redis storage (4086)
- Add device argument to `BoTorchSampler` (4101)
- Add the feature to `JournalStorage` of Redis backend to resume from a snapshot (4102)
- Added `user_attrs` to print by optuna studies in `cli.py` (4129, thanks gonzaload!)
- Add `BruteForceSampler` (4132, thanks semiexp!)
- Add `__getstate__` and `__setstate__` to `RedisStorage` (4135, thanks shu65!)
- Support pickle in `JournalRedisStorage` (4139, thanks shu65!)
- Support for `qNoisyExpectedHypervolumeImprovement` acquisition function from `BoTorch` (Issue4014) (4186)

Enhancements

- Change the log message format for failed trials (3857, thanks erentknn!)
- Move default logic of `get_trial_id_from_study_id_trial_number()` method to BaseStorage (3910)
- Fix the data migration script for v3 release (4020)
- Convert `search_space` values of `GridSampler` explicitly (4062)
- Add single exception catch to study optimize (4098)
- Add validation in `enqueue_trial` (4126)
- Speed up `tests/samplers_tests/test_nsgaii.py::test_fast_non_dominated_sort_with_constraints` (4128, thanks mist714!)
- Add getstate and setstate to journal storage (4130, thanks shu65!)
- Support `None` in slice plot (4133, thanks belldandyxtq!)
- Add marker to matplotlib `plot_intermediate_value` (4134, thanks belldandyxtq!)
- Cache `study.directions` to reduce the number of `get_study_directions()` calls (4146)
- Add an in-memory cache in `Trial` class (4240)

Bug Fixes

- Fix infinite loop bug in `TPESampler` (3953, thanks gasin!)
- Fix `GridSampler` (3957)
- Fix an import error of `sqlalchemy.orm.declarative_base` (3967)
- Skip to add `intermediate_value_type` and `value_type` columns if exists (4015)
- Fix duplicated sampling of `SkoptSampler` (4023)
- Avoid parse errors of `datetime.isoformat` strings (4025)
- Fix a concurrency bug of JournalStorage `set_trial_state_values` (4033)
- Specify object type to numpy array init to avoid unintended str cast (4035)
- Make `TPESampler` reproducible (4056)
- Fix bugs in `constant_liar` option (4073)
- Add a flush to `JournalFileStorage.append_logs` (4076)
- Add a lock to `MLflowCallback` (4097)
- Reject deprecated distributions in `OptunaSearchCV` (4120)
- Stop using hash function in `_get_bracket_id` in `HyperbandPruner` (4131, thanks zaburo-ch!)
- Validation for the parameter enqueued in `to_internal_repr` of `FloatDistribution` and `IntDistribution` (4137)
- Fix `PartialFixedSampler` to handle `None` correctly (4147, thanks halucinor!)
- Fix the bug of JournalFileStorage on Windows (4151)
- Fix CmaEs system attribution key (4184)

Installation

- Replace `thop` with `fvcore` (3906)
- Use the latest stable scipy (3959, thanks gasin!)
- Remove GPyTorch version constraint (3986)
- Make typing_extensions optional (3990)
- Add version constraint on `importlib-metadata` (4036)
- Add a version constraint of `matplotlib` (4044)

Documentation

- Update cli tutorial (3902)
- Replace `thop` with `fvcore` (3906)
- Slightly improve docs of `FrozenTrial` (3943)
- Refine docs in `BaseStorage` (3948)
- Remove "Edit on GitHub" button from readthedocs (3952)
- Mention restoring sampler in saving/resuming tutorial (3992)
- Use `log_loss` instead of deprecated `log` since `sklearn` 1.1 (3993)
- Fix script path in benchmarks/README.md (4021)
- Ignore `ConvergenceWarning` in the ask-and-tell tutorial (4032)
- Update docs to let users know the concurrency problem on SQLite3 (4034)
- Fix the time complexity of `NSGAIISampler` (4045)
- Fix sampler comparison table (4082)
- Add `BruteForceSampler` in the samplers' list (4152)
- Remove markup from NaN in FAQ (4155)
- Remove the document of the `multi_objective` module (4167)
- Fix a typo in `QMCSampler` (4179)
- Introduce Optuna Dashboard in tutorial docs (4226)
- Remove `RedisStorage` from docstring (4232)
- Add the `BruteForceSampler` example to the document (4244)
- Improve the document of `BruteForceSampler` (4245)
- Fix an inline markup in distributed tutorial (4247)

Examples

- Add Dask example (https://github.com/optuna/optuna-examples/pull/46, thanks jrbourbeau!)
- Hotfix for botorch example (https://github.com/optuna/optuna-examples/pull/134)
- Replace `thop` with `fvcore` (https://github.com/optuna/optuna-examples/pull/136)
- Add `Optuna-distributed` to external projects (https://github.com/optuna/optuna-examples/pull/137)
- Remove the version constraint of GPyTorch (https://github.com/optuna/optuna-examples/pull/138)
- Fix a file path in `CONTRIBUTING.md` (https://github.com/optuna/optuna-examples/pull/139)
- Install `scikit-learn` instead of `sklearn` (https://github.com/optuna/optuna-examples/pull/141)
- Add constraint on `tensorflow` to `<2.11.0` (https://github.com/optuna/optuna-examples/pull/146)
- Specify botorch version (https://github.com/optuna/optuna-examples/pull/151)
- Pin numpy version to `1.23.x` for mxnet examples (https://github.com/optuna/optuna-examples/pull/154)

Tests

- Suppress warnings in `tests/test_distributions.py` (3912)
- Suppress warnings and minor code fixes in `tests/trial_tests` (3914)
- Reduce warning messages by `tests/study_tests/` (3915)
- Remove dynamic search space based objective from a parallel job test (3916)
- Remove all warning messages from `tests/integration_tests/test_sklearn.py` (3922)
- Remove out-of-range related warning messages from `MLflowCallback` and `WeightsAndBiasesCallback` (3923)
- Ignore `RuntimeWarning` when `nanmin` and `nanmax` take an array only containing nan values from `pruners_tests` (3924)
- Remove warning messages from test files for `pytorch_distributed` and `chainermn` modules (3927)
- Remove warning messages from `tests/integration_tests/test_lightgbm.py` (3944)
- Resolve warnings in `tests/visualization_tests/test_contour.py` (3954)
- Reduced warning messages from `tests/visualization_tests/test_slice.py` (3970, thanks jmsykes83!)
- Remove warning from a few visualizaiton tests (3989)
- Deselect integration tests in Tests CI (4013)
- Remove warnings from `tests/visualization_tests/test_optimization_history.py` (4024)
- Unset `PYTHONHASHSEED` for the hash-depedenet test (4031)
- Test: calling `study.tell` from another process (4039, thanks Abelarm!)
- Improve test for heartbeat: Add test for the case that trial state should be kept running (4055)
- Remove warnings in the test of Paretopereto front (4072)
- Remove matplotlib `get_cmap` warning from `tests/visualization_tests/test_param_importances.py` (4095)
- Reduce tests' `n_trials` for CI time reduction (4117)
- Skip `test_pop_waiting_trial_thread_safe` on RedisStorage (4119)
- Simplify the test of `BruteForceSampler` for infinite search space (4153)
- Add sep-CMA-ES in `parametrize_sampler` (4154)
- Fix a broken test for `dask.distributed` integration (4170)
- Add `DaskStorage` to existing storage tests (4176, thanks jrbourbeau!)
- Fix a test error in `test_catboost.py` (4190)
- Remove `test/integration_tests/test_sampler.py` (4204)

Code Fixes

- Refactor `_tell.py` (3841)
- Make log message user-friendly when objective returns a sequence of unsupported values (3868)
- Gather mask of None parameter in `TPESampler` (3886)
- Update cli tutorial (3902)
- Migrate CLI from `cliff` to `argparse` (4100)
- Enable mypy `--no-implicit-reexport` option (4110)
- Remove unused function: `find_any_distribution` (4127)
- Remove object inheritance from base classes (4161)
- Use mlflow 2.0.1 syntax (4173)
- Simplify implementation of `_preprocess_argv` in CLI (4187)
- Move `_solve_hssp` to `_hypervolume/utils.py` (4227, thanks jpbianchi!)
- Avoid to decode log string in `JournalRedisStorage` (4246)

Continuous Integration

- Hotfix `botorch` module by adding the version constraint of `gpytorch` (3950)
- Drop python 3.6 from integration CIs (3983)
- Use PyTorch 1.11 for consistency and fix a typo (3987)
- Support Python 3.11 (4018)
- Remove ` type: ignore` for mypy 0.981 (4019)
- Fix metric inconsistency between bayesmark plots and report (4077)
- Pin Ubuntu version to 20.04 in `Tests` and `Tests (Storage with server)` (4118)
- Add workflow to test Optuna with lower versions of constraints (4125)
- Mark some tests slow and ignore in pull request trigger (4138, thanks mist714!)
- Allow display names to be changed in benchmark scripts (Issue 4017) (4145)
- Disable scheduled workflow runs in forks (4159)
- Remove the CircleCI job `document` (4160)
- Stop running reproducibility tests on CI for PR (4162)
- Stop running reproducibility tests for coverage (4163)
- Add `workflow_dispatch` trigger to the integration tests (4166)
- [hotfix] Fix CI errors when using `mlflow==2.0.1` (4171)
- Add `fakeredis` in benchmark deps (4177)
- Fix `asv` speed benchmark (4185)
- Skip tests with minimum version for Python 3.10 and 3.11 (4199)
- Split normal tests and tests with minimum versions (4200)
- Update action/checkoutv2 -> v3 (4206)
- Update actions/stalev5 -> v6 (4208)
- Pin `botorch` to avoid CI failure (4228)
- Add the `pytest` dependency for asv (4243)

Other

- Bump up version number to 3.1.0.dev (3934)
- Remove the news section on README (3940)
- Add issue template for code fix (3968)
- Close stale issues immediately after labeling `stale` (4071)
- Remove `tox.ini` (4078)
- Replace gitter with GitHub Discussions (4083)
- Deprecate description-checked label (4090)
- Make `days-before-issue-stale` 300 days (4091)
- Unnecessary space removed (4109, thanks gonzaload!)
- Add note not to share pickle files in bug reports (4212)
- Update the description of optuna-dashboard on README (4217)
- Remove `optuna.TYPE_CHECKING` (4238)
- Bump up version to v3.1.0-b0 (4262)

Thanks to All the Contributors!

This release was made possible by the authors and the people who participated in the reviews and discussions.

Abelarm, Alnusjaponica, HideakiImamura, amylase, belldandyxtq, c-bata, contramundum53, cross32768, erentknn, eukaryo, g-votte, gasin, gen740, gonzaload, halucinor, himkt, hvy, jmsykes83, jpbianchi, jrbourbeau, keisuke-umezawa, knshnb, mist714, ncclementi, not522, nzw0301, rene-rex, semiexp, shu65, sile, toshihikoyanase, wattlebirdaz, xadrianzetx, zaburo-ch

3.6.1

This is the release note of [v3.6.1](https://github.com/optuna/optuna/milestone/62?closed=1).

Bug Fixes

- [Backport] Fix Wilcoxon pruner bug when best_trial has no intermediate value 5370
- [Backport] Address issue5358 (5371)
- [Backport] Fix `average_is_best` implementation in `WilcoxonPruner` (5373)

Other

- Bump up version number to v3.6.1 (5372)

Thanks to All the Contributors!

This release was made possible by the authors and the people who participated in the reviews and discussions.

HideakiImamura, eukaryo, nabenabe0928

3.6.0

This is the release note of [v3.6.0](https://github.com/optuna/optuna/milestone/60?closed=1).

Highlights

Optuna 3.6 newly supports the following new features. See [our release blog](https://medium.com/optuna/announcing-optuna-3-6-f5d7efeb5620) for more detailed information.
- Wilcoxon Pruner: New Pruner Based on Wilcoxon Signed-Rank Test
- Lightweight Gaussian Process (GP)-Based Sampler
- Speeding up Importance Evaluation with PED-ANOVA
- Stricter Verification Logic for FrozenTrial
- Refactoring the Optuna Dashboard
- Migration to Optuna Integration

Breaking Changes

- Implement `optuna.terminator` using `optuna._gp` (5241)

These migration-related PRs do not break the backward compatibility as long as optuna-integration v3.6.0 or later is installed in your environment.

- Move TensorBoard Integration (https://github.com/optuna/optuna-integration/pull/56, thanks dheemantha-bhat!)
- Delete TensorBoard integration for migration to `optuna-integration` (5161, thanks dheemantha-bhat!)
- Remove CatBoost integration for isolation (5198)
- Remove PyTorch integration (5213)
- Remove Dask integration (5222)
- Migrate the `sklearn` integration (5225)
- Remove BoTorch integration (5230)
- Remove `SkoptSampler` (5234)
- Remove the `cma` integration (5236)
- Remove the `wandb` integration (5237)
- Remove XGBoost Integration (5239)
- Remove MLflow integration (5246)
- Migrate LightGBM integration (5249)
- Add CatBoost integration (https://github.com/optuna/optuna-integration/pull/61)
- Add PyTorch integration (https://github.com/optuna/optuna-integration/pull/62)
- Add XGBoost integration (https://github.com/optuna/optuna-integration/pull/65, thanks buruzaemon!)
- Add `sklearn` integration (https://github.com/optuna/optuna-integration/pull/66)
- Move Dask integration (https://github.com/optuna/optuna-integration/pull/67)
- Migrate BoTorch integration (https://github.com/optuna/optuna-integration/pull/72)
- Move `SkoptSampler` (https://github.com/optuna/optuna-integration/pull/74)
- Migrate `pycma` integration (https://github.com/optuna/optuna-integration/pull/77)
- Migrate the Weights & Biases integration (https://github.com/optuna/optuna-integration/pull/79)
- Add LightGBM integration (https://github.com/optuna/optuna-integration/pull/81, thanks DanielAvdar!)
- Migrate `MLflow` integration (https://github.com/optuna/optuna-integration/pull/84)

New Features

- Backport the change of the timeline plot in Optuna Dashboard (5168)
- Wilcoxon pruner (5181)
- Add `GPSampler` (5185)
- Add a super quick f-ANOVA algorithm named PED-ANOVA (5212)

Enhancements

- Add `formats.sh` based on `optuna/master` (https://github.com/optuna/optuna-integration/pull/75)
- Use vectorization for categorical distance (5147)
- Unify implementation of fast non-dominated sort (5160)
- Raise `TypeError` if `params` is not a `dict` in `enqueue_trial` (5164, thanks adjeiv!)
- Upgrade `FrozenTrial._validate()` (5211)
- Import SQLAlchemy lazily (5215)
- Add UCB for `optuna._gp` (5224)
- Enhance performance of `GPSampler` (5274)
- Fix inconsistencies between terminator and its visualization (5276, thanks SimonPop!)
- Enhance `GPSampler` performance other than introducing local search (5279)

Bug Fixes

- Fix import path (https://github.com/optuna/optuna-integration/pull/83)
- Fix `README.md` (https://github.com/optuna/optuna-integration/pull/88)
- Fix `LightGBMTuner` test (https://github.com/optuna/optuna-integration/pull/89)
- Fix `JSONDecodeError` in `JournalStorage` (5195)
- Fix trial validation (5229)
- Make `gp.fit_kernel_params` more robust (5247)
- Fix checking value in `study.tell` (5269, thanks ryota717!)
- Fix `_split_trials` of `TPESampler` for constrained optimization with constant liar (5298)
- Make each importance evaluator compatible with doc (5311)

Documentation

- Remove `study optimize` from CLI tutorial page (5152)
- Clarify the `GridSampler` with ask-and-tell interface (5153)
- Clean-up `faq.rst` (5170)
- Make Methods section hidden from Artifact Docs (5188)
- Enhance README (5189)
- Add a new section explaing how to customize figures (5194)
- Replace legacy `plotly.graph_objs` with `plotly.graph_objects` (5223)
- Add a note section to explain that reseed affects reproducibility (5233)
- Update links to papers (5235)
- adding link for module's example to documetation for the `optuna.terminator` module (5243, thanks HarshitNagpal29!)
- Replace the old example directory (5244)
- Add Optuna Dashboard section to docs (5250, thanks porink0424!)
- Add a safety guard to Wilcoxon pruner, and modify the docstring (5256)
- Replace LightGBM with PyTorch-based example to remove `lightgbm` dependency in visualization tutorial (5257)
- Remove unnecessary comment in `Specify Hyperparameters Manually` tutorial page (5258)
- Add a tutorial of Wilcoxon pruner (5266)
- Clarify that pruners module does not support multi-objective optimization (5270)
- Minor fixes (5275)
- Add a guide to PED-ANOVA for `n_trials>10000` (5310)
- Minor fixes of docs and code comments for `PedAnovaImportanceEvaluator` (5312)
- Fix doc for `WilcoxonPruner` (5313)
- Fix doc example in `WilcoxonPruner` (5315)

Examples

- Remove Python 3.7 and 3.8 from tensorboard CI (https://github.com/optuna/optuna-examples/pull/231)
- Specify black version in the CI (https://github.com/optuna/optuna-examples/pull/232)
- Apply Black 2024 to codebase (https://github.com/optuna/optuna-examples/pull/236)
- Remove MXNet examples (https://github.com/optuna/optuna-examples/pull/237)
- Add an example of Wilcoxon pruner (https://github.com/optuna/optuna-examples/pull/238)
- Make Keras examples Keras 3 friendly (https://github.com/optuna/optuna-examples/pull/239)
- Remove a comment for keras that is not used anymore in this file (https://github.com/optuna/optuna-examples/pull/240)
- Use Keras 3 friendly syntax in MLflow example (https://github.com/optuna/optuna-examples/pull/242)
- Remove `-pre` option in the `rl` integration (https://github.com/optuna/optuna-examples/pull/243)
- Hotfix CI by adding version constraints to `dask` and `tensorflow` (https://github.com/optuna/optuna-examples/pull/245)

Tests

- Unify the implementation of `_create_frozen_trial()` under `testing` module (5157)
- Remove the Python version constraint for PyTorch (5278)

Code Fixes

- Fix unused (and unintended) import (https://github.com/optuna/optuna-integration/pull/68)
- Add Dask to `__init__.py` and fix its documentation generation (https://github.com/optuna/optuna-integration/pull/71)
- Replace `optuna.integration` with `optuna_integration` in the doc and the issue template (https://github.com/optuna/optuna-integration/pull/73)
- Fix the doc for TensorFlow (https://github.com/optuna/optuna-integration/pull/76)
- Add skopt dependency (https://github.com/optuna/optuna-integration/pull/78)
- Fastai readme fix (https://github.com/optuna/optuna-integration/pull/82, thanks DanielAvdar!)
- Fix `__init__.py` (https://github.com/optuna/optuna-integration/pull/86)
- Apply Black 2024 to codebase (https://github.com/optuna/optuna-integration/pull/87)
- Change the order of dependencies by name (https://github.com/optuna/optuna-integration/pull/92)
- Remove the deprecated decorator of `KerasPruningCallback` (https://github.com/optuna/optuna-integration/pull/93)
- Remove `UserWarning` by `tests/test_keras.py` (https://github.com/optuna/optuna-integration/pull/94)
- Refactor `TPESampler` for more clarity before c-TPE integration (5117)
- Fix `Checks(integration)` failure (5167)
- Fix type annotation of logging (5176)
- Update NamedTuple in `_ParzenEstimatorParameters` to more modern style (5193)
- Apply Black 2024 to codebase (5252)
- Simplify annotations in `optuna/study/_optimize.py` (5261, thanks shahpratham!)
- Unify and refactor `plot_timeline` test (5281)

Continuous Integration

- Remove non oldest and latest Python versions from tests (https://github.com/optuna/optuna-integration/pull/44)
- Fix flake8 failure in CI (https://github.com/optuna/optuna-integration/pull/55)
- Delete workflow dispatch input (https://github.com/optuna/optuna-integration/pull/57)
- Fix default branch (https://github.com/optuna/optuna-integration/pull/58)
- Fix coverage source path (https://github.com/optuna/optuna-integration/pull/60)
- Not use `black 24.*` (https://github.com/optuna/optuna-integration/pull/64)
- Simplify integration test (https://github.com/optuna/optuna-integration/pull/95)
- Hotfix the version of `botorch<0.10.` for CI failures (https://github.com/optuna/optuna-integration/pull/96)
- Hotfix the CI error by adding version constraint to dask (https://github.com/optuna/optuna-integration/pull/99)
- Fix tests with MPI (5166)
- Fix Checks (Integration) CI for NumPy 1.23.5 (5177)
- Add version constraint for black (5210)
- Skip the reproducibility tests for lightgbm (5214)
- Fix the errors in mypy for the `Checks (Integration)` CI (5217)
- Add a version constraint for Torch (5221)
- Hotfix mypy error in integration (5232)
- Skip `test_reproducible_in_other_process` for `GPSampler` with Python 3.12 (5251)
- Add CI settings to test Matplotlib without Plotly (5263, thanks DanielAvdar!)
- Unify indent size, two in toml file (5271)
- Follow up for split integrations (5277)
- Add a version constraint to `fakeredis` (5307)

Other

- Bump up version number to 3.6.0.dev (https://github.com/optuna/optuna-integration/pull/53)
- Bump up version number to 3.6.0 (https://github.com/optuna/optuna-integration/pull/100)
- Bump the version up to v3.6.0.dev (5143)
- Ignore auto generated files by Sphinx (5192)
- Delete `labeler.yml` to disable the `triage` action (5240)
- Bump up to version number 3.6.0 (5318)

Thanks to All the Contributors!

This release was made possible by the authors and the people who participated in the reviews and discussions.

Alnusjaponica, DanielAvdar, HarshitNagpal29, HideakiImamura, SimonPop, adjeiv, buruzaemon, c-bata, contramundum53, dheemantha-bhat, eukaryo, gen740, hrntsm, knshnb, nabenabe0928, not522, nzw0301, porink0424, ryota717, shahpratham, toshihikoyanase, y0z

3.5.0

This is the release note of [v3.5.0](https://github.com/optuna/optuna/milestone/59?closed=1).

Highlights

This is a maintenance release with various bug fixes and improvements to the documentation and more.

Breaking Changes

- Isolate the fast.ai module from optuna (https://github.com/optuna/optuna-integration/pull/49, thanks sousu4!)
- Change `n_objectives` condition to be greater than 4 in candidates functions (5121, thanks adjeiv!)

New Features

- Support constraints in plot contour (4975, thanks y-kamiya!)
- Support infeasible coloring for plot_timeline (5014)
- Support `constant_liar` in multi-objective `TPESampler` (5021)
- Add `optuna study-names` cli (5029)
- Use `ExpectedHypervolumeImprovement` candidates function for `BotorchSampler` (5065, thanks adjeiv!)
- Fix logei_candidates_func in `botorch.py` (5094, thanks sousu4!)
- Report CV scores from within `OptunaSearchCV` (5098, thanks adjeiv!)

Enhancements

- Support `constant_liar` in multi-objective `TPESampler` (5021)
- Make positional args to kwargs in suggest_int (5044)
- Ensure n_below is never negative in TPESampler (5074, thanks p1kit!)
- Improve visibility of infeasible trials in `plot_contour` (5107)

Bug Fixes

- Fix random number generator of `NSGAIIChildGenerationStrategy` (5003)
- Return `trials` for above in MO split when `n_below=0` (5079)
- Enable loading of read-only files (5103, thanks Guillaume227!)
- Fix `logpdf` for scaled `truncnorm` (5110)
- Fix the bug of matplotlib's plot_rank function (5133)

Documentation

- Add the table of dependencies in each integration module (5005)
- Enhance the documentation of `LightGBM` tuner and separate `train()` from `__init__.py` (5010)
- Update link to reference (5064)
- Update the FAQ on reproducible optimization results to remove note on `HyperbandPruner` (5075, thanks felix-cw!)
- Remove `MOTPESampler` from `index.rst` file (5084, thanks Ashhar-24!)
- Add a note about the deprecation of `MOTPESampler` to the doc (5086)
- Add the TPE tutorial paper to the doc-string (5096)
- Update `README.md` to fix the installation and integration (5126)
- Clarify that `Recommended budgets` include `n_startup_trials` (5137)

Examples

- Update version syntax for PyTorch and PyTorch Lightning examples (https://github.com/optuna/optuna-examples/pull/205, thanks JustinGoheen!)
- Update import path (https://github.com/optuna/optuna-examples/pull/213)
- Bump up python versions (https://github.com/optuna/optuna-examples/pull/214)
- Add the simplest example directly to README (https://github.com/optuna/optuna-examples/pull/215)
- Add simples examples for multi-objective and constrained optimizations (https://github.com/optuna/optuna-examples/pull/216)
- Revise the comment to describe the problem (https://github.com/optuna/optuna-examples/pull/217)
- Modify simple examples based on the Optuna code conventions (https://github.com/optuna/optuna-examples/pull/218)
- Remove version specification of `jax` and `jaxlib` (https://github.com/optuna/optuna-examples/pull/223)
- Import examples from `optuna/optuna-dashboard` (https://github.com/optuna/optuna-examples/pull/224)
- Add `OptunaSearchCV` with terminator (https://github.com/optuna/optuna-examples/pull/225)
- Drop python 3.8 from haiku test (https://github.com/optuna/optuna-examples/pull/227)
- Run MXNet in Python 3.11 (https://github.com/optuna/optuna-examples/pull/228)

Tests

- Remove tests for allennlp and chainer (https://github.com/optuna/optuna-integration/pull/47)
- Reduce the warning in `tests/study_tests/test_study.py` (5070, thanks sousu4!)

Code Fixes

- Implement NSGA-III elite population selection strategy (5027)
- Fix import path of `PyTorchLightning` (5028)
- Fix `Any` with `float` in `_TreeNode.children` (5040, thanks aanghelidi!)
- Fix future annotation in `typing.py` (5054, thanks jot-s-bindra!)
- Add future annotations to callback and terminator files inside terminator folder (5055, thanks jot-s-bindra!)
- Fix future annotations to edf python file (5056, thanks Vaibhav101203!)
- Fix future annotations in _hypervolume_history.py (5057, thanks Vaibhav101203!)
- Reduce the warning in `tests/storages_tests/test_heartbeat.py` (5066, thanks sousu4!)
- Fix future annotation to `frozen.py` (5080, thanks Vaibhav101203!)
- Fix annotation for `dataframe.py` (5081, thanks Vaibhav101203!)
- Fix future annotation (5083, thanks Vaibhav101203!)
- Fix type annotation (5105)
- Fix mypy error in CI (5106)
- Isolate the fast.ai module (5120, thanks sousu4!)
- Clean up workflow file (5122)

Continuous Integration

- Run `test_tensorflow` in Python 3.11 (https://github.com/optuna/optuna-integration/pull/46)
- Exclude mypy checks for chainer (https://github.com/optuna/optuna-integration/pull/48)
- Support Python 3.12 on tests for core modules (5018)
- Fix the issue where formats.sh does not handle tutorial/ (5023, thanks sousu4!)
- Skip slow integration tests (5033)
- Install PyTorch for CPU on CIs (5042)
- Remove unused `type: ignore` (5047)
- Reduce `tests-mpi` to the oldest and latest Python versions (5067)
- Add workflow matrices for the tests to reduce GitHub check runtime (5093)
- Remove the skip of Python 3.11 in `tests-mpi` (5100)
- Downgrade kaleido to 0.1.0post1 for fixing Windows CI (5101)
- Rename `should-skip` to `test-trigger-type` for more clarity (5134)
- Pin the version of PyQt6-Qt6 (5135)
- Revert `Pin the version of PyQt6-Qt6` (5140)

Other

- Bump up version to v3.5.0.dev (https://github.com/optuna/optuna-integration/pull/43)
- Bump up version number to 3.5.0 (https://github.com/optuna/optuna-integration/pull/52)
- Bump the version up to v3.5.0.dev (5032)
- Remove email of authors (5078)
- Update the integration sections in `README.md` (5108)
- Pin mypy version to 1.6.* (5123)
- Remove `!examples` from `.dockerignore` (5129)

Thanks to All the Contributors!

This release was made possible by the authors and the people who participated in the reviews and discussions.

Alnusjaponica, Ashhar-24, Guillaume227, HideakiImamura, JustinGoheen, Vaibhav101203, aanghelidi, adjeiv, c-bata, contramundum53, eukaryo, felix-cw, gen740, jot-s-bindra, keisuke-umezawa, knshnb, nabenabe0928, not522, nzw0301, p1kit, sousu4, toshihikoyanase, y-kamiya

3.4.0

This is the release note of [v3.4.0](https://github.com/optuna/optuna/milestone/58?closed=1).

Highlights

Optuna 3.4 newly supports the following new features. See [our release blog](https://medium.com/optuna/announcing-optuna-3-4-0087644c92fa) for more detailed information.

* Preferential Optimization (Optuna Dashboard)
* Optuna Artifact
* Jupyter Lab Extension
* VS Code Extension
* User-defined Distance for Categorical Parameters in TPE
* Constrained Optimization Support for Visualization Functions
* User-Defined Plotly’s Figure Support (Optuna Dashboard)
* 3D Model Viewer Support (Optuna Dashboard)

Breaking Changes

- Remove deprecated arguments with regard to `LightGBM>=4.0` (4844)
- Deprecate `SkoptSampler` (4913)

New Features

- Support constraints for intermediate values plot (4851, thanks adjeiv!)
- Display all objectives on hyperparameter importances plot (4871)
- Implement `get_all_study_names()` (4898)
- Support constraints `plot_rank` (4899, thanks ryota717!)
- Support Study Artifacts (4905)
- Support specifying distance between categorical choices in `TPESampler` (4926)
- Add `metric_names` getter to study (4930)
- Add artifact middleware for exponential backoff retries (4956)
- Add `GCSArtifactStore` (4967, thanks semiexp!)
- Add `BestValueStagnationEvaluator` (4974, thanks smygw72!)
- Allow user-defined objective names in hyperparameter importance plots (4986)

Enhancements

- CHG constrained param displayed in cccccc (4877, thanks louis-she!)
- Faster implementation of fANOVA (4897)
- Support constraint in plot slice (4906, thanks hrntsm!)
- Add mimetype input (4910, thanks hrntsm!)
- Show all ticks in `_parallel_coordinate.py` when log scale (4911)
- Speed up multi-objective TPE (5017)

Bug Fixes

- Fix numpy indexing bugs and named tuple comparing (4874, thanks ryota717!)
- Fix `fail_stale_trials` with race condition (4886)
- Fix alias handler (4887)
- Add lazy random state and use it in `RandomSampler` (4970, thanks shu65!)
- Fix TensorBoard error on categorical choices of mixed types (4973, thanks ciffelia!)
- Use lazy random state in samplers (4976, thanks shu65!)
- Fix an error that does not consider `min_child_samples` (5007)
- Fix `BruteForceSampler` in parallel optimization (5022)

Documentation

- Fix typo in `_filesystem.py` (4909)
- Mention a pruner instance is not stored in a storage in resuming tutorial (4927)
- Add introduction of `optuna-fast-fanova` in documents (4943)
- Add artifact tutorial (4954)
- Fix an example code in `Boto3ArtifactStore`'s docstring (4957)
- Add tutorial for `JournalStorage` (4980, thanks semiexp!)
- Fix document regarding `ArtifactNotFound` (4982, thanks smygw72!)
- Add the workaround for duplicated samples to FAQ (5006)

Examples

- Add huggingface's link to external projects (https://github.com/optuna/optuna-examples/pull/201)
- Fix samplers CI (https://github.com/optuna/optuna-examples/pull/202)
- Set version constraint on aim (https://github.com/optuna/optuna-examples/pull/206)
- Add an example of Optuna Terminator for LightGBM (https://github.com/optuna/optuna-examples/pull/210, thanks hamster-86!)

Tests

- Reduce `n_trials` in `test_combination_of_different_distributions_objective` (4950)
- Replaces California housing dataset with iris dataset (4953)
- Fix numpy duplication warning (4978, thanks torotoki!)
- Make test order deterministic for `pytest-xdist` (4999)

Code Fixes

- Move shap (https://github.com/optuna/optuna-integration/pull/32)
- Remove shap (4791)
- Use `isinstance` instead of `if type() is ...` (4896)
- Make `cmaes` dependency optional (4901)
- Call internal sampler's `before_trial` (4914)
- Refactor `_grid.py` (4918)
- Fix the `checks-integration` errors on LightGBMTuner (4923)
- Replace deprecated `botorch` method to remove warning (4940)
- Fix type annotation (4941)
- Add `_split_trials` instead of `_get_observation_pairs` and `_split_observation_pairs` (4947)
- Use `__future__.annotations` in `optuna/visualization/_optimization_history.py` (4964, thanks YuigaWada!)
- Fix 4508 for `optuna/visualization/_hypervolume_history.py` (4965, thanks RuTiO2le!)
- Use future annotation in `optuna/_convert_positional_args.py` (4966, thanks hamster-86!)
- Fix type annotation of `SQLAlchemy` (4968)
- Use `collections.abc` in `optuna/visualization/_edf.py` (4969, thanks g-tamaki!)
- Use `collections.abc` in plot pareto front (4971)
- Remove `experimental_func` from `metric_names` property (4983, thanks semiexp!)
- Add `__future__.annotations` to `progress_bar.py` (4992)
- Fix annotations in `optuna/optuna/visualization/matplotlib/_optimization_history.py` (5015, thanks sousu4!)

Continuous Integration

- Fix checks integration (4869)
- Remove fakeredis version constraint (4873)
- Support `asv` 0.6.0 (4882)
- Fix speed-benchmarks CI (4903)
- Fix Tests (MPI) CI (4904)
- Fix xgboost pruning callback (4921)
- Enhance speed benchmark (4981, thanks g-tamaki!)
- Drop Python 3.7 on `tests-mpi` (4998)
- Remove Python 3.7 from the development docker image build (5009)
- Use CPU version of PyTorch in Docker image (5019)

Other

- Bump up version number to v3.4.0.dev (https://github.com/optuna/optuna-integration/pull/37)
- Update python shield in `README.md` (https://github.com/optuna/optuna-integration/pull/39)
- Replace deprecated mypy option (https://github.com/optuna/optuna-integration/pull/40)
- Bump up version to v3.4.0 (https://github.com/optuna/optuna-integration/pull/42)
- Bump the version up to v3.4.0.dev (4861)
- Use OIDC (4867)
- Add `FUNDING.yml` (4912)
- Update `optional-dependencies` and document deselecting integration tests in `CONTRIBUTING.md` (4962)
- Bump the version up to v3.4.0 (5031)

Thanks to All the Contributors!

This release was made possible by the authors and the people who participated in the reviews and discussions.

Alnusjaponica, HideakiImamura, RuTiO2le, YuigaWada, adjeiv, c-bata, ciffelia, contramundum53, cross32768, eukaryo, g-tamaki, g-votte, gen740, hamster-86, hrntsm, hvy, keisuke-umezawa, knshnb, lucasmrdt, louis-she, moririn2528, nabenabe0928, not522, nzw0301, ryota717, semiexp, shu65, smygw72, sousu4, torotoki, toshihikoyanase, xadrianzetx

3.3.0

This is the release note of [v3.3.0](https://github.com/optuna/optuna/milestone/57?closed=1).

Highlights

CMA-ES with Learning Rate Adaptation

A new variant of CMA-ES has been added. By setting the `lr_adapt` argument to `True` in `CmaEsSampler`, you can utilize it. For multimodal and/or noisy problems, adapting the learning rate can help avoid getting trapped in local optima. For more details, please refer to 4817. We want to thank nomuramasahir0, one of the authors of LRA-CMA-ES, for his great work and the development of [cmaes](https://github.com/CyberAgentAILab/cmaes) library.


<img width="513" alt="256118903-6796d0c4-3278-4d99-bdb2-00b6fe0fa13b" src="https://github.com/optuna/optuna/assets/5564044/50ed3200-2e02-4b10-8ad1-1f237cb3f3ea">


Hypervolume History Plot for Multiobjective Optimization

In multiobjective optimization, the history of hypervolume is commonly used as an indicator of performance. Optuna now supports this feature in the visualization module. Thanks to y0z for your great work!

![246094447-f17d5961-216a-44b3-b9ce-715c105445a7](https://github.com/optuna/optuna/assets/5564044/36350c77-87e1-44e2-83e4-4a4a9480bfde)


Constrained Optimization Support for Visualization Functions

| Plotly | matplotlib |
| --- | --- |
| ![constrained-optimization-history-plot (1)](https://github.com/optuna/optuna/assets/5564044/942316ac-0e04-4ff8-97a9-dea02fd45f9c) | <img width="1056" alt="254270811-e85c3c5e-44e5-4a04-ba8a-f6ea2c53611f (1)" src="https://github.com/optuna/optuna/assets/5564044/c043c79b-a6ad-46bc-92f5-fd54ee61f995"> |

Some samplers support constrained optimization, however, many other features cannot handle it. We are continuously enhancing support for constraints. In this release, `plot_optimization_history` starts to consider constraint violations. Thanks to hrntsm for your great work!

python
import optuna

def objective(trial):
x = trial.suggest_float("x", -15, 30)
y = trial.suggest_float("y", -15, 30)
v0 = 4 * x**2 + 4 * y**2
trial.set_user_attr("constraint", [1000 - v0])
return v0

def constraints_func(trial):
return trial.user_attrs["constraint"]

sampler = optuna.samplers.TPESampler(constraints_func=constraints_func)
study = optuna.create_study(sampler=sampler)
study.optimize(objective, n_trials=100)
fig = optuna.visualization.plot_optimization_history(study)
fig.show()



Streamlit Integration for Human-in-the-loop Optimization

<img width="1127" alt="streamlit_integration" src="https://github.com/optuna/optuna/assets/5564044/e8ea5d13-c834-4ed3-8c7b-24ab07c37105">

[Optuna Dashboard v0.11.0](https://github.com/optuna/optuna-dashboard/releases/tag/v0.11.0) provides the tight integration with [Streamlit](https://streamlit.io/) framework. By using this feature, you can create your own application for human-in-the-loop optimization. Please check out [the documentation](https://optuna-dashboard.readthedocs.io/en/latest/api.html#streamlit) and [the example](https://github.com/optuna/optuna-dashboard/tree/main/examples/streamlit_plugin) for details.


Breaking Changes

- Move mxnet (https://github.com/optuna/optuna-integration/pull/31)
- Remove mxnet (4790)
- Remove `ordered_dict` argument from `IntersectionSearchSpace` (4846)

New Features

- Add `logei_candidate_func` and make it default when available (4667)
- Support `JournalFileStorage` and `JournalRedisStorage` on CLI (4696)
- Implement hypervolume history plot for matplotlib backend (4748, thanks y0z!)
- Add `cv_results_` to `OptunaSearchCV` (4751, thanks jckkvs!)
- Add `optuna.integration.botorch.qnei_candidates_func` (4753, thanks kstoneriv3!)
- Add hypervolume history plot for `plotly` backend (4757, thanks y0z!)
- Add `FileSystemArtifactStore` (4763)
- Sort params on fetch (4775)
- Add constraints support to `_optimization_history_plot` (4793, thanks hrntsm!)
- Bump up `LightGBM` version to v4.0.0 (4810)
- Add constraints support to `matplotlib._optimization_history_plot` (4816, thanks hrntsm!)
- Introduce CMA-ES with Learning Rate Adaptation (4817)
- Add `upload_artifact` api (4823)
- Add `before_trial` (4825)
- Add `Boto3ArtifactStore` (4840)
- Display best objective value in contour plot for a given param pair, not the value from the most recent trial (4848)

Enhancements

- Speed up `logpdf` in `_truncnorm.py` (4712)
- Speed up `erf` (4713)
- Speed up `get_all_trials` in `InMemoryStorage` (4716)
- Add a warning for a progress bar not being displayed 4679 (4728, thanks rishabsinghh!)
- Make `BruteForceSampler` consider failed trials (4747)
- Use shallow copy in `_get_latest_trial` (4774)
- Speed up `plot_hypervolume_history` (4776)

Bug Fixes

- Solve issue 4557 - error_score (4642, thanks jckkvs!)
- Fix `BruteForceSampler` for pruned trials (4720)
- Fix `plot_slice` bug when some of the choices are numeric (4724)
- Make `LightGBMTuner` reproducible (4795)

Installation

- Bump up python version (https://github.com/optuna/optuna-integration/pull/34)

Documentation

- Remove `jquery-extension` (4691)
- Add FAQ on combinatorial search space (4723)
- Fix docs (4732)
- Add `plot_rank` and `plot_timeline` plots to visualization tutorial (4735)
- Fix typos found in `integration/sklearn.py` (4745)
- Remove `study.n_objectives` from document (4796)
- Add lower version constraint for `sphinx_rtd_theme` (4853)
- Artifact docs (4855)

Examples

- Run DaskML example with Python 3.11 (https://github.com/optuna/optuna-examples/pull/188)
- Show more information in terminator examples (https://github.com/optuna/optuna-examples/pull/192)
- Drop support for Python 3.7 on Haiku (https://github.com/optuna/optuna-examples/pull/198)
- Add `LICENSE` file (https://github.com/optuna/optuna-examples/pull/200)

Tests

- Remove unnecessary `pytestmark` (https://github.com/optuna/optuna-integration/pull/29)
- Add `GridSampler` test for failed trials (4721)
- Follow up PR 4642 by adding a unit test to confirm `OptunaSearchCV` behavior (4758)
- Fix `test_log_gass_mass` with SciPy 1.11.0 (4766)
- Fix Pytorch lightning unit test (4780)
- Remove skopt (4792)
- Rename test directory (4839)

Code Fixes

- Simplify the type annotations in `benchmarks` (4703, thanks caprest!)
- Unify sampling implementation in `TPESampler` (4717)
- Get values after `_get_observation_pairs` (4742)
- Remove unnecessary period (4746)
- Handle deprecated argument `early_stopping_rounds` (4752)
- Separate dominate function from `_fast_non_dominated_sort()` (4759)
- Separate `after_trial` strategy (4760)
- Remove unused attributes in `TPESampler` (4769)
- Remove `pkg_resources` (4770)
- Use trials as argument of `_calculate_weights_below_for_multi_objective` (4773)
- Fix type annotation (4797, thanks taniokay!)
- Follow up separation of after trial strategy (4803)
- Loose coupling nsgaii child generation (4806)
- Remove `_study_id` parameter from `Trial` class (4811, thanks adjeiv!)
- Loose coupling nsgaii elite population selection (4821)
- Fix checks integration (4826)
- Remove `OrderedDict` (4838, thanks taniokay!)
- Fix typo (4842, thanks wouterzwerink!)
- Followup child generation strategy (4856)
- Remove `samplers._search_space.IntersectionSearchSpace` (4857)
- Add experimental decorators to artifacts functionalities (4858)

Continuous Integration

- Output dependency tree (https://github.com/optuna/optuna-integration/pull/9)
- Use OIDC (https://github.com/optuna/optuna-integration/pull/33)
- Drop Python 3.7 support (https://github.com/optuna/optuna-integration/pull/35)
- Enhance speed benchmark for storages (4778)
- Drop Python 3.7 on `tests-integration` (4784)
- Remove unused `type:ignore`s (4787)
- Restrict numpy version < 1.24 (4788)
- Upgrade redis version (4805)
- Add version constraints on LightGBM (4807)
- Follow-up 4807 : Fix windows-tests and mac-tests (4809)
- Support 3.11 integration (4820)
- Support flake8 6.1.0 (4847)

Other

- Bump up version number to 3.3.0dev (https://github.com/optuna/optuna-integration/pull/27)
- Bump up version number to 3.3.0 (https://github.com/optuna/optuna-integration/pull/36)
- Bump up version number to 3.3.0dev (4710)
- Bump the version up to v3.3.0 (4860)


Thanks to All the Contributors!

This release was made possible by the authors and the people who participated in the reviews and discussions.

Alnusjaponica, HideakiImamura, adjeiv, c-bata, caprest, contramundum53, cross32768, eukaryo, gen740, hrntsm, jckkvs, knshnb, kstoneriv3, nomuramasahir0, not522, nzw0301, rishabsinghh, taniokay, toshihikoyanase, wouterzwerink, xadrianzetx, y0z

Page 1 of 17

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.