def predict(self, examples):
    """Given examples in JSON format, predict evidence relevance.

    Args:
      examples: List of claim/evidence pairs to rank

    Returns:
      Scalar scores for each pair
    """
    stacked = {
        'claim_text': [],
        'evidence_text': [],
        'metadata': [],
        'label': [],
    }
    for ex in examples:
      stacked['claim_text'].append(ex['claim_text'])
      stacked['evidence_text'].append(ex['evidence_text'])
      stacked['metadata'].append(ex['metadata'])
      stacked['label'].append(ex['label'])

    dataset = tf.data.Dataset.from_tensor_slices((stacked,))
    batched_examples = self._encode_and_batch(
        dataset, filter_claims=False, filter_evidence=False)
    preds = []
    for batch in batched_examples:
      # model.predict() is broken after model load so we have to do this
      # manually.
      preds.append(self._model(batch))
    return np.vstack(preds).reshape(-1).tolist()
Given examples in JSON format, predict evidence relevance.

    Args:
      examples: List of claim/evidence pairs to rank

    Returns:
      Scalar scores for each pair
    
language/serene/training.py