MCPcopy Create free account
hub / github.com/FreeformRobotics/OTS / _get_batch

Method _get_batch

lib/utils/data/dataloader.py:252–259  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

250 return len(self.batch_sampler)
251
252 def _get_batch(self):
253 if self.timeout > 0:
254 try:
255 return self.data_queue.get(timeout=self.timeout)
256 except queue.Empty:
257 raise RuntimeError('DataLoader timed out after {} seconds'.format(self.timeout))
258 else:
259 return self.data_queue.get()
260
261 def __next__(self):
262 if self.num_workers == 0: # same-process loading

Callers 1

__next__Method · 0.95

Calls 1

getMethod · 0.80

Tested by

no test coverage detected