d6480e84ff1dba4597c4c9541f82e3f9e7d801ac,parlai/scripts/eval_ppl.py,PerplexityWorld,parley,#PerplexityWorld#,102

Before Change


                // get probability of correct answer, divide by total prob mass
                prob_true = probs.get(parsed[i], 0)
                if prob_true > 0:
                    prob_true /= sum(probs.values())
                    loss -= math.log(prob_true)
                else:
                    loss = float("inf")
                num_tokens += 1

After Change


                // get probability of correct answer, divide by total prob mass
                prob_true = probs.get(parsed[i], 0)
                if prob_true > 0:
                    prob_true /= sum((probs.get(k, 0) for k in self.dict.keys()))
                    loss -= math.log(prob_true)
                else:
                    loss = float("inf")
                num_tokens += 1
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: facebookresearch/ParlAI
Commit Name: d6480e84ff1dba4597c4c9541f82e3f9e7d801ac
Time: 2018-06-11
Author: ahm@fb.com
File Name: parlai/scripts/eval_ppl.py
Class Name: PerplexityWorld
Method Name: parley


Project Name: WheatonCS/Lexos
Commit Name: da15160c068d5ffd9ff8fd2fae06a5a3e08cece3
Time: 2017-07-26
Author: weltch1997@gmail.com
File Name: lexos/processors/analyze/information.py
Class Name: CorpusInformation
Method Name: __init__


Project Name: mozilla/bugbug
Commit Name: f16992b25bb153df3ab87c5111db2a101cf68c73
Time: 2020-04-09
Author: mcastelluccio@mozilla.com
File Name: bugbug/models/testselect.py
Class Name: TestSelectModel
Method Name: train_test_split