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

Method prepare_data

mogen/datasets/base_dataset.py:70–75  ·  view source on GitHub ↗

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

(self, idx: int)

Source from the content-addressed store, hash-verified

68 self.data_infos.append(self.load_anno(line))
69
70 def prepare_data(self, idx: int):
71 """"Prepare raw data for the f'{idx'}-th data."""
72 results = copy.deepcopy(self.data_infos[idx])
73 results['dataset_name'] = self.dataset_name
74 results['sample_idx'] = idx
75 return self.pipeline(results)
76
77 def __len__(self):
78 """Return the length of current dataset."""

Callers 1

__getitem__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected