5685e22e05c353aec54e8cd12e4a646cde0ef0e4,optuna/storages/_rdb/storage.py,RDBStorage,get_study_system_attrs,#RDBStorage#Any#,292

Before Change



    def get_study_system_attrs(self, study_id: int) -> Dict[str, Any]:

        session = self.scoped_session()

        // Ensure that that study exists.
        models.StudyModel.find_or_raise_by_id(study_id, session)
        attributes = models.StudySystemAttributeModel.where_study_id(study_id, session)
        system_attrs = {attr.key: json.loads(attr.value_json) for attr in attributes}
        // Terminate transaction explicitly to avoid connection timeout during transaction.
        self._commit(session)

        return system_attrs

    def get_trial_user_attrs(self, trial_id: int) -> Dict[str, Any]:

After Change



    def get_study_system_attrs(self, study_id: int) -> Dict[str, Any]:

        with self._session_scope() as session:
            // Ensure that that study exists.
            models.StudyModel.find_or_raise_by_id(study_id, session)
            attributes = models.StudySystemAttributeModel.where_study_id(study_id, session)
            system_attrs = {attr.key: json.loads(attr.value_json) for attr in attributes}

        return system_attrs

    def get_trial_user_attrs(self, trial_id: int) -> Dict[str, Any]:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 11

Instances


Project Name: pfnet/optuna
Commit Name: 5685e22e05c353aec54e8cd12e4a646cde0ef0e4
Time: 2020-10-21
Author: keisuke.umezawa@gmail.com
File Name: optuna/storages/_rdb/storage.py
Class Name: RDBStorage
Method Name: get_study_system_attrs


Project Name: pfnet/optuna
Commit Name: 5685e22e05c353aec54e8cd12e4a646cde0ef0e4
Time: 2020-10-21
Author: keisuke.umezawa@gmail.com
File Name: optuna/storages/_rdb/storage.py
Class Name: RDBStorage
Method Name: get_trial_user_attrs


Project Name: pfnet/optuna
Commit Name: 5685e22e05c353aec54e8cd12e4a646cde0ef0e4
Time: 2020-10-21
Author: keisuke.umezawa@gmail.com
File Name: optuna/storages/_rdb/storage.py
Class Name: RDBStorage
Method Name: _get_trials


Project Name: pfnet/optuna
Commit Name: 5685e22e05c353aec54e8cd12e4a646cde0ef0e4
Time: 2020-10-21
Author: keisuke.umezawa@gmail.com
File Name: optuna/storages/_rdb/storage.py
Class Name: RDBStorage
Method Name: get_trial_system_attrs


Project Name: pfnet/optuna
Commit Name: 5685e22e05c353aec54e8cd12e4a646cde0ef0e4
Time: 2020-10-21
Author: keisuke.umezawa@gmail.com
File Name: optuna/storages/_rdb/storage.py
Class Name: RDBStorage
Method Name: get_study_user_attrs