class_docstr: BART Agent.
  
  Relies on the BART model implemented in fairseq.
  
  If you have a fine-tuned BART model from fairseq, you can specify the
  `--init-fairseq-model` arg, which will convert your fine-tuned model
  to a ParlAI model.
class_docstr_tok: ["BART","Agent",".","Relies","on","the","BART","model","implemented","in","fairseq",".","If","you","have","a","fine-tuned","BART","model","from","fairseq",",","you","can","specify","the","`","--","init-fairseq-model","`","arg",",","which","will","convert","your","fine-tuned","model","to","a","ParlAI","model","."]
docstr: Override to add init-fairseq-model arg.
docstr_tok: ["Override","to","add","init-fairseq-model","arg","."]
code: def add_cmdline_args(
      cls, parser: ParlaiParser, partial_opt: Optional[Opt] = None
  ) -> ParlaiParser:
      """
      Override to add init-fairseq-model arg.
      """
      super().add_cmdline_args(parser, partial_opt=partial_opt)
      group = parser.add_argument_group("Bart Args")
      group.add_argument(
          "--init-fairseq-model",
          type=str,
          default=None,
          help="fairseq checkpoint for bart",
      )
      group.add_argument(
          "--output-conversion-path",
          type=str,
          default=None,
          help="where to save fairseq conversion",
      )
      parser.set_defaults(dict_tokenizer="gpt2")
      parser.set_defaults(**BART_ARGS)
      return parser
  
imports: import os
  import torch
  from typing import Optional, Dict, Any
  from parlai.agents.bart.convert_fairseq_to_parlai import ConversionScript
  from parlai.agents.bart.modules import BartModel
  from parlai.agents.transformer.transformer import TransformerGeneratorAgent
  from parlai.core.agents import compare_init_model_opts
  from parlai.core.message import Message
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.torch_agent import History
  from parlai.utils.typing import TShared
  from parlai.utils.io import PathManager
  from parlai.zoo.bart.build import download, CONVERSION_ARGS, BART_ARGS
label_desc: Use image node_id 1 for calling the BartAgent obj's underlying member method code with example usage: obj.add_cmdline_args(cls, parser, partial_opt) and returns: parser