MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / sample_list

Method sample_list

PATH/core/distributed_utils.py:616–625  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

614 return batch_indices
615
616 def sample_list(self):
617 #np.random.seed(self._seed)
618 all_size = self.total_size * self.world_size
619
620 all_indices = list()
621
622 while len(all_indices) <= all_size:
623 all_indices.extend(self.batch_sample_list())
624
625 return all_indices[:all_size]
626
627 def __len__(self):
628 return self.total_size - (self.last_iter+1)*self.batch_size

Callers 1

__iter__Method · 0.95

Calls 1

batch_sample_listMethod · 0.95

Tested by

no test coverage detected