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

Method sample_list

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

Source from the content-addressed store, hash-verified

708 return batch_indices
709
710 def sample_list(self):
711 #np.random.seed(self._seed)
712 all_size = self.total_size * self.world_size
713
714 all_indices = list()
715 all_indices_batch = list()
716
717 while len(all_indices) <= all_size:
718 all_indices.extend(self.batch_sample_list())
719 all_indices_batch.append(self.batch_sample_list())
720
721 return all_indices_batch
722
723 def __len__(self):
724 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