INNER CODE UNIT · Python

_model

onnxsim/onnxsim · onnxsim/rpc/server.py:449

    def _model(models: Dict[int, Any], header: Dict[str, Any]) -> Any:
        try:
            return models[int(header["handle"])]
        except KeyError:
            raise proto.RPCError(
                f"no such model handle {header.get('handle')!r}"
            ) from None


class RPCServer(socketserver.ThreadingTCPServer):
    allow_reuse_address = True
    daemon_threads = True

    def __init__(
        self,
        host: str = "127.0.0.1",
        port: int = 0,
        key: str = "",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…