docstr: Add command-line arguments specifically for this agent.
docstr_tok: ["Add","command-line","arguments","specifically","for","this","agent","."]
code: def add_cmdline_args(
      cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
  ) -> ParlaiParser:
      """
      Add command-line arguments specifically for this agent.
      """
      super().add_cmdline_args(parser, partial_opt=partial_opt)
      agent = parser.add_argument_group(
          "Wizard Transformer Ranker Arguments"
      )
      agent.add_argument(
          "--use-knowledge",
          type="bool",
          default=True,
          help="use knowledge field instead of personas",
      )
      agent.add_argument(
          "--knowledge-dropout",
          type=float,
          default=0.7,
          help="dropout some knowledge during training",
      )
      agent.add_argument(
          "--chosen-sentence",
          type="bool",
          default=False,
          help="instead of using all knowledge, use gold"
          "label, i.e. the chosen sentence",
      )
      agent.add_argument(
          "--knowledge-truncate",
          type=int,
          default=50,
          help="truncate knowledge to this length",
      )
      agent.add_argument(
          "--legacy", type="bool", default=False, help="legacy model"
      )
      parser.set_defaults(
          learningrate=0.0008,
          eval_candidates="inline",
          candidates="batch",
          lr_factor=1,
          add_p1_after_newln=False,
          delimiter=" ",
      )
  
      return agent
  
file_path: ParlAI/projects/wizard_of_wikipedia/wizard_transformer_ranker/wizard_transformer_ranker.py
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.agents.transformer.transformer import TransformerRankerAgent
  from .wizard_dict import WizardDictAgent
  from parlai.utils.io import PathManager
  import numpy
  import torch
label_desc: Use image node_id 2 for calling the WizardTransformerRankerAgent obj's underlying member method code with example usage: obj.add_cmdline_args(cls, parser, partial_opt) and returns: agent