optuna.study.delete_study
- optuna.study.delete_study(*, study_name, storage)[源代码]
删除一个
Study
对象。示例
import optuna def objective(trial): x = trial.suggest_float("x", -10, 10) return (x - 2) ** 2 study = optuna.create_study(study_name="example-study", storage="sqlite:///example.db") study.optimize(objective, n_trials=3) optuna.delete_study(study_name="example-study", storage="sqlite:///example.db")
- 参数:
study_name (str) – 研究的名称。
storage (str | BaseStorage) – 数据库 URL,例如
sqlite:///example.db
。详情请参阅create_study()
的文档。
- 返回类型:
None
另请参阅