MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / put

Method put

tensorpack/utils/concurrency.py:293–301  ·  view source on GitHub ↗

Args: rank(int): rank of th element. All elements must have different ranks. val: an object

(self, rank, val)

Source from the content-addressed store, hash-verified

291 self.wait_for = start
292
293 def put(self, rank, val):
294 """
295 Args:
296 rank(int): rank of th element. All elements must have different ranks.
297 val: an object
298 """
299 idx = bisect.bisect(self.ranks, rank)
300 self.ranks.insert(idx, rank)
301 self.data.insert(idx, val)
302
303 def has_next(self):
304 if len(self.ranks) == 0:

Callers 15

queue_put_stoppableMethod · 0.80
runMethod · 0.80
workerMethod · 0.80
_get_input_tensorsMethod · 0.80
runMethod · 0.80
put_taskMethod · 0.80
runMethod · 0.80
__iter__Method · 0.80
runMethod · 0.80
put_or_growMethod · 0.80
_sendMethod · 0.80
__init__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected