f4f19f8ae940c66c1f8af4c3aaacb9e0b6cbbbf9,pytext/task/new_task.py,NewTaskTrainer,_run_epoch,#NewTaskTrainer#Any#Any#Any#Any#Any#Any#Any#Any#Any#,29

Before Change


        for batch_id, batch in enumerate(batches):
            pre_batch()
            loss, metric_data = model.train_batch(batch)
            backprop(loss, timer)
            if report_metric:
                metric_reporter.add_batch_stats(
                    batch_id, *metric_data, **metric_reporter.batch_context(batch)
                )

After Change


            pre_batch()
            with time_utils.time("model.train_batch"):
                loss, metric_data = model.train_batch(batch)
            with time_utils.time("backprop"):
                backprop(loss)
            if report_metric:
                with time_utils.time("add metrics"):
                    metric_reporter.add_batch_stats(
                        batch_id, *metric_data, **metric_reporter.batch_context(batch)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: facebookresearch/pytext
Commit Name: f4f19f8ae940c66c1f8af4c3aaacb9e0b6cbbbf9
Time: 2019-03-05
Author: snl@fb.com
File Name: pytext/task/new_task.py
Class Name: NewTaskTrainer
Method Name: _run_epoch


Project Name: facebookresearch/pytext
Commit Name: f4f19f8ae940c66c1f8af4c3aaacb9e0b6cbbbf9
Time: 2019-03-05
Author: snl@fb.com
File Name: pytext/trainers/trainer.py
Class Name: Trainer
Method Name: _run_epoch


Project Name: facebookresearch/pytext
Commit Name: 31bf9a3cbbf0739beb745389ee64f6b9200f6d53
Time: 2019-07-10
Author: chenyangyu@instagram.com
File Name: pytext/trainers/trainer.py
Class Name: TaskTrainer
Method Name: run_step