class_docstr: RPA UL Agent.
  
  Performs unlikelihood such that tokens which lead to misclassification are
  penalized.
class_docstr_tok: ["RPA","UL","Agent",".","Performs","unlikelihood","such","that","tokens","which","lead","to","misclassification","are","penalized","."]
code: def add_cmdline_args(
      cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
  ) -> ParlaiParser:
      super().add_cmdline_args(parser, partial_opt=partial_opt)  # type: ignore
      RPAReranker.add_cmdline_args(parser, partial_opt)
      grp = parser.add_argument_group("RPA UL Group")
      grp.add_argument(
          "--rpa-ul-ratio",
          default=0.5,
          type=float,
          help="how often to apply unlikelihood per train step",
      )
      grp.add_argument(
          "--ul-top-k-toks",
          type=int,
          default=1,
          help="how many tokens to penalize with unlikelihood loss",
      )
      grp.add_argument(
          "--only-wrong-class-toks",
          type="bool",
          default=False,
          help="Whether to only apply UL to tokens that result in wrong character classification",
      )
      grp.add_argument(
          "--all-wrong-class-toks",
          type="bool",
          default=False,
          help="If True, apply UL to ALL tokens in an utterance that result in wrong character classification",
      )
      grp.add_argument(
          "--random-toks",
          type="bool",
          default=False,
          help="If True, apply UL to random tokens in an utterance that results in wrong character classification",
      )
      grp.add_argument(
          "--initial-classification-threshold",
          default=0.5,
          type=float,
          help="level of confidence for the classifier in order to apply UL. "
          "I.e., wrong character score must be greater than this, or else example is skipped",
      )
      grp.add_argument(
          "--eval-skip-generation", default=True, type="bool"
      )
      return parser
  
imports: from typing import Optional, List, Tuple
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.core.torch_agent import Batch
  import torch
  import torch.nn
  import torch.nn.functional
  from parlai.agents.transformer.transformer import TransformerGeneratorAgent
  from parlai.core.torch_agent import Output
  from parlai.core.metrics import AverageMetric
  from projects.light_whoami.agents.rpa_rerank import RPAReranker
  from projects.msc.agents.long_tga import TransformerVariantAgent
label_desc: Use image node_id 3 for calling the RpaUlAgent obj's underlying member method code with example usage: obj.add_cmdline_args(cls, parser, partial_opt) and returns: parser