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

Method __getitem__

codegeex/mindspore/src/sat_dataset.py:188–194  ·  view source on GitHub ↗
(self, index)

Source from the content-addressed store, hash-verified

186 return len(self.wrapped_data)
187
188 def __getitem__(self, index):
189 # rng = random.Random(index)
190 # rng = np.random.RandomState(
191 # seed=[rng.randint(0, 2 ** 32 - 1) for _ in range(16)]
192 # )
193 # index = rng.randint(len(self.wrapped_data))
194 return self.wrapped_data[self.index_mapping[index]]
195
196
197class BlockedSplitDataset(Dataset):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected