MCPcopy Create free account
hub / github.com/tensorpack/tensorpack / __init__

Method __init__

examples/A3C-Gym/simulator.py:43–55  ·  view source on GitHub ↗

Args: idx: idx of this process pipe_c2s, pipe_s2c (str): name of the pipe

(self, idx, pipe_c2s, pipe_s2c)

Source from the content-addressed store, hash-verified

41 """
42
43 def __init__(self, idx, pipe_c2s, pipe_s2c):
44 """
45 Args:
46 idx: idx of this process
47 pipe_c2s, pipe_s2c (str): name of the pipe
48 """
49 super(SimulatorProcess, self).__init__()
50 self.idx = int(idx)
51 self.name = u'simulator-{}'.format(self.idx)
52 self.identity = self.name.encode('utf-8')
53
54 self.c2s = pipe_c2s
55 self.s2c = pipe_s2c
56
57 def run(self):
58 enable_death_signal()

Callers

nothing calls this directly

Calls 2

formatMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected