Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

megamolbart_pb2_grpc.py 6.3 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
  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 megamolbart_pb2 as megamolbart__pb2
  5. class GenerativeSamplerStub(object):
  6. """import "google/protobuf/empty.proto";
  7. python -m pip install grpcio
  8. python -m pip install grpcio-tools
  9. python -m grpc_tools.protoc -I./setup/ \
  10. --python_out=./generated/ \
  11. --grpc_python_out=./generated/ \
  12. --experimental_allow_proto3_optional \
  13. ./setup/megamolbart.proto
  14. """
  15. def __init__(self, channel):
  16. """Constructor.
  17. Args:
  18. channel: A grpc.Channel.
  19. """
  20. self.SmilesToEmbedding = channel.unary_unary(
  21. '/nemo_chem.models.megamolbart.grpc.GenerativeSampler/SmilesToEmbedding',
  22. request_serializer=megamolbart__pb2.InputSpec.SerializeToString,
  23. response_deserializer=megamolbart__pb2.OutputSpec.FromString,
  24. )
  25. self.SmilesToHidden = channel.unary_unary(
  26. '/nemo_chem.models.megamolbart.grpc.GenerativeSampler/SmilesToHidden',
  27. request_serializer=megamolbart__pb2.InputSpec.SerializeToString,
  28. response_deserializer=megamolbart__pb2.OutputSpec.FromString,
  29. )
  30. self.HiddenToSmis = channel.unary_unary(
  31. '/nemo_chem.models.megamolbart.grpc.GenerativeSampler/HiddenToSmis',
  32. request_serializer=megamolbart__pb2.InputSpec.SerializeToString,
  33. response_deserializer=megamolbart__pb2.OutputSpec.FromString,
  34. )
  35. class GenerativeSamplerServicer(object):
  36. """import "google/protobuf/empty.proto";
  37. python -m pip install grpcio
  38. python -m pip install grpcio-tools
  39. python -m grpc_tools.protoc -I./setup/ \
  40. --python_out=./generated/ \
  41. --grpc_python_out=./generated/ \
  42. --experimental_allow_proto3_optional \
  43. ./setup/megamolbart.proto
  44. """
  45. def SmilesToEmbedding(self, request, context):
  46. """Missing associated documentation comment in .proto file."""
  47. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  48. context.set_details('Method not implemented!')
  49. raise NotImplementedError('Method not implemented!')
  50. def SmilesToHidden(self, request, context):
  51. """Missing associated documentation comment in .proto file."""
  52. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  53. context.set_details('Method not implemented!')
  54. raise NotImplementedError('Method not implemented!')
  55. def HiddenToSmis(self, request, context):
  56. """Missing associated documentation comment in .proto file."""
  57. context.set_code(grpc.StatusCode.UNIMPLEMENTED)
  58. context.set_details('Method not implemented!')
  59. raise NotImplementedError('Method not implemented!')
  60. def add_GenerativeSamplerServicer_to_server(servicer, server):
  61. rpc_method_handlers = {
  62. 'SmilesToEmbedding': grpc.unary_unary_rpc_method_handler(
  63. servicer.SmilesToEmbedding,
  64. request_deserializer=megamolbart__pb2.InputSpec.FromString,
  65. response_serializer=megamolbart__pb2.OutputSpec.SerializeToString,
  66. ),
  67. 'SmilesToHidden': grpc.unary_unary_rpc_method_handler(
  68. servicer.SmilesToHidden,
  69. request_deserializer=megamolbart__pb2.InputSpec.FromString,
  70. response_serializer=megamolbart__pb2.OutputSpec.SerializeToString,
  71. ),
  72. 'HiddenToSmis': grpc.unary_unary_rpc_method_handler(
  73. servicer.HiddenToSmis,
  74. request_deserializer=megamolbart__pb2.InputSpec.FromString,
  75. response_serializer=megamolbart__pb2.OutputSpec.SerializeToString,
  76. ),
  77. }
  78. generic_handler = grpc.method_handlers_generic_handler(
  79. 'nemo_chem.models.megamolbart.grpc.GenerativeSampler', rpc_method_handlers)
  80. server.add_generic_rpc_handlers((generic_handler,))
  81. # This class is part of an EXPERIMENTAL API.
  82. class GenerativeSampler(object):
  83. """import "google/protobuf/empty.proto";
  84. python -m pip install grpcio
  85. python -m pip install grpcio-tools
  86. python -m grpc_tools.protoc -I./setup/ \
  87. --python_out=./generated/ \
  88. --grpc_python_out=./generated/ \
  89. --experimental_allow_proto3_optional \
  90. ./setup/megamolbart.proto
  91. """
  92. @staticmethod
  93. def SmilesToEmbedding(request,
  94. target,
  95. options=(),
  96. channel_credentials=None,
  97. call_credentials=None,
  98. insecure=False,
  99. compression=None,
  100. wait_for_ready=None,
  101. timeout=None,
  102. metadata=None):
  103. return grpc.experimental.unary_unary(request, target, '/nemo_chem.models.megamolbart.grpc.GenerativeSampler/SmilesToEmbedding',
  104. megamolbart__pb2.InputSpec.SerializeToString,
  105. megamolbart__pb2.OutputSpec.FromString,
  106. options, channel_credentials,
  107. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
  108. @staticmethod
  109. def SmilesToHidden(request,
  110. target,
  111. options=(),
  112. channel_credentials=None,
  113. call_credentials=None,
  114. insecure=False,
  115. compression=None,
  116. wait_for_ready=None,
  117. timeout=None,
  118. metadata=None):
  119. return grpc.experimental.unary_unary(request, target, '/nemo_chem.models.megamolbart.grpc.GenerativeSampler/SmilesToHidden',
  120. megamolbart__pb2.InputSpec.SerializeToString,
  121. megamolbart__pb2.OutputSpec.FromString,
  122. options, channel_credentials,
  123. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
  124. @staticmethod
  125. def HiddenToSmis(request,
  126. target,
  127. options=(),
  128. channel_credentials=None,
  129. call_credentials=None,
  130. insecure=False,
  131. compression=None,
  132. wait_for_ready=None,
  133. timeout=None,
  134. metadata=None):
  135. return grpc.experimental.unary_unary(request, target, '/nemo_chem.models.megamolbart.grpc.GenerativeSampler/HiddenToSmis',
  136. megamolbart__pb2.InputSpec.SerializeToString,
  137. megamolbart__pb2.OutputSpec.FromString,
  138. options, channel_credentials,
  139. insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...