26453d58671e01410b22287a723f76d6bb98803f,optuna/storages/in_memory.py,InMemoryStorage,get_all_study_summaries,#InMemoryStorage#,135
Before Change
def get_all_study_summaries(self):
// type: () -> List[StudySummary]
best_trial = None
if any(t for t in self.trials if t.state == TrialState.COMPLETE):
best_trial = self.get_best_trial(IN_MEMORY_STORAGE_STUDY_ID)
datetime_start = None
if len(self.trials) > 0:
datetime_start = min([t.datetime_start for t in self.trials])
return [
StudySummary(
study_name=self.study_name,
direction=self.direction,
best_trial=best_trial,
user_attrs=copy.deepcopy(self.study_user_attrs),
system_attrs=copy.deepcopy(self.study_system_attrs),
n_trials=len(self.trials),
datetime_start=datetime_start,
study_id=IN_MEMORY_STORAGE_STUDY_ID,
)
]
def create_new_trial(self, study_id, template_trial=None):
// type: (int, Optional[FrozenTrial]) -> int
After Change
def get_all_study_summaries(self):
// type: () -> List[StudySummary]
return [self._build_study_summary(study_id) for study_id in self._study_name.keys()]
def _build_study_summary(self, study_id: int) -> StudySummary:
best_trial_id = self._best_trial_id[study_id]
return StudySummary(
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 14
Instances
Project Name: pfnet/optuna
Commit Name: 26453d58671e01410b22287a723f76d6bb98803f
Time: 2020-05-11
Author: ytsmiling@gmail.com
File Name: optuna/storages/in_memory.py
Class Name: InMemoryStorage
Method Name: get_all_study_summaries
Project Name: pfnet/optuna
Commit Name: d5d2a849496362535ceaeef92aff9bec4e2edeba
Time: 2020-04-30
Author: ytsmiling@gmail.com
File Name: optuna/storages/in_memory.py
Class Name: InMemoryStorage
Method Name: get_all_study_summaries
Project Name: pfnet/optuna
Commit Name: 4bc348f58129abfedd9d27aaf2d301fb75fc5e75
Time: 2020-05-07
Author: ytsmiling@gmail.com
File Name: optuna/storages/in_memory.py
Class Name: InMemoryStorage
Method Name: get_all_study_summaries