MCPcopy Index your code
hub / github.com/deepspeedai/DeepSpeedExamples / format_mappings

Function format_mappings

Megatron-LM/scripts/split_json.py:56–60  ·  view source on GitHub ↗
(line_idx, file_mappings)

Source from the content-addressed store, hash-verified

54 return splits, mappings
55
56def format_mappings(line_idx, file_mappings):
57 lines = []
58 for m, l in zip(file_mappings, line_idx):
59 lines.append(str(m).strip()+'\t'+str(l).strip())
60 return lines
61
62
63def get_filepaths(filepaths, output_dir):

Callers 1

get_splitsFunction · 0.85

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected