MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT-LLM / RpcServerWrapper

Class RpcServerWrapper

tests/unittest/executor/test_rpc.py:13–26  ·  view source on GitHub ↗

A helper class to wrap the RPCServer and manage its lifecycle.

Source from the content-addressed store, hash-verified

11
12
13class RpcServerWrapper(RPCServer):
14 """ A helper class to wrap the RPCServer and manage its lifecycle. """
15
16 def __init__(self, *args, **kwargs):
17 super().__init__(*args, **kwargs)
18 self.addr = get_unique_ipc_addr()
19
20 def __enter__(self):
21 self.bind(self.addr)
22 self.start()
23 return self
24
25 def __exit__(self, exc_type, exc_value, traceback):
26 self.shutdown()
27
28
29class TestRpcBasics:

Calls

no outgoing calls