This commit is contained in:
moririn2528
2023-08-16 13:20:30 +09:00
parent 774a11665a
commit a9d9621818
2 changed files with 1 additions and 3 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ class PreferentialStudy:
def get_preferences(self, *, deepcopy: bool = True) -> list[tuple[FrozenTrial, FrozenTrial]]:
trials = self._study.get_trials(deepcopy=deepcopy)
preferences = get_preferences(self._study, trials)
preferences = get_preferences(self._study._study_id, self._study._storage)
return [(trials[better], trials[worse]) for (better, worse) in preferences]
def set_user_attr(self, key: str, value: Any) -> None:
@@ -2,9 +2,7 @@ from __future__ import annotations
import uuid
import optuna
from optuna.storages import BaseStorage
from optuna.trial import FrozenTrial
from optuna.trial import TrialState
from .._storage import get_study_summary