class_docstr: Dataset class for MMLU dataset.
  Data source: https://github.com/hendrycks/test
  This dataset class will convert the original dataset into the inference dataset.
code: def load(
      path: str,
      logger: DistributedLogger,
      few_shot: bool,
      forward_only: bool,
      load_train: bool,
      load_reference: bool,
  ) -> List[Dict]:
      dataset = {"dev": {}, "test": {}}
      for split in ["dev", "test"]:
          files = os.listdir(os.path.join(path, split))
          files.sort()
  
          for file in files:
              subject = file[0 : -len(f"_{split}.csv")].split("_")
              subject = " ".join(
                  [
                      word.title() if word != "us" else "US"
                      for word in subject
                  ]
              )
  
              file_dir = os.path.join(path, split, file)
  
              dataset[split][subject] = {
                  "data": [],
                  "inference_kwargs": {},
              }
  
              # It's been tested that each data sample in one subcategory have same inference arguments.
              dataset[split][subject][
                  "inference_kwargs"
              ] = copy.deepcopy(default_inference_kwargs)
  
              if split == "test" and few_shot:
                  dataset[split][subject]["inference_kwargs"][
                      "few_shot_data"
                  ] = get_few_shot_data(
                      dataset["dev"][subject]["data"], subject
                  )
  
              with open(file_dir, encoding="utf-8") as f:
                  reader = csv.reader(f)
                  for row in reader:
                      assert len(row) == 6
                      choices = f"A. {row[1]}\nB. {row[2]}\nC. {row[3]}\nD. {row[4]}"
                      data_sample = {
                          "dataset": "mmlu",
                          "split": split,
                          "category": subject,
                          "instruction": f"The following is a single-choice question on {subject}. Answer the question by replying A, B, C or D.",
                          "input": f"Question: {row[0]}\n{choices}\nAnswer: ",
                          "output": "",
                          "target": row[5],
                      }
  
                      dataset[split][subject]["data"].append(
                          data_sample
                      )
  
      return dataset
  
file_path: colossalai/applications/ColossalEval/colossal_eval/dataset/mmlu.py
imports: import copy
  import csv
  import os
  from typing import Dict, List
  from colossalai.logging import DistributedLogger
  from .base import BaseDataset
label_desc: Use image node_id 1 for calling the MMLUDataset obj's underlying member method code with example usage: obj.load(path, logger, few_shot, forward_only, load_train, load_reference) and returns: dataset