optuna.multi_objective.study.load_study

optuna.multi_objective.study.load_study(study_name: str, storage: Union[str, optuna.storages._base.BaseStorage], sampler: Optional[multi_objective.samplers.BaseMultiObjectiveSampler] = None)optuna.multi_objective.study.MultiObjectiveStudy[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 – Study’s name. Each study has a unique name as an identifier.

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

  • sampler – A sampler object that implements background algorithm for value suggestion. If None is specified, RandomMultiObjectiveSampler is used as the default. See also samplers.

Returns

A MultiObjectiveStudy object.

Note

Added in v1.4.0 as an experimental feature. The interface may change in newer versions without prior notice. See https://github.com/optuna/optuna/releases/tag/v1.4.0.