MCPcopy Create free account
hub / github.com/deepdrive/deepdrive / run

Method run

tensorflow_agent/train/data_utils.py:24–40  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

22 self.start()
23
24 def run(self):
25 for item in self.generator:
26 with self.cv:
27 log.debug('queue length %r', len(self.queue))
28 while len(self.queue) > c.NUM_TRAIN_FILES_TO_QUEUE:
29 log.debug('waiting for queue size to decrease')
30 self.cv.wait()
31 if self.should_shuffle:
32 queue_index = c.RNG.randint(0, len(self.queue))
33 log.debug('inserting randomly at', queue_index)
34 self.queue.insert(queue_index, item)
35 else:
36 self.queue.append(item)
37 log.debug('inserted, queue length is %r item was None %r', len(self.queue), item is None)
38 self.cv.notify() # Tell consumer we have more
39 log.debug('inserting none')
40 self.queue.append(None)
41
42 def __iter__(self):
43 return self

Callers 6

get_tf_validFunction · 0.80
_run_opFunction · 0.80
mainFunction · 0.80
get_net_outMethod · 0.80
init_fnFunction · 0.80
runFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected