optuna.exceptions

exceptions 模块定义了Optuna特有的异常,它派生自一个基本的 OptunaError 类。对于库用户来说,特别重要的是 TrialPruned 异常。此异常在 optuna.trial.Trial.should_prune() 对一个应被剪枝的trial返回 True 时被抛出。

optuna.exceptions.OptunaError

Optuna 异常基类。

optuna.exceptions.TrialPruned

被剪枝 trial 异常。

optuna.exceptions.CLIUsageError

命令行界面异常。

optuna.exceptions.StorageInternalError

存储异常。

optuna.exceptions.DuplicatedStudyError

重复 study 名导致的异常。