class_docstr: CommonSenseQA is a multiple-choice Q-A dataset that relies on commonsense knowledge
  to predict correct answers. More information found at:
  
  <https://www.tau-nlp.org/commonsenseqa>.
class_docstr_tok: ["CommonSenseQA","is","a","multiple-choice","Q-A","dataset","that","relies","on","commonsense","knowledge","to","predict","correct","answers",".","More","information","found","at",":","<","https",":","\/\/www.tau-nlp.org\/commonsenseqa",">","."]
code: def setup_data(self):
      jsons_path = os.path.join(self.opt["datapath"], "CommonSenseQA")
      dtype = self.opt["datatype"]
      if dtype.startswith("test"):
          dpath = os.path.join(jsons_path, "dev.jsonl")
      elif dtype.startswith("train") or dtype.startswith("valid"):
          dpath = os.path.join(jsons_path, "train.jsonl")
      else:
          raise ValueError("Datatype not train, test, or valid")
      episodes = []
      with PathManager.open(dpath) as f:
          for line in f:
              episodes.append(json.loads(line))
      # There are 1221 episodes in the test set. Making the valid set this
      # large will make about an 80/10/10 split, as the paper had for splits.
      test_set_episodes = 1221
      if dtype.startswith("valid"):
          episodes = episodes[:test_set_episodes]
      elif dtype.startswith("train"):
          episodes = episodes[test_set_episodes:]
      return episodes
  
file_path: ParlAI/parlai/tasks/commonsenseqa/agents.py
imports: from parlai.core.teachers import FixedDialogTeacher
  from .build import build
  from parlai.utils.io import PathManager
  import os
  import json
label_desc: Use image node_id 3 for calling the CommonSenseQATeacher obj's underlying member method code with example usage: obj.setup_data() and returns: episodes