7c29567dc5f898507530d71003bdf80eaab0fbb2,orbit/controller.py,Controller,__init__,#Controller#Any#Any#Any#Any#Any#Any#Any#Any#Any#,36

Before Change


    if self.checkpoint_manager is not None:
      checkpoint_interval = self.checkpoint_manager.checkpoint_interval
      model_restored = self.restore_checkpoint()
      if not model_restored and (checkpoint_interval and
                                 self.trainer is not None):
        // If the model is not restored from a checkpoint, and
        // `checkpoint_interval` is enabled for training, save an initial
        // checkpoint.
        self.save_checkpoint()

  def train(self, steps: int, checkpoint_at_completion: bool = True):
    Runs training.

    This method calls the `train` method on the Trainable object until the

After Change


    if self.checkpoint_manager is not None:
      checkpoint_interval = self.checkpoint_manager.checkpoint_interval
      restored_path = self.restore_checkpoint()
      if restored_path:
        logging.info("Restored from checkpoint: %s", restored_path)

  def train(self, steps: int, checkpoint_at_completion: bool = True):
    Runs training.

    This method calls the `train` method on the Trainable object until the
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: tensorflow/models
Commit Name: 7c29567dc5f898507530d71003bdf80eaab0fbb2
Time: 2020-08-11
Author: rxsang@google.com
File Name: orbit/controller.py
Class Name: Controller
Method Name: __init__


Project Name: pytorch/fairseq
Commit Name: b5dad3b7e02d66dc98d4707bc8aeacf95618ccd7
Time: 2020-03-27
Author: louisrtm@gmail.com
File Name: fairseq_cli/train.py
Class Name:
Method Name: train


Project Name: tensorflow/models
Commit Name: b7e9ad13080c1fa93f3747baf2de3929068593c0
Time: 2020-08-11
Author: rxsang@google.com
File Name: orbit/controller.py
Class Name: Controller
Method Name: __init__