class_docstr: ELI5 Teacher, taken from https://github.com/facebookresearch/ELI5.
class_docstr_tok: ["ELI5","Teacher",",","taken","from","https",":","\/\/github.com\/facebookresearch\/ELI5","."]
docstr: Load data based on data split.
docstr_tok: ["Load","data","based","on","data","split","."]
code: def load_eli5(self, opt):
      """
      Load data based on data split.
      """
      dp = opt["datapath"]
      dt = opt["datatype"].split(":")[0]
      eli_path = "eli5/processed_data/selected_15_1/explainlikeimfive_"
      fname = os.path.join(dp, eli_path + dt + ".json")
      if not PathManager.exists(fname):
          raise FileNotFoundError(
              f"{fname} not found. Please follow the instructions found at "
              "https://github.com/facebookresearch/ParlAI/tree/main/parlai/tasks/eli5/README.md"
              " to construct the dataset."
          )
      opt["datafile"] = fname
      with PathManager.open(fname) as json_file:
          data = json.load(json_file)
      ds = []
      for d in data:
          if self.opt["knowledge"]:
              text = d["document"] + "\n" + d["question"]
          else:
              text = d["question"]
          act = {
              "id": "eli5",
              "text": text,
              "labels": [d["answer"]],
              "episode_done": True,
          }
          ds.append(act)
      return ds
  
file_path: ParlAI/parlai/tasks/eli5/agents.py
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.core.teachers import FixedDialogTeacher
  from parlai.utils.io import PathManager
  from .build import build
  import os
  import json
label_desc: Use image node_id 3 for calling the ELI5Teacher obj's underlying member method code with example usage: obj.load_eli5(opt) and returns: ds