e07f9a24e60a8acc756efc0728adb257d0474c2f,catalyst/rl/db/mongo.py,MongoDB,sampling_enabled,#MongoDB#,39

Before Change



    @property
    def sampling_enabled(self) -> bool:
        flag_obj = self._flag_collection.find_one(
            {"prefix": {
                "$eq": "sampling_flag"
            }}
        )
        flag = flag_obj.get("sampling_flag")
        flag = flag if flag is not None else -1  // disabled by default
        flag = int(flag) == int(1)
        return flag

After Change



    @property
    def sampling_enabled(self) -> bool:
        flag = self._get_flag("sampling_flag", -1)  // disabled by default
        flag = int(flag) == int(1)
        return flag
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 9

Instances


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


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


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