MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / __getitem__

Method __getitem__

data/generation/generate.py:108–109  ·  view source on GitHub ↗
(self, i)

Source from the content-addressed store, hash-verified

106 return len(self.input_ids)
107
108 def __getitem__(self, i) -> Dict[str, torch.Tensor]:
109 return dict(input_ids=self.input_ids[i], labels=self.labels[i], id=i)
110
111def padding(inputs, padding_token, cutoff = None):
112 num_elems = len(inputs)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected