node_service_pb2_grpc.py 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
  2. """Client and server classes corresponding to protobuf-defined services."""
  3. import grpc
  4. import warnings
  5. from . import node_service_pb2 as node__service__pb2
  6. GRPC_GENERATED_VERSION = '1.64.1'
  7. GRPC_VERSION = grpc.__version__
  8. EXPECTED_ERROR_RELEASE = '1.65.0'
  9. SCHEDULED_RELEASE_DATE = 'June 25, 2024'
  10. _version_not_supported = False
  11. try:
  12. from grpc._utilities import first_version_is_lower
  13. _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
  14. except ImportError:
  15. _version_not_supported = True
  16. if _version_not_supported:
  17. warnings.warn(
  18. f'The grpc package installed is at version {GRPC_VERSION},'
  19. + f' but the generated code in node_service_pb2_grpc.py depends on'
  20. + f' grpcio>={GRPC_GENERATED_VERSION}.'
  21. + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
  22. + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
  23. + f' This warning will become an error in {EXPECTED_ERROR_RELEASE},'
  24. + f' scheduled for release on {SCHEDULED_RELEASE_DATE}.',
  25. RuntimeWarning
  26. )
  27. class NodeServiceStub(object):
  28. """Missing associated documentation comment in .proto file."""
  29. def __init__(self, channel):
  30. """Constructor.
  31. Args:
  32. channel: A grpc.Channel.
  33. """
  34. self.SendPrompt = channel.unary_unary(
  35. '/node_service.NodeService/SendPrompt',
  36. request_serializer=node__service__pb2.PromptRequest.SerializeToString,
  37. response_deserializer=node__service__pb2.Tensor.FromString,
  38. _registered_method=True)
  39. self.SendTensor = channel.unary_unary(
  40. '/node_service.NodeService/SendTensor',
  41. request_serializer=node__service__pb2.TensorRequest.SerializeToString,
  42. response_deserializer=node__service__pb2.Tensor.FromString,
  43. _registered_method=True)
  44. self.GetInferenceResult = channel.unary_unary(
  45. '/node_service.NodeService/GetInferenceResult',
  46. request_serializer=node__service__pb2.GetInferenceResultRequest.SerializeToString,
  47. response_deserializer=node__service__pb2.InferenceResult.FromString,
  48. _registered_method=True)
  49. self.CollectTopology = channel.unary_unary(
  50. '/node_service.NodeService/CollectTopology',
  51. request_serializer=node__service__pb2.CollectTopologyRequest.SerializeToString,
  52. response_deserializer=node__service__pb2.Topology.FromString,
  53. _registered_method=True)
  54. self.SendResult = channel.unary_unary(
  55. '/node_service.NodeService/SendResult',
  56. request_serializer=node__service__pb2.SendResultRequest.SerializeToString,
  57. response_deserializer=node__service__pb2.Empty.FromString,
  58. _registered_method=True)
  59. self.SendOpaqueStatus = channel.unary_unary(
  60. '/node_service.NodeService/SendOpaqueStatus',
  61. request_serializer=node__service__pb2.SendOpaqueStatusRequest.SerializeToString,
  62. response_deserializer=node__service__pb2.Empty.FromString,
  63. _registered_method=True)
  64. self.HealthCheck = channel.unary_unary(
  65. '/node_service.NodeService/HealthCheck',
  66. request_serializer=node__service__pb2.HealthCheckRequest.SerializeToString,
  67. response_deserializer=node__service__pb2.HealthCheckResponse.FromString,
  68. _registered_method=True)
  69. class NodeServiceServicer(object):
  70. """Missing associated documentation comment in .proto file."""
  71. def SendPrompt(self, request, context):
  72. """Missing associated documentation comment in .proto file."""
  73. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  74. context.set_details('Method not implemented!')
  75. raise NotImplementedError('Method not implemented!')
  76. def SendTensor(self, request, context):
  77. """Missing associated documentation comment in .proto file."""
  78. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  79. context.set_details('Method not implemented!')
  80. raise NotImplementedError('Method not implemented!')
  81. def GetInferenceResult(self, request, context):
  82. """Missing associated documentation comment in .proto file."""
  83. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  84. context.set_details('Method not implemented!')
  85. raise NotImplementedError('Method not implemented!')
  86. def CollectTopology(self, request, context):
  87. """Missing associated documentation comment in .proto file."""
  88. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  89. context.set_details('Method not implemented!')
  90. raise NotImplementedError('Method not implemented!')
  91. def SendResult(self, request, context):
  92. """Missing associated documentation comment in .proto file."""
  93. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  94. context.set_details('Method not implemented!')
  95. raise NotImplementedError('Method not implemented!')
  96. def SendOpaqueStatus(self, request, context):
  97. """Missing associated documentation comment in .proto file."""
  98. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  99. context.set_details('Method not implemented!')
  100. raise NotImplementedError('Method not implemented!')
  101. def HealthCheck(self, request, context):
  102. """Missing associated documentation comment in .proto file."""
  103. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  104. context.set_details('Method not implemented!')
  105. raise NotImplementedError('Method not implemented!')
  106. def add_NodeServiceServicer_to_server(servicer, server):
  107. rpc_method_handlers = {
  108. 'SendPrompt': grpc.unary_unary_rpc_method_handler(
  109. servicer.SendPrompt,
  110. request_deserializer=node__service__pb2.PromptRequest.FromString,
  111. response_serializer=node__service__pb2.Tensor.SerializeToString,
  112. ),
  113. 'SendTensor': grpc.unary_unary_rpc_method_handler(
  114. servicer.SendTensor,
  115. request_deserializer=node__service__pb2.TensorRequest.FromString,
  116. response_serializer=node__service__pb2.Tensor.SerializeToString,
  117. ),
  118. 'GetInferenceResult': grpc.unary_unary_rpc_method_handler(
  119. servicer.GetInferenceResult,
  120. request_deserializer=node__service__pb2.GetInferenceResultRequest.FromString,
  121. response_serializer=node__service__pb2.InferenceResult.SerializeToString,
  122. ),
  123. 'CollectTopology': grpc.unary_unary_rpc_method_handler(
  124. servicer.CollectTopology,
  125. request_deserializer=node__service__pb2.CollectTopologyRequest.FromString,
  126. response_serializer=node__service__pb2.Topology.SerializeToString,
  127. ),
  128. 'SendResult': grpc.unary_unary_rpc_method_handler(
  129. servicer.SendResult,
  130. request_deserializer=node__service__pb2.SendResultRequest.FromString,
  131. response_serializer=node__service__pb2.Empty.SerializeToString,
  132. ),
  133. 'SendOpaqueStatus': grpc.unary_unary_rpc_method_handler(
  134. servicer.SendOpaqueStatus,
  135. request_deserializer=node__service__pb2.SendOpaqueStatusRequest.FromString,
  136. response_serializer=node__service__pb2.Empty.SerializeToString,
  137. ),
  138. 'HealthCheck': grpc.unary_unary_rpc_method_handler(
  139. servicer.HealthCheck,
  140. request_deserializer=node__service__pb2.HealthCheckRequest.FromString,
  141. response_serializer=node__service__pb2.HealthCheckResponse.SerializeToString,
  142. ),
  143. }
  144. generic_handler = grpc.method_handlers_generic_handler(
  145. 'node_service.NodeService', rpc_method_handlers)
  146. server.add_generic_rpc_handlers((generic_handler,))
  147. server.add_registered_method_handlers('node_service.NodeService', rpc_method_handlers)
  148. # This class is part of an EXPERIMENTAL API.
  149. class NodeService(object):
  150. """Missing associated documentation comment in .proto file."""
  151. @staticmethod
  152. def SendPrompt(request,
  153. target,
  154. options=(),
  155. channel_credentials=None,
  156. call_credentials=None,
  157. insecure=False,
  158. compression=None,
  159. wait_for_ready=None,
  160. timeout=None,
  161. metadata=None):
  162. return grpc.experimental.unary_unary(
  163. request,
  164. target,
  165. '/node_service.NodeService/SendPrompt',
  166. node__service__pb2.PromptRequest.SerializeToString,
  167. node__service__pb2.Tensor.FromString,
  168. options,
  169. channel_credentials,
  170. insecure,
  171. call_credentials,
  172. compression,
  173. wait_for_ready,
  174. timeout,
  175. metadata,
  176. _registered_method=True)
  177. @staticmethod
  178. def SendTensor(request,
  179. target,
  180. options=(),
  181. channel_credentials=None,
  182. call_credentials=None,
  183. insecure=False,
  184. compression=None,
  185. wait_for_ready=None,
  186. timeout=None,
  187. metadata=None):
  188. return grpc.experimental.unary_unary(
  189. request,
  190. target,
  191. '/node_service.NodeService/SendTensor',
  192. node__service__pb2.TensorRequest.SerializeToString,
  193. node__service__pb2.Tensor.FromString,
  194. options,
  195. channel_credentials,
  196. insecure,
  197. call_credentials,
  198. compression,
  199. wait_for_ready,
  200. timeout,
  201. metadata,
  202. _registered_method=True)
  203. @staticmethod
  204. def GetInferenceResult(request,
  205. target,
  206. options=(),
  207. channel_credentials=None,
  208. call_credentials=None,
  209. insecure=False,
  210. compression=None,
  211. wait_for_ready=None,
  212. timeout=None,
  213. metadata=None):
  214. return grpc.experimental.unary_unary(
  215. request,
  216. target,
  217. '/node_service.NodeService/GetInferenceResult',
  218. node__service__pb2.GetInferenceResultRequest.SerializeToString,
  219. node__service__pb2.InferenceResult.FromString,
  220. options,
  221. channel_credentials,
  222. insecure,
  223. call_credentials,
  224. compression,
  225. wait_for_ready,
  226. timeout,
  227. metadata,
  228. _registered_method=True)
  229. @staticmethod
  230. def CollectTopology(request,
  231. target,
  232. options=(),
  233. channel_credentials=None,
  234. call_credentials=None,
  235. insecure=False,
  236. compression=None,
  237. wait_for_ready=None,
  238. timeout=None,
  239. metadata=None):
  240. return grpc.experimental.unary_unary(
  241. request,
  242. target,
  243. '/node_service.NodeService/CollectTopology',
  244. node__service__pb2.CollectTopologyRequest.SerializeToString,
  245. node__service__pb2.Topology.FromString,
  246. options,
  247. channel_credentials,
  248. insecure,
  249. call_credentials,
  250. compression,
  251. wait_for_ready,
  252. timeout,
  253. metadata,
  254. _registered_method=True)
  255. @staticmethod
  256. def SendResult(request,
  257. target,
  258. options=(),
  259. channel_credentials=None,
  260. call_credentials=None,
  261. insecure=False,
  262. compression=None,
  263. wait_for_ready=None,
  264. timeout=None,
  265. metadata=None):
  266. return grpc.experimental.unary_unary(
  267. request,
  268. target,
  269. '/node_service.NodeService/SendResult',
  270. node__service__pb2.SendResultRequest.SerializeToString,
  271. node__service__pb2.Empty.FromString,
  272. options,
  273. channel_credentials,
  274. insecure,
  275. call_credentials,
  276. compression,
  277. wait_for_ready,
  278. timeout,
  279. metadata,
  280. _registered_method=True)
  281. @staticmethod
  282. def SendOpaqueStatus(request,
  283. target,
  284. options=(),
  285. channel_credentials=None,
  286. call_credentials=None,
  287. insecure=False,
  288. compression=None,
  289. wait_for_ready=None,
  290. timeout=None,
  291. metadata=None):
  292. return grpc.experimental.unary_unary(
  293. request,
  294. target,
  295. '/node_service.NodeService/SendOpaqueStatus',
  296. node__service__pb2.SendOpaqueStatusRequest.SerializeToString,
  297. node__service__pb2.Empty.FromString,
  298. options,
  299. channel_credentials,
  300. insecure,
  301. call_credentials,
  302. compression,
  303. wait_for_ready,
  304. timeout,
  305. metadata,
  306. _registered_method=True)
  307. @staticmethod
  308. def HealthCheck(request,
  309. target,
  310. options=(),
  311. channel_credentials=None,
  312. call_credentials=None,
  313. insecure=False,
  314. compression=None,
  315. wait_for_ready=None,
  316. timeout=None,
  317. metadata=None):
  318. return grpc.experimental.unary_unary(
  319. request,
  320. target,
  321. '/node_service.NodeService/HealthCheck',
  322. node__service__pb2.HealthCheckRequest.SerializeToString,
  323. node__service__pb2.HealthCheckResponse.FromString,
  324. options,
  325. channel_credentials,
  326. insecure,
  327. call_credentials,
  328. compression,
  329. wait_for_ready,
  330. timeout,
  331. metadata,
  332. _registered_method=True)