code: def eval(self, session):
      
      eval_start = time.time()
      self.saver.save(session, self.sv.save_path, self.tensors.global_step)
      logging.info(
          'Eval, step %d:\n- on train set %s\n-- on eval set %s',
          self.global_step,
          self.model.format_metric_values(self.train_evaluator.evaluate()),
          self.model.format_metric_values(self.evaluator.evaluate()))
      now = time.time()
  
      # Make sure eval doesn't consume too much of total time.
      eval_time = now - eval_start
      train_eval_rate = self.eval_interval / eval_time
      if train_eval_rate < self.min_train_eval_rate and self.last_save > 0:
        logging.info('Adjusting eval interval from %.2fs to %.2fs',
                     self.eval_interval, self.min_train_eval_rate * eval_time)
        self.eval_interval = self.min_train_eval_rate * eval_time
  
      self.last_save = now
      self.last_log = now
docs: Runs evaluation loop.