class_docstr: Dataset class for GSM dataset.
  Data source: https://github.com/openai/grade-school-math/tree/master/grade_school_math/data
  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 = {"test": {}}
  
      if load_train:
          dataset["train"] = {}
  
      if load_reference:
          dataset["reference"] = {}
  
      for split in dataset:
          file_name = (
              f"{split}.jsonl"
              if split != "reference"
              else "mock_gsm8k_test.jsonl"
          )
          file = os.path.join(path, file_name)
          data = get_json_list(file)
          subject = "math"
  
          dataset[split][subject] = {"data": []}
          dataset[split][subject]["inference_kwargs"] = copy.deepcopy(
              default_inference_kwargs
          )
  
          if forward_only:
              dataset[split][subject]["inference_kwargs"][
                  "pretrain"
              ] = True
  
          if split == "test" and few_shot:
              dataset[split][subject]["inference_kwargs"][
                  "few_shot_data"
              ] = get_few_shot_data()
  
          for question in data:
              if forward_only:
                  input_string = (
                      question["question"] + " "
                      if split != "reference"
                      else question["text"]
                  )
              else:
                  input_string = f"Question: {question['question']}\nLet's think step by step\n"
  
              data_sample = {
                  "dataset": "gsm",
                  "split": split,
                  "category": subject,
                  "instruction": "",
                  "input": input_string,
                  "output": "",
                  "target": question["answer"]
                  if split != "reference"
                  else "",
              }
  
              dataset[split][subject]["data"].append(data_sample)
  
      return dataset
  
file_path: ColossalAI/applications/ColossalEval/colossal_eval/dataset/gsm.py
imports: import copy
  import os
  from typing import Dict, List
  from colossal_eval.utils import get_json_list
  from colossalai.logging import DistributedLogger
  from .base import BaseDataset
label_desc: Use image node_id 1 for calling the GSMDataset obj's underlying member method code with example usage: obj.load(path, logger, few_shot, forward_only, load_train, load_reference) and returns: dataset