def METHOD_NAME(self):
    """ Loads dataset"""
    with open(self.data_path, "r") as fid:
        list_data_dict = json.load(fid)
        self.list_data_dict = copy.deepcopy(list_data_dict)
    if self.num_samples is not None:
        self.num_samples = min(self.num_samples, len(list_data_dict))
        if self.is_calib:
            list_data_dict = list_data_dict[:self.num_samples]
        else:
            list_data_dict = random.choices(list_data_dict, k=self.num_samples)
    prompt_input, prompt_no_input = PROMPT_DICT["prompt_input"], PROMPT_DICT["prompt_no_input"]
    sources = [prompt_input.format_map(example) for example in list_data_dict]
    targets = [f"{example['output']}" for example in list_data_dict]
    self.input_ids = []
    self.input_lens = []
    for i in range(len(sources)):
        tok_input = self.tokenize_function(sources[i])
        self.input_ids.append(tok_input.input_ids)
    #if self.num_samples is not None:
    #    self.num_samples = min(self.num_samples, len(list_data_dict))
    #    self.input_ids = random.choices(self.input_ids, k=self.num_samples)
    #    print("Sources: {}".format(len(sources)))
    #    print("Targets: {}".format(len(targets)))
    #    sources = random.choices(sources, k=self.num_samples)
    #    targets = random.choices(targets, k=self.num_samples)
    self.sources = sources
    self.targets = targets