4311d7b6cd2b7a0faa63d4091896b8480f145279,examples/train_model.py,TrainLoop,log,#TrainLoop#,171

Before Change


        logs.append("time:{}s".format(math.floor(self.train_time.time())))
        logs.append("parleys:{}".format(self.parleys))
        // get report and update total examples seen so far
        report_opts = {
            "total_exs": self.total_exs,
            "train_time": self.train_time.time(),
            "max_exs": self.max_exs,
            "total_epochs": self.total_epochs
        }
        if hasattr(self.agent, "report"):
            train_report = self.agent.report()
            report_opts["total_exs"] += train_report["total"]
            time_metrics = compute_time_metrics(self.agent, dict(self.opt, **report_opts))
            train_report.update(time_metrics)
            self.agent.reset_metrics()
        else:

After Change


            self.world.reset_metrics()

        if "total_exs" in train_report:
            logs.append("total_exs:{}".format(train_report.pop("total_exs")))
        if "time_left" in train_report:
            logs.append("time_left:{}s".format(
                         math.floor(train_report.pop("time_left", ""))))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: facebookresearch/ParlAI
Commit Name: 4311d7b6cd2b7a0faa63d4091896b8480f145279
Time: 2017-12-07
Author: kshuster@fb.com
File Name: examples/train_model.py
Class Name: TrainLoop
Method Name: log


Project Name: keras-team/keras
Commit Name: 72e326dde38cb731424210bfd6e56f301ddc9e2b
Time: 2018-08-28
Author: gabrieldemarmiesse@gmail.com
File Name: keras/layers/convolutional.py
Class Name: ZeroPadding1D
Method Name: get_config


Project Name: keras-team/keras
Commit Name: 23c40e68de2cffa77c92ae48cca1f81913756d2a
Time: 2018-08-21
Author: gabrieldemarmiesse@gmail.com
File Name: keras/layers/convolutional.py
Class Name: Cropping1D
Method Name: get_config