e07f9a24e60a8acc756efc0728adb257d0474c2f,catalyst/rl/db/mongo.py,MongoDB,push_message,#MongoDB#Any#,59

Before Change


            DBSpec.Message.DISABLE_SAMPLING
        ]:
            flag = message == DBSpec.Message.ENABLE_SAMPLING
            self._flag_collection.replace_one(
                {"prefix": "sampling_flag"}, {
                    "sampling_flag": flag,
                    "prefix": "sampling_flag"
                },
                upsert=True
            )
        elif message in [
            DBSpec.Message.ENABLE_TRAINING,
            DBSpec.Message.DISABLE_TRAINING
        ]:

After Change


    def push_message(self, message: DBSpec.Message):
        if message == DBSpec.Message.ENABLE_SAMPLING:
            self._set_flag("sampling_flag", 1)
        elif message == DBSpec.Message.DISABLE_SAMPLING:
            self._set_flag("sampling_flag", 0)
        elif message == DBSpec.Message.DISABLE_TRAINING:
            self._set_flag("sampling_flag", 0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: Scitator/catalyst
Commit Name: e07f9a24e60a8acc756efc0728adb257d0474c2f
Time: 2019-07-23
Author: scitator@gmail.com
File Name: catalyst/rl/db/mongo.py
Class Name: MongoDB
Method Name: push_message


Project Name: Scitator/catalyst
Commit Name: 7be7526007380d88dab646a935ebad37fa6a710d
Time: 2019-10-03
Author: vaklyuenkov@gmail.com
File Name: catalyst/rl/db/mongo.py
Class Name: MongoDB
Method Name: put_checkpoint