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

Method __len__

codegeex/megatron/data/prompt_dataset.py:229–232  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

227 )
228
229 def __len__(self):
230 # -1 is due to data structure used to retieve the index:
231 # sample i --> [sample_idx[i], sample_idx[i+1])
232 return self.doc_idx.shape[0]
233
234 def __getitem__(self, idx):
235 # get the doc index

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected