optuna.study.get_all_study_names
- optuna.study.get_all_study_names(storage)[source]
指定されたストレージに保存されているすべてのスタディ名を取得します。
使用例
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) study_names = optuna.study.get_all_study_names(storage="sqlite:///example.db") assert len(study_names) == 1 assert study_names[0] == "example-study"
- Parameters:
storage (str | BaseStorage) –
sqlite:///example.db
のようなデータベース URL。詳細はcreate_study()
のドキュメントも参照してください。- Returns:
ストレージ内のすべてのスタディ名のリスト。
- Return type:
See also
optuna.get_all_study_names()
はoptuna.study.get_all_study_names()
のエイリアスです。