892b037877b91d47df552079fa4463ee742104ee,parlai/scripts/train_model.py,TrainLoop,log,#TrainLoop#,235

Before Change


        self.log_time.reset()

        if self.writer:
            self.writer.add_scalar("training/ppl", train_report["ppl"], global_step=logs[1].split(":")[1])
            self.writer.add_scalar("training/loss", train_report["loss"], global_step=logs[1].split(":")[1])

    def train(self):

After Change



        if self.writer:
            for met in self.tbmetrics:
                if met in train_report.keys():
                    self.writer.add_scalar("training/{}".format(met), train_report[met], global_step=int(logs[1].split(":")[1]))

    def train(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: facebookresearch/ParlAI
Commit Name: 892b037877b91d47df552079fa4463ee742104ee
Time: 2018-05-31
Author: kulikov@fb.com
File Name: parlai/scripts/train_model.py
Class Name: TrainLoop
Method Name: log


Project Name: tensorflow/datasets
Commit Name: ed03b82fe98b3d2f249f56d4903a107904acfe66
Time: 2020-03-22
Author: cs17btech11040@iith.ac.in
File Name: tensorflow_datasets/testing/dataset_builder_testing.py
Class Name: DatasetBuilderTestCase
Method Name: _test_checksums


Project Name: fizyr/keras-retinanet
Commit Name: e668a52f0861f0a49549c7aa80e528c45a927561
Time: 2018-02-27
Author: vidosits.andras@gmail.com
File Name: keras_retinanet/models/densenet.py
Class Name:
Method Name: validate_backbone


Project Name: stratosphereips/StratosphereLinuxIPS
Commit Name: 729a98a1be870f6432dc39cd5a1d38fdf7425e04
Time: 2019-04-04
Author: eldraco@gmail.com
File Name: modules/portscanDetector-1/portscanDetector-1.py
Class Name: PortScanProcess
Method Name: run