optuna_dashboard.preferential.load_study

optuna_dashboard.preferential.load_study(*, study_name, storage, sampler=None)

Like optuna.load_study(), but for preferential optimization.

Example

import optuna
from optuna_dashboard.preferential import create_study
from optuna_dashboard.preferential import load_study

study = create_study(storage="sqlite:///example.db", study_name="my_study")
study.ask()

loaded_study = load_study(study_name="my_study", storage="sqlite:///example.db")
assert len(loaded_study.trials) == len(study.trials)
Parameters:
  • study_name (str | None) – Study’s name. Each study has a unique name as an identifier. If None, checks whether the storage contains a single study, and if so loads that study. study_name is required if there are multiple studies in the storage.

  • storage (str | BaseStorage) – Database URL such as sqlite:///example.db. Please see also the documentation of create_study() for further details.

  • sampler (BaseSampler | None) – A sampler object that implements background algorithm for value suggestion. If None is specified, PreferentialGPSampler is used. Please note that most Optuna samplers does not work efficiently for preferential optimization.

Returns:

A PreferentialStudy object.

Return type:

PreferentialStudy

Note

Preferential optimization is an experimental feature (introduced in v0.13.0). The interface may change in newer versions without prior notice.