MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / __len__

Method __len__

DeepSpeedExample/megatron/data/bert_dataset.py:69–70  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

67 self.pad_id = tokenizer.pad
68
69 def __len__(self):
70 return self.samples_mapping.shape[0]
71
72 def __getitem__(self, idx):
73 start_idx, end_idx, seq_length = self.samples_mapping[idx]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected