def evaluate(self, dset):
    """Test the model on this dataset over the examples in a dataset.

    Args:
      dset: a tf.data.Dataset

    Returns:
      a dictionary of results from model.evaluations
    """
    named_metrics = sorted(self.model.evaluations.items())
    metrics = [metric for (_, metric) in named_metrics]
    for fd in self.feed_dict_iterator(dset):
      self.session.run(metrics, feed_dict=fd)
    # tf metrics are pairs: current_value,update_op
    result = {}
    for (name, metric) in named_metrics:
      result[name] = self.session.run(metric[0])
    return result
Test the model on this dataset over the examples in a dataset.

    Args:
      dset: a tf.data.Dataset

    Returns:
      a dictionary of results from model.evaluations
    
language/nql/nql/util.py