Skip to content

optuna_integration/optuna-search-cv-deprecated-distributions

Pack Severity Fix Versions
Optuna Integration error none, edit by hand All versions

OptunaSearchCV.fit() explicitly rejects deprecated Optuna distributions (UniformDistribution, LogUniformDistribution, DiscreteUniformDistribution, IntUniformDistribution, and IntLogUniformDistribution) with ValueError.

search = OptunaSearchCV(est, {"alpha": optuna.distributions.LogUniformDistribution(1e-3, 10.0)})
search = OptunaSearchCV(est, {"alpha": optuna.distributions.FloatDistribution(1e-3, 10.0, log=True)})

Deprecated Optuna distribution constructors passed inside an OptunaSearchCV(...) call.

Use optuna.distributions.FloatDistribution (with log=True or step= as needed) and optuna.distributions.IntDistribution.

OptunaSearchCV rejects deprecated Optuna distributions ($D) with ValueError during fit. Replace them with FloatDistribution or IntDistribution.

See all rules in the Optuna Integration pack.