MCPcopy Create free account
hub / github.com/zai-org/CodeGeeX / get_code_data

Function get_code_data

codegeex/mindspore/src/dataset_finetune.py:165–176  ·  view source on GitHub ↗
(code_data_path, split, args_opt, process_fn=None, skip_num=0)

Source from the content-addressed store, hash-verified

163
164
165def get_code_data(code_data_path, split, args_opt, process_fn=None, skip_num=0):
166 datasets = []
167 for dir in os.listdir(code_data_path):
168 sub_dir = os.path.join(code_data_path, dir, split)
169 print(f"Loading code data {sub_dir}")
170 data = LMDBDataset(
171 sub_dir,
172 process_fn=process_fn,
173 )
174 datasets.append(data)
175 data = ConcatDataset(datasets)
176 return data

Callers 1

create_datasetFunction · 0.85

Calls 2

LMDBDatasetClass · 0.85
ConcatDatasetClass · 0.85

Tested by

no test coverage detected