750f80bfcfdc355a54489cf89965e8e9c6c48174,parlai/core/teachers.py,FixedDialogTeacher,batch_act,#FixedDialogTeacher#Any#,370

Before Change



        // remember correct answer if available (for padding, None)
        for i, ex in enumerate(batch):
            self.lastYs[i] = ex.get("labels", ex.get("eval_labels"))

        return batch

    def act(self):

After Change


            if "labels" in ex:
                labels = ex["labels"]
                self.lastYs[i] = labels
                if not self.datatype.startswith("train") or "evalmode" in self.datatype:
                    del ex["labels"]
                    if not self.opt.get("hide_labels", False):
                        ex["eval_labels"] = labels
            else:
                self.lastYs[i] = ex.get("eval_labels", None)

        return batch
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: facebookresearch/ParlAI
Commit Name: 750f80bfcfdc355a54489cf89965e8e9c6c48174
Time: 2018-07-30
Author: ahm@fb.com
File Name: parlai/core/teachers.py
Class Name: FixedDialogTeacher
Method Name: batch_act


Project Name: AIRLab-POLIMI/mushroom
Commit Name: 20ed80d197df3101c58d9debca36fac58f0dd7b2
Time: 2017-11-08
Author: carloderamo@gmail.com
File Name: mushroom/approximators/regressor.py
Class Name: Regressor
Method Name: __init__


Project Name: pyinstaller/pyinstaller
Commit Name: 8d9552939243b3f9cf97cad3133965cff11f70f7
Time: 2011-11-28
Author: mzibr.public@gmail.com
File Name: buildtests/basic/test_absolute_ld_library_path.py
Class Name:
Method Name: