From 6553bb5fbdeb25d92ee99099092e589b3596eea5 Mon Sep 17 00:00:00 2001 From: Contramundum Date: Thu, 31 Aug 2023 18:37:46 +0900 Subject: [PATCH] Remove PreferentialStudy.active_trial --- optuna_dashboard/preferential/_study.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/optuna_dashboard/preferential/_study.py b/optuna_dashboard/preferential/_study.py index 5ea5bf36..57ab8e9f 100644 --- a/optuna_dashboard/preferential/_study.py +++ b/optuna_dashboard/preferential/_study.py @@ -67,15 +67,6 @@ class PreferentialStudy: """ return get_best_trials(self._study._study_id, self._study._storage) - @property - def active_trials(self) -> list[FrozenTrial]: - """Return the trials that is not reported bad and not marked skipped. - - Returns: - A list of FrozenTrial object - """ - return get_active_trials(self._study._study_id, self._study._storage) - @property def study_name(self) -> str: """Return the name of the study. @@ -285,7 +276,7 @@ class PreferentialStudy: to generate a new trial if this method returns :obj:`True`, and to wait for human evaluation if this method returns :obj:`False`. """ - return len(self.active_trials) < self.n_generate + return len(get_active_trials(self._study._study_id, self._study._storage)) < self.n_generate def get_active_trials(study_id: int, storage: optuna.storages.BaseStorage) -> list[FrozenTrial]: