class_docstr: This module provides access to data in the ParlAI Text Dialog format.
  
  See core/teachers.py for more info about the format.
class_docstr_tok: ["This","module","provides","access","to","data","in","the","ParlAI","Text","Dialog","format",".","See","core\/teachers.py","for","more","info","about","the","format","."]
code: def __init__(self, opt, shared=None):
      super().__init__(opt, shared)
      opt = copy.deepcopy(opt)
      if not opt.get("fromfile_datapath"):
          raise RuntimeError("fromfile_datapath not specified")
      datafile = opt["fromfile_datapath"]
      if self.opt["fromfile_datatype_extension"]:
          datafile += "_" + self.opt["datatype"].split(":")[0] + ".txt"
      else:
          if shared is None and (
              "valid" in self.opt["datatype"]
              or "test" in self.opt["datatype"]
          ):
              logging.warning(
                  "You are using this fromfile data as a valid or test set without setting fromfile_datatype_extension to true. Please be aware this uses directly the file you indicated, make sure this is not the same as your training file."
              )
      if shared is None:
          self._setup_data(datafile)
      # Truncate datafile to just the immediate enclosing folder name and file name
      dirname, basename = os.path.split(datafile)
      self.id = os.path.join(os.path.split(dirname)[1], basename)
      self.reset()
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  import copy
  import os
  import parlai.utils.logging
  from parlai.core.teachers import FbDeprecatedDialogTeacher, ParlAIDialogTeacher
label_desc: Use image node_id 2 to create a new ParlaiformatTeacher object from inherited base classes: ParlAIDialogTeacher with example: obj = ParlaiformatTeacher(opt, shared)