ca453c8b1186b4f346e70428c889a139ca21f794,allennlp/training/trainer.py,Trainer,_train_epoch,#Trainer#Any#,287

Before Change


        // Set the model to "train" mode.
        self.model.train()

        num_gpus = len(self._cuda_devices)

        // Get tqdm for the training batches
        raw_train_generator = self.iterator(self.train_data, num_epochs=1, shuffle=self.shuffle)
        train_generator = lazy_groups_of(raw_train_generator, num_gpus)
        num_training_batches = math.ceil(self.iterator.get_num_batches(self.train_data) / num_gpus)
        self._last_log = time.time()
        last_save_time = time.time()

        batches_this_epoch = 0

After Change



        // Get tqdm for the training batches
        train_generator = self.iterator(self.train_data, num_epochs=1, shuffle=self.shuffle)
        num_training_batches = self.iterator.get_num_batches(self.train_data)
        self._last_log = time.time()
        last_save_time = time.time()

        batches_this_epoch = 0
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 10

Instances


Project Name: allenai/allennlp
Commit Name: ca453c8b1186b4f346e70428c889a139ca21f794
Time: 2019-12-16
Author: markn@allenai.org
File Name: allennlp/training/trainer.py
Class Name: Trainer
Method Name: _train_epoch


Project Name: allenai/allennlp
Commit Name: ca453c8b1186b4f346e70428c889a139ca21f794
Time: 2019-12-16
Author: markn@allenai.org
File Name: allennlp/training/callbacks/validate.py
Class Name: Validate
Method Name: validate


Project Name: allenai/allennlp
Commit Name: ca453c8b1186b4f346e70428c889a139ca21f794
Time: 2019-12-16
Author: markn@allenai.org
File Name: allennlp/training/trainer.py
Class Name: Trainer
Method Name: _validation_loss