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

Function get_lines

Megatron-LM/scripts/split_json.py:23–29  ·  view source on GitHub ↗
(filepath)

Source from the content-addressed store, hash-verified

21args = parser.parse_args()
22
23def get_lines(filepath):
24 lines = []
25 with open(filepath, 'r') as f:
26 for i, l in enumerate(f.readlines()):
27 l = l.strip()
28 lines.append(l)
29 return lines
30
31def get_splits(lines, line_counts):
32 all_lines = []

Callers 1

split_json.pyFile · 0.85

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected