d5d2a849496362535ceaeef92aff9bec4e2edeba,optuna/storages/in_memory.py,InMemoryStorage,get_all_study_summaries,#InMemoryStorage#,135

Before Change


        // 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 [
            StudySummary(
                study_name=self._study_name[study_id],
                direction=self._direction[study_id],
                best_trial=self._trials[self._best_trial_id[study_id]] if self._best_trial_id[study_id] else None,
                user_attrs=copy.copy(self._study_user_attrs[study_id]),
                system_attrs=copy.copy(self._study_system_attrs[study_id]),
                n_trials=len(self._study_trials[study_id]),
                datetime_start=min([self._trials[tid].datetime_start for tid in self._study_trials[study_id]]) if self._study_trials[study_id] else None,
                study_id=study_id,
            )
            for study_id in self._study_name.keys()
        ]

    def create_new_trial(self, study_id, template_trial=None):
        // type: (int, Optional[FrozenTrial]) -> int
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 14

Instances


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: 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: d5d2a849496362535ceaeef92aff9bec4e2edeba
Time: 2020-04-30
Author: ytsmiling@gmail.com
File Name: optuna/storages/in_memory.py
Class Name: InMemoryStorage
Method Name: get_all_trials


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_trials