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

Method __init__

tensorpack/dataflow/remote.py:97–111  ·  view source on GitHub ↗

Args: addr1,addr2 (str): addr of the zmq endpoint to connect to. Use both if you need two protocols (e.g. both IPC and TCP). I don't think you'll ever need 3. hwm (int): ZMQ high-water mark (buffer size) bind (bool): whethe

(self, addr1, addr2=None, hwm=50, bind=True)

Source from the content-addressed store, hash-verified

95 cnt1, cnt2 (int): number of data points received from addr1 and addr2
96 """
97 def __init__(self, addr1, addr2=None, hwm=50, bind=True):
98 """
99 Args:
100 addr1,addr2 (str): addr of the zmq endpoint to connect to.
101 Use both if you need two protocols (e.g. both IPC and TCP).
102 I don't think you'll ever need 3.
103 hwm (int): ZMQ high-water mark (buffer size)
104 bind (bool): whether to connect or bind the endpoint
105 """
106 assert addr1
107 self._addr1 = addr1
108 self._addr2 = addr2
109 self._hwm = int(hwm)
110 self._guard = DataFlowReentrantGuard()
111 self._bind = bind
112
113 def reset_state(self):
114 self.cnt1 = 0

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected