optuna.multi_objective.study.load_study

optuna.multi_objective.study.load_study(study_name, storage, sampler=None)[源代码]

Load the existing MultiObjectiveStudy that has the specified name.

示例

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)
参数
返回

A MultiObjectiveStudy object.

返回类型

optuna.multi_objective.study.MultiObjectiveStudy

警告

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.