class_docstr: The ``SummarizationTask`` is a :class:`~flash.Task` for Seq2Seq text summarization. For more details, see
  :ref:`summarization`.
  
  You can change the backbone to any summarization model from `HuggingFace/transformers
  <https://huggingface.co/models?filter=pytorch&pipeline_tag=summarization>`_ using the ``backbone`` argument.
  
  Args:
      backbone: backbone model to use for the task.
      max_source_length: The maximum length to pad / truncate input sequences to.
      max_target_length: The maximum length to pad / truncate target sequences to.
      padding: The type of padding to apply. One of: "longest" or ``True``, "max_length", "do_not_pad" or
          ``False``.
      loss_fn: Loss function for training.
      optimizer: Optimizer to use for training.
      lr_scheduler: The LR scheduler to use during training.
      metrics: Metrics to compute for training and evaluation. Defauls to calculating the ROUGE metric.
          Changing this argument currently has no effect.
      learning_rate: Learning rate to use for training, defaults to `3e-4`
      num_beams: Number of beams to use in validation when generating predictions. Defaults to `4`
      use_stemmer: Whether Porter stemmer should be used to strip word suffixes to improve matching.
      enable_ort: Enable Torch ONNX Runtime Optimization: https://onnxruntime.ai/docs/#onnx-runtime-for-training
docstr: This function is used only for debugging usage with CI.
docstr_tok: ["This","function","is","used","only","for","debugging","usage","with","CI","."]
code: def _ci_benchmark_fn(history: List[Dict[str, Any]]):
      """This function is used only for debugging usage with CI."""
      assert history[-1]["rouge1_recall"] > 0.18, history[-1][
          "rouge1_recall"
      ]
  
file_path: lightning-flash/src/flash/text/seq2seq/summarization/model.py
imports: from typing import Any, Dict, List, Optional, Union
  from torch import Tensor
  from torchmetrics.text.rouge import ROUGEScore
  from flash.core.utilities.types import LOSS_FN_TYPE, LR_SCHEDULER_TYPE, METRICS_TYPE, OPTIMIZER_TYPE
  from flash.text.seq2seq.core.model import Seq2SeqTask
label_desc: Use image node_id 4 for calling the SummarizationTask obj's underlying member method code with example usage: obj._ci_benchmark_fn(history) without return types