MCPcopy Create free account
hub / github.com/pytorch/pytorch / _get

Method _get

caffe2/python/data_workers.py:194–206  ·  view source on GitHub ↗
(self, data_input_coordinator)

Source from the content-addressed store, hash-verified

192 utils.ResetBlobs(self._scratch_status.values())
193
194 def _get(self, data_input_coordinator):
195 start_time = time.time()
196 last_warning = time.time()
197 while data_input_coordinator.is_active():
198 try:
199 return self._internal_queue.get(block=True, timeout=0.5)
200 except Queue.Empty:
201 if time.time() - last_warning > 10.0:
202 log.warning("** Data input is slow: (still) no data in {} secs.".format(
203 time.time() - start_time))
204 last_warning = time.time()
205 continue
206 return None
207
208 def _validate_chunk(self, chunk):
209 if chunk is None:

Callers 2

_enqueue_batch_directMethod · 0.95
_enqueue_batchMethod · 0.95

Calls 4

warningMethod · 0.80
is_activeMethod · 0.45
getMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected