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

Method __len__

mogen/datasets/base_dataset.py:77–83  ·  view source on GitHub ↗

Return the length of current dataset.

(self)

Source from the content-addressed store, hash-verified

75 return self.pipeline(results)
76
77 def __len__(self):
78 """Return the length of current dataset."""
79 if self.test_mode:
80 return len(self.eval_indexes)
81 elif self.fixed_length is not None:
82 return self.fixed_length
83 return len(self.data_infos)
84
85 def __getitem__(self, idx: int):
86 """Prepare data for the ``idx``-th data.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected