class_docstr: CMU Document Grounded Conversations Dataset (aka CMU_DoG)
  
  Paper: https://arxiv.org/pdf/1809.07358.pdf
  Source: https://github.com/festvox/datasets-CMU_DoG
class_docstr_tok: ["CMU","Document","Grounded","Conversations","Dataset","(","aka","CMU_DoG",")","Paper",":","https",":","\/\/arxiv.org\/pdf\/1809.07358.pdf","Source",":","https",":","\/\/github.com\/festvox\/datasets-CMU_DoG"]
code: def add_cmdline_args(
      cls, parser, partial_opt: Optional[Opt] = None
  ) -> ParlaiParser:
      super().add_cmdline_args(parser, partial_opt=partial_opt)
      cmu_dog = parser.add_argument_group(
          "CMU Document Grounded Conversations"
      )
      cmu_dog.add_argument(
          "--cmu-dog-rating",
          type=int,
          default=[1, 2, 3],
          choices=[1, 2, 3],
          nargs="+",
          help="The higher the number, the better quality the conversation. "
          "For each rating, the number of conversations is as follows: 1-1443, 2-2142, 3-527",
      )
      cmu_dog.add_argument(
          "--cmu-dog-only-with-knowledge",
          type=bool,
          default=True,
          help="Optionally train only the sides of the conversation that have access to knowledge.",
      )
      cmu_dog.add_argument(
          "--cmu-dog-multi-msg-delimiter",
          type=str,
          default=" ",
          help="When one agent is to send multiple messages in a row, they will be concatenated with this delimiter.",
      )
      cmu_dog.add_argument(
          "--cmu-dog-fact-delimiter",
          type=str,
          default=";",
          help="When a section of the knowledge contains multiple facts, they will be concatenated with this delimiter.",
      )
      cmu_dog.add_argument(
          "--cmu-dog-include-knowledge-keys",
          type=str,
          default="cast,critical_response,director,genre,introduction,movieName,rating,year",
          help="Comma-separated list of keys into the knowledge to include as the general conversational context",
      )
      cmu_dog.add_argument(
          "--cmu-dog-provide-movie-context",
          type=bool,
          default=True,
          help="Provide movie facts as the general conversational context",
      )
      cmu_dog.add_argument(
          "--cmu-dog-split-type",
          type=SplitType,
          default=SplitType.ORIGINAL_DEDUPED,
          choices=list(SplitType),
          help=(
              "`orginal`: train/valid/test split from the original release, "
              "`original_deduped`: duplicate conversations removed from train set, "
              "`seen`: refers to movies and is relative to training - `test seen` is conversations about movies that appear during training, "
              "`unseen`: contains conversations about movies that weren't seen in `train`/`valid`/`test seen`. "
              "When using seen/unseen, use `seen` for `train`/`valid`/`seen test` and `unseen` only for `unseen test`."
          ),
      )
      return parser
  
imports: import copy
  import json
  import os
  from enum import Enum
  from typing import List, Optional, Tuple
  from parlai.core.message import Message
  from parlai.core.metrics import F1Metric
  from parlai.core.mutators import EpisodeMutator, MessageMutator, register_mutator
  from parlai.core.opt import Opt
  from parlai.core.params import ParlaiParser
  from parlai.core.teachers import DialogTeacher
  from parlai.tasks.cmu_dog.build import build
  from parlai.tasks.wizard_of_wikipedia.agents import RareWordF1Calculator, TOKEN_KNOWLEDGE, TOKEN_END_KNOWLEDGE
  from parlai.utils.data import DatatypeHelper
  from parlai.utils.io import PathManager
  from parlai.utils.logging import logger
  from parlai.utils.typing import TShared
label_desc: Use image node_id 2 for calling the CMUDocumentGroundedConversationsTeacher obj's underlying member method code with example usage: obj.add_cmdline_args(cls, parser, partial_opt) and returns: parser