MCPcopy Create free account
hub / github.com/apple/ml-pointersect / __iter__

Method __iter__

cdslib/core/data/dataloader/bucket_sampler.py:199–206  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

197 return self.total_batches
198
199 def __iter__(self):
200 assert self.bucket_boundaries is not None
201 assert self.dataset_lengths is not None
202 assert self.global_idxs is not None
203 # group batches
204 self._batching()
205 self.batch_idx = 0
206 return self
207
208 def __next__(self):
209 if self.batch_idx < self.total_batches:

Callers

nothing calls this directly

Calls 1

_batchingMethod · 0.95

Tested by

no test coverage detected