This is the release note of v1.5.0.
Highlights
LightGBM Tuner with Cross-validation
LightGBM tuner, which provides efficient stepwise parameter tuning for LightGBM, supports cross-validation as an experimental feature with LightGBMTunerCV
. See #1156 for details.
NSGA-II
A sampler based on NSGA-II, a well-known multi-objective optimization algorithm, is now available as the default multi-objective sampler.
The following benchmark result, on the ZDT1 function, shows that NSGA-II outperforms random sampling.
Please refer to #1163 for further details.
Mean Decrease Impurity (MDI) Hyperparameter Importance Evaluator
The default hyperparameter importance evaluator is replaced with a naive mean decrease impurity algorithm. It uses the random forest feature importances in Scikit-learn and therefore requires this package. See #1253 for more details.
optuna.TrialPruned
Alias
optuna.TrialPruned
is a new alias for optuna.exceptions.TrialPruned
. It is now possible to write shorter and more readable code when pruning trials. See #1204 for details.
New Features
- Add a method to stop
study.optimize
. (#1025) - Use
--study-name
instead of--study
in CLI commands. (#1079, thanks @seungjaeryanlee!) - Add cross-validation support for
LightGBMTuner
. (#1156) - Add NSGA-II based multi-objective sampler. (#1163)
- Implement log argument for
suggest_int
. (#1201, thanks @nzw0301!) - Import
optuna.exceptions.TrialPruned
in__init__.py
. (#1204) - Mean Decrease Impurity (MDI) hyperparameter importance evaluator. (#1253)
Enhancements
- Add storage cache. (#1140)
- Fix
_get_observation_pairs
for conditional parameters. (#1166, thanks @y0z!) - Alternative implementation to hide the interface so that all samplers can use
HyperbandPruner
. (#1196) - Fix for O(N) queries being produced if even a single trial is cached. (#1259, thanks @zzorba!)
- Move caching mechanism from
RDBStorage
to_CachedStorage
. (#1263) - Cache study-related info in
_CachedStorage
. (#1264) - Move deep-copies for optimization speed improvement. (#1274)
- Implement
log
argument forsuggest_int
of ChainerMN integration. (#1275, thanks @nzw0301!) - Add warning when
Trial.suggest_int
modifieshigh
. (#1276) - Input validation for
IntLogUniformDistribution
. (#1279, thanks @himkt!)
Bug Fixes
- Support multiple studies in
InMemoryStorage
. (#1228) - Fix out of bounds error of CMA-ES. (#1231)
- Fix
sklearn
-skopt
version incompatibility. (#1236) - Fix a type casting error when using
CmaEsSampler
. (#1240) - Upgrade the version of
cmaes
. (#1242)
Documentation
- Rename
test_
tovalid_
in docs and docstring. (#1167, thanks @himkt!) - Add storage specification to
BaseStorage
class doc. (#1174) - Add docstring to
BaseStorage
method interfaces. (#1175) - Add an explanation of failed trials from samplers' perspective. (#1214)
- Add
LightGBMTuner
reference. (#1217) - Modifying code examples to include training data. (#1221)
- Ask optuna tag in Stack Overflow question. (#1249)
- Add notes for
auto
argument values inHyperbandPruner
andSuccessiveHalvingPruner
. (#1252) - Add description of
observation_key
inXGBoostPruningCallback
. (#1260) - Cosmetic fixes to documentation in
BaseStorage
. (#1261) - Modify documentation and fix file extension in the test for AllenNLP integration. (#1265, thanks @himkt!)
- Fix
experimental
decorator to decorate a class properly. (#1285, thanks @harupy!)
Examples
- Add pruning to PyTorch example. (#1119)
- Use
dump_best_config
in example. (#1225, thanks @himkt!) - Stop suggesting using deprecated option in AllenNLP example. (#1282)
- Add link to regression example in the header of
keras_integration.py
. (#1301, thanks @zishiwu123!)
Tests
- Increase test coverage of storage tests for single worker cases. (#1191)
- Fix
sklearn
-skopt
version incompatibility. (#1236)
Code Fixes
- Dissect
trial.py
. (#1210, thanks @himkt!) - Rename
trial/*.py
totrial/_*.py
. (#1239) - Add type hints to contour.py. (#1254, thanks @bigbird555!)
- Consistent Hyperband bracket ID variable names. (#1262)
- Apply minor code fix to #1201. (#1273)
- Avoid mutable default argument in
AllenNLPExecutor.__init__
. (#1280) - Reorder arguments of
Trial.suggest_float
. (#1292) - Fix unintended change on calculating
n_brackets
inHyperbandPruner
. (#1294) - Add experimental decorator to
LightGBMTuner
andLightGBMTunerCV
. (#1305)