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

Function create_doc_idx

codegeex/megatron/data/indexed_dataset.py:140–145  ·  view source on GitHub ↗
(sizes)

Source from the content-addressed store, hash-verified

138
139
140def create_doc_idx(sizes):
141 doc_idx = [0]
142 for i, s in enumerate(sizes):
143 if s == 0:
144 doc_idx.append(i + 1)
145 return doc_idx
146
147
148class IndexedDataset(torch.utils.data.Dataset):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected