MCPcopy Index your code
hub / github.com/zai-org/CodeGeeX / package_file

Function package_file

codegeex/mindspore/src/preprocess.py:38–50  ·  view source on GitHub ↗

package multiple files

(it, n)

Source from the content-addressed store, hash-verified

36
37
38def package_file(it, n):
39 """package multiple files"""
40 stop = False
41 while not stop:
42 batch = []
43 for _ in range(n):
44 try:
45 batch.append(next(it))
46 except StopIteration:
47 stop = True
48 if not batch:
49 break
50 yield batch
51
52
53def clean_wikitext(string):

Callers 1

preprocess.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected