optuna.multi_objective.study.load_study¶
-
optuna.multi_objective.study.
load_study
(study_name, storage, sampler=None)[source]¶ Load the existing
MultiObjectiveStudy
that has the specified name.Example
import optuna def objective(trial): # Binh and Korn function. x = trial.suggest_float("x", 0, 5) y = trial.suggest_float("y", 0, 3) v0 = 4 * x ** 2 + 4 * y ** 2 v1 = (x - 5) ** 2 + (y - 5) ** 2 return v0, v1 study = optuna.multi_objective.create_study( directions=["minimize", "minimize"], study_name="my_study", storage="sqlite:///example.db", ) study.optimize(objective, n_trials=3) loaded_study = optuna.multi_objective.study.load_study( study_name="my_study", storage="sqlite:///example.db" ) assert len(loaded_study.trials) == len(study.trials)
- Parameters
study_name (str) – Study’s name. Each study has a unique name as an identifier.
storage (Union[str, optuna.storages._base.BaseStorage]) – Database URL such as
sqlite:///example.db
. Please see also the documentation ofcreate_study()
for further details.sampler (Optional[optuna.multi_objective.samplers._base.BaseMultiObjectiveSampler]) – A sampler object that implements background algorithm for value suggestion. If
None
is specified,RandomMultiObjectiveSampler
is used as the default. See alsosamplers
.
- Returns
A
MultiObjectiveStudy
object.- Return type
Warning
Deprecated in v2.4.0. This feature will be removed in the future. The removal of this feature is currently scheduled for v4.0.0, but this schedule is subject to change. See https://github.com/optuna/optuna/releases/tag/v2.4.0.