4311d7b6cd2b7a0faa63d4091896b8480f145279,examples/train_model.py,TrainLoop,train,#TrainLoop#,209

Before Change


                        opt["num_epochs"], self.train_time.time()))
                    self.log()
                    break
                if opt["max_train_time"] > 0 and self.train_time.time() > opt["max_train_time"]:
                    print("[ max_train_time elapsed:{}s ]".format(self.train_time.time()))
                    break
                if opt["log_every_n_secs"] > 0 and self.log_time.time() > opt["log_every_n_secs"]:
                    self.log()
                if (opt["validation_every_n_secs"] > 0 and
                        self.validate_time.time() > opt["validation_every_n_secs"]):

After Change



                if self.total_epochs > self.num_epochs or world_done:
                    print("[ num_epochs completed:{} time elapsed:{}s ]".format(
                        self.num_epochs, world.get_train_time()))
                    self.log()
                    break
                if world.get_train_time() > self.max_train_time:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: train


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: train


Project Name: facebookresearch/ParlAI
Commit Name: 4311d7b6cd2b7a0faa63d4091896b8480f145279
Time: 2017-12-07
Author: kshuster@fb.com
File Name: parlai/core/metrics.py
Class Name:
Method Name: compute_time_metrics


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