MCPcopy Create free account
hub / github.com/apache/tvm / __init__

Method __init__

python/tvm/rpc/proxy.py:217–231  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

215 """Handles html request."""
216
217 def __init__(self, *args, **kwargs):
218 file_path = kwargs.pop("file_path")
219 self.format = file_path.split(".")[-1]
220
221 if file_path.endswith("html"):
222 self.page = open(file_path).read()
223 web_port = kwargs.pop("rpc_web_port", None)
224 if web_port:
225 self.page = self.page.replace(
226 "ws://localhost:9190/ws", f"ws://localhost:{web_port}/ws"
227 )
228 else:
229 self.page = open(file_path, "rb").read()
230
231 super().__init__(*args, **kwargs)
232
233 def data_received(self, _):
234 pass

Callers

nothing calls this directly

Calls 5

readMethod · 0.65
popMethod · 0.45
splitMethod · 0.45
replaceMethod · 0.45
__init__Method · 0.45

Tested by

no test coverage detected