MCPcopy Create free account
hub / github.com/MotrixLab/AiOS / __getitem__

Method __getitem__

datasets/humandata.py:69–77  ·  view source on GitHub ↗
(self, idx)

Source from the content-addressed store, hash-verified

67 return self.data_len
68
69 def __getitem__(self, idx):
70 if self.cache is None:
71 self.cache = np.load(self.load_path, allow_pickle=True)
72 # mapped_idx = self.mapping[idx]
73 # cache_data = self.cache[str(mapped_idx)]
74 # print(self.cache.files)
75 cache_data = self.cache[str(idx)]
76 data = cache_data.item()
77 return data
78
79
80class HumanDataset(torch.utils.data.Dataset):

Callers

nothing calls this directly

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected