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

Method prepare_data

detrsmpl/data/datasets/base_dataset.py:53–58  ·  view source on GitHub ↗

Prepare raw data for the f'{idx'}-th data.

(self, idx: int)

Source from the content-addressed store, hash-verified

51 pass
52
53 def prepare_data(self, idx: int):
54 """"Prepare raw data for the f'{idx'}-th data."""
55 results = copy.deepcopy(self.data_infos[idx])
56 results['dataset_name'] = self.dataset_name
57 results['sample_idx'] = idx
58 return self.pipeline(results)
59
60 def __len__(self):
61 """Return the length of current dataset."""

Callers 1

__getitem__Method · 0.95

Calls 1

deepcopyMethod · 0.80

Tested by

no test coverage detected