d5d2a849496362535ceaeef92aff9bec4e2edeba,optuna/storages/in_memory.py,InMemoryStorage,_check_study_id,#InMemoryStorage#Any#,361

Before Change


    def _check_study_id(self, study_id):
        // type: (int) -> None

        if study_id != IN_MEMORY_STORAGE_STUDY_ID:
            raise ValueError(
                "study_id is supposed to be {} in {}.".format(
                    IN_MEMORY_STORAGE_STUDY_ID, self.__class__.__name__
                )
            )

After Change


        // type: (int) -> None

        with self._lock:
            if study_id not in self._study_name:
                raise KeyError("No study with study_id {} exists.".format(study_id))

    def _check_trial_id(self, trial_id: int) -> None:

        with self._lock:
            if trial_id >= len(self._trials) or self._trials[trial_id] is None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

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: _check_study_id


Project Name: open-mmlab/mmdetection
Commit Name: 0e747be830adbfb7aeb67d79871e116283971dbc
Time: 2018-10-10
Author: chenkaidev@gmail.com
File Name: mmdet/models/backbones/resnet.py
Class Name: ResNet
Method Name: __init__


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: _check_study_id