rules/optuna/deprecated-suggest-api.md

Trial.suggest_uniform, Trial.suggest_loguniform, and Trial.suggest_discrete_uniform have been deprecated since Optuna 3.0 and emit a FutureWarning on every trial in Optuna 5.1 before removal in 6.0.

diff
1-lr = trial.suggest_loguniform("lr", 1e-4, 1e-1)
2+lr = trial.suggest_float("lr", 1e-4, 1e-1, log=True)

What the rule reports

Calls to suggest_uniform, suggest_loguniform, and suggest_discrete_uniform in files that import optuna.

How to fix it

Replace them with suggest_float, passing log=True for log-uniform sampling and step= for discrete uniform sampling. Safe autofixes apply directly with xpd check --fix.