4c89fd66ec992359a5e515b3a948db1193d4b1c2,pytext/models/model.py,BaseModel,train_batch,#Any#Any#Any#,156

Before Change


        model_outputs = model(*model_inputs)

        // Compute loss and predictions.
        loss = model.get_loss(model_outputs, targets, None)
        predictions, scores = model.get_pred(model_outputs)

        // Pack results and return them.
        metric_data = (predictions, targets, scores, loss, model_inputs)

After Change


        model_outputs = model(*model_inputs)

        // Compute loss and predictions.
        loss = maybe_float(model.get_loss(model_outputs, targets, None))
        predictions, scores = model.get_pred(model_outputs)

        // Pack results and return them.
        metric_data = (predictions, targets, scores, loss, model_inputs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: facebookresearch/pytext
Commit Name: 4c89fd66ec992359a5e515b3a948db1193d4b1c2
Time: 2019-05-13
Author: chenyangyu@instagram.com
File Name: pytext/models/model.py
Class Name: BaseModel
Method Name: train_batch


Project Name: facebookresearch/pytext
Commit Name: 7f60bfe15bf81ac446153c9a7af3b2c57afdb1d2
Time: 2019-05-08
Author: chenyangyu@instagram.com
File Name: pytext/models/model.py
Class Name: BaseModel
Method Name: get_loss


Project Name: facebookresearch/pytext
Commit Name: 4c89fd66ec992359a5e515b3a948db1193d4b1c2
Time: 2019-05-13
Author: chenyangyu@instagram.com
File Name: pytext/trainers/trainer.py
Class Name: Trainer
Method Name: run_step