MCPcopy Create free account
hub / github.com/OpenBMB/ToolBench / __getitem__

Method __getitem__

toolbench/train/train.py:186–191  ·  view source on GitHub ↗
(self, i)

Source from the content-addressed store, hash-verified

184 return len(self.input_ids)
185
186 def __getitem__(self, i) -> Dict[str, torch.Tensor]:
187 return dict(
188 input_ids=self.input_ids[i],
189 labels=self.labels[i],
190 attention_mask=self.attention_mask[i],
191 )
192
193
194class LazySupervisedDataset(Dataset):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected