MCPcopy Create free account
hub / github.com/Tele-AI/Telechat / __getitem__

Method __getitem__

deepspeed-telechat/utils/data/data_utils.py:48–53  ·  view source on GitHub ↗
(self, idx)

Source from the content-addressed store, hash-verified

46 return length
47
48 def __getitem__(self, idx):
49 return {
50 "input_ids": self.dataset[idx]["input_ids"],
51 "attention_mask": self.dataset[idx]["attention_mask"],
52 "labels": self.dataset[idx]["input_ids"]
53 }
54
55def get_weight_data(current_dataset, dataset_weight):
56 dataset = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected