class_docstr: General Task for Sequence2Sequence.
  
  Args:
      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. 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`
      enable_ort: Enable Torch ONNX Runtime Optimization: https://onnxruntime.ai/docs/#onnx-runtime-for-training
code: def serve(
      self,
      host: str = "127.0.0.1",
      port: int = 8000,
      sanity_check: bool = True,
      input_cls: Optional[Type[ServeInput]] = TextDeserializer,
      transform: INPUT_TRANSFORM_TYPE = InputTransform,
      transform_kwargs: Optional[Dict] = None,
      output: Optional[Union[str, Output]] = None,
  ) -> Composition:
      return super().serve(
          host,
          port,
          sanity_check,
          input_cls,
          transform,
          transform_kwargs,
          output,
      )
  
imports: import os
  import warnings
  from typing import Any, Dict, Iterable, List, Optional, Type, Union
  import torch
  from pytorch_lightning import Callback
  from pytorch_lightning.utilities import rank_zero_info
  from torch import Tensor
  from torch.nn import Module
  from flash.core.data.io.input import DataKeys, ServeInput
  from flash.core.data.io.input_transform import InputTransform
  from flash.core.data.io.output import Output
  from flash.core.data.io.output_transform import OutputTransform
  from flash.core.model import Task
  from flash.core.registry import ExternalRegistry, FlashRegistry
  from flash.core.serve import Composition
  from flash.core.utilities.imports import _TOPIC_TEXT_AVAILABLE, requires
  from flash.core.utilities.providers import _HUGGINGFACE
  from flash.core.utilities.types import INPUT_TRANSFORM_TYPE, LOSS_FN_TYPE, LR_SCHEDULER_TYPE, METRICS_TYPE, OPTIMIZER_TYPE
  from flash.text.input import TextDeserializer
  from flash.text.ort_callback import ORTCallback
  from flash.text.seq2seq.core.collate import TextSeq2SeqCollate
label_desc: Use image node_id 14 for calling the Seq2SeqTask obj's underlying member method code with example usage: obj.serve(host, port, sanity_check, input_cls, transform, transform_kwargs, output) and returns: super