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

Method __len__

diffplanner/datasets/base_dataset.py:74–80  ·  view source on GitHub ↗

Return the length of current dataset.

(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected