def on_epoch_end(self, epoch, logs=None):
    """At the end of the epoch, trigger computing/saving fever metrics.

    Args:
      epoch: The current epoch
      logs: The logs dictionary containing metrics to read/write
    """
    predictions = self.model.predict(self._validation_batched)
    # This is a list of tensors, one for each output, since keras does not work
    # with dictionaries. The correct places for predictions is set by
    # sorted(['claim_classification', 'evidence_matching']), so the zero
    # index contains claim predictions, the first index evidence predictions
    claim_predictions = predictions['claim_classification']
    evidence_predictions = predictions['evidence_matching']
    self._save_predictions(epoch, self._validation_flat, claim_predictions,
                           evidence_predictions)
    partitioned_claim_preds, partitioned_evidence_preds, partitioned_example = partition_preds_by_scrape_type(
        claim_predictions, evidence_predictions, self._validation_flat)
    for scrape_type in constants.DOC_TYPES:
      scrape_claim_preds = partitioned_claim_preds[scrape_type]
      scrape_evidence_preds = partitioned_evidence_preds[scrape_type]
      scrape_examples = partitioned_example[scrape_type]
      logging.info('scrape_type=%s n_preds=%s', scrape_type,
                   len(scrape_examples))
      ranked_evidence = group_claim_predictions(scrape_claim_preds,
                                                scrape_evidence_preds,
                                                scrape_examples)
      self._record_recall_metrics(
          ranked_evidence=ranked_evidence,
          epoch=epoch,
          logs=logs,
          scrape_type=scrape_type)
      for n_evidence in range(1, 6):
        self._record_fever_metrics(
            ranked_evidence=ranked_evidence,
            epoch=epoch,
            logs=logs,
            scrape_type=scrape_type,
            n_evidence=n_evidence,
        )
At the end of the epoch, trigger computing/saving fever metrics.

    Args:
      epoch: The current epoch
      logs: The logs dictionary containing metrics to read/write
    
language/serene/callbacks.py