class_docstr: Callback for custom scoring methods.
code: def on_epoch_end(self, batch, logs=None) -> None:
      if logs is None:
          logs = {}
      val_scores = {
          score_name: 0.0 for score_name in self.scorers.keys()
      }
      count_val = 0
      for d in self.val_data:
          count_val += 1
          input_text, target_text = d
          prediction = self.summarizer.predict_vectors(
              input_text, target_text
          )
          if count_val <= self.print_num_examples:
              self.logger.info(
                  "\n(input) {} \n(target) {} \n(prediction) {}\n".format(
                      prediction["preprocessed_text"][0],
                      prediction["preprocessed_text"][1],
                      prediction["predicted_text"],
                  )
              )
          elif len(self.scorers) == 0:
              break
          for score_name, scorer in self.scorers.items():
              score = scorer(prediction)
              val_scores[score_name] += score
      for score_name, score in val_scores.items():
          logs[score_name] = float(score / count_val)
  
imports: from typing import Dict, Callable, Iterable, Tuple
  import tensorflow
  from headliner.model.summarizer import Summarizer
  from headliner.utils.logger import get_logger
label_desc: Use image node_id 2 for calling the EvaluationCallback obj's underlying member method code with example usage: obj.on_epoch_end(batch, logs) without return types