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
Returns

A MultiObjectiveStudy object.

Return type

MultiObjectiveStudy

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.