MCPcopy Create free account
hub / github.com/GanjinZero/BioBART / prefetch

Method prefetch

pretrain_src/dataloader.py:45–48  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

43 return batch
44
45 def prefetch(self):
46 if self.prefetch_idx < len(self.dataset_picker):
47 self.req_queue.put(self.dataset_picker[self.prefetch_idx])
48 self.prefetch_idx += 1
49
50 def stop(self):
51 self.req_queue.put(None)

Callers 1

prefetch_batchMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected