morphml 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of morphml might be problematic. Click here for more details.
- morphml/__init__.py +14 -0
- morphml/api/__init__.py +26 -0
- morphml/api/app.py +326 -0
- morphml/api/auth.py +193 -0
- morphml/api/client.py +338 -0
- morphml/api/models.py +132 -0
- morphml/api/rate_limit.py +192 -0
- morphml/benchmarking/__init__.py +36 -0
- morphml/benchmarking/comparison.py +430 -0
- morphml/benchmarks/__init__.py +56 -0
- morphml/benchmarks/comparator.py +409 -0
- morphml/benchmarks/datasets.py +280 -0
- morphml/benchmarks/metrics.py +199 -0
- morphml/benchmarks/openml_suite.py +201 -0
- morphml/benchmarks/problems.py +289 -0
- morphml/benchmarks/suite.py +318 -0
- morphml/cli/__init__.py +5 -0
- morphml/cli/commands/experiment.py +329 -0
- morphml/cli/main.py +457 -0
- morphml/cli/quickstart.py +312 -0
- morphml/config.py +278 -0
- morphml/constraints/__init__.py +19 -0
- morphml/constraints/handler.py +205 -0
- morphml/constraints/predicates.py +285 -0
- morphml/core/__init__.py +3 -0
- morphml/core/crossover.py +449 -0
- morphml/core/dsl/README.md +359 -0
- morphml/core/dsl/__init__.py +72 -0
- morphml/core/dsl/ast_nodes.py +364 -0
- morphml/core/dsl/compiler.py +318 -0
- morphml/core/dsl/layers.py +368 -0
- morphml/core/dsl/lexer.py +336 -0
- morphml/core/dsl/parser.py +455 -0
- morphml/core/dsl/search_space.py +386 -0
- morphml/core/dsl/syntax.py +199 -0
- morphml/core/dsl/type_system.py +361 -0
- morphml/core/dsl/validator.py +386 -0
- morphml/core/graph/__init__.py +40 -0
- morphml/core/graph/edge.py +124 -0
- morphml/core/graph/graph.py +507 -0
- morphml/core/graph/mutations.py +409 -0
- morphml/core/graph/node.py +196 -0
- morphml/core/graph/serialization.py +361 -0
- morphml/core/graph/visualization.py +431 -0
- morphml/core/objectives/__init__.py +20 -0
- morphml/core/search/__init__.py +33 -0
- morphml/core/search/individual.py +252 -0
- morphml/core/search/parameters.py +453 -0
- morphml/core/search/population.py +375 -0
- morphml/core/search/search_engine.py +340 -0
- morphml/distributed/__init__.py +76 -0
- morphml/distributed/fault_tolerance.py +497 -0
- morphml/distributed/health_monitor.py +348 -0
- morphml/distributed/master.py +709 -0
- morphml/distributed/proto/README.md +224 -0
- morphml/distributed/proto/__init__.py +74 -0
- morphml/distributed/proto/worker.proto +170 -0
- morphml/distributed/proto/worker_pb2.py +79 -0
- morphml/distributed/proto/worker_pb2_grpc.py +423 -0
- morphml/distributed/resource_manager.py +416 -0
- morphml/distributed/scheduler.py +567 -0
- morphml/distributed/storage/__init__.py +33 -0
- morphml/distributed/storage/artifacts.py +381 -0
- morphml/distributed/storage/cache.py +366 -0
- morphml/distributed/storage/checkpointing.py +329 -0
- morphml/distributed/storage/database.py +459 -0
- morphml/distributed/worker.py +549 -0
- morphml/evaluation/__init__.py +5 -0
- morphml/evaluation/heuristic.py +237 -0
- morphml/exceptions.py +55 -0
- morphml/execution/__init__.py +5 -0
- morphml/execution/local_executor.py +350 -0
- morphml/integrations/__init__.py +28 -0
- morphml/integrations/jax_adapter.py +206 -0
- morphml/integrations/pytorch_adapter.py +530 -0
- morphml/integrations/sklearn_adapter.py +206 -0
- morphml/integrations/tensorflow_adapter.py +230 -0
- morphml/logging_config.py +93 -0
- morphml/meta_learning/__init__.py +66 -0
- morphml/meta_learning/architecture_similarity.py +277 -0
- morphml/meta_learning/experiment_database.py +240 -0
- morphml/meta_learning/knowledge_base/__init__.py +19 -0
- morphml/meta_learning/knowledge_base/embedder.py +179 -0
- morphml/meta_learning/knowledge_base/knowledge_base.py +313 -0
- morphml/meta_learning/knowledge_base/meta_features.py +265 -0
- morphml/meta_learning/knowledge_base/vector_store.py +271 -0
- morphml/meta_learning/predictors/__init__.py +27 -0
- morphml/meta_learning/predictors/ensemble.py +221 -0
- morphml/meta_learning/predictors/gnn_predictor.py +552 -0
- morphml/meta_learning/predictors/learning_curve.py +231 -0
- morphml/meta_learning/predictors/proxy_metrics.py +261 -0
- morphml/meta_learning/strategy_evolution/__init__.py +27 -0
- morphml/meta_learning/strategy_evolution/adaptive_optimizer.py +226 -0
- morphml/meta_learning/strategy_evolution/bandit.py +276 -0
- morphml/meta_learning/strategy_evolution/portfolio.py +230 -0
- morphml/meta_learning/transfer.py +581 -0
- morphml/meta_learning/warm_start.py +286 -0
- morphml/optimizers/__init__.py +74 -0
- morphml/optimizers/adaptive_operators.py +399 -0
- morphml/optimizers/bayesian/__init__.py +52 -0
- morphml/optimizers/bayesian/acquisition.py +387 -0
- morphml/optimizers/bayesian/base.py +319 -0
- morphml/optimizers/bayesian/gaussian_process.py +635 -0
- morphml/optimizers/bayesian/smac.py +534 -0
- morphml/optimizers/bayesian/tpe.py +411 -0
- morphml/optimizers/differential_evolution.py +220 -0
- morphml/optimizers/evolutionary/__init__.py +61 -0
- morphml/optimizers/evolutionary/cma_es.py +416 -0
- morphml/optimizers/evolutionary/differential_evolution.py +556 -0
- morphml/optimizers/evolutionary/encoding.py +426 -0
- morphml/optimizers/evolutionary/particle_swarm.py +449 -0
- morphml/optimizers/genetic_algorithm.py +486 -0
- morphml/optimizers/gradient_based/__init__.py +22 -0
- morphml/optimizers/gradient_based/darts.py +550 -0
- morphml/optimizers/gradient_based/enas.py +585 -0
- morphml/optimizers/gradient_based/operations.py +474 -0
- morphml/optimizers/gradient_based/utils.py +601 -0
- morphml/optimizers/hill_climbing.py +169 -0
- morphml/optimizers/multi_objective/__init__.py +56 -0
- morphml/optimizers/multi_objective/indicators.py +504 -0
- morphml/optimizers/multi_objective/nsga2.py +647 -0
- morphml/optimizers/multi_objective/visualization.py +427 -0
- morphml/optimizers/nsga2.py +308 -0
- morphml/optimizers/random_search.py +172 -0
- morphml/optimizers/simulated_annealing.py +181 -0
- morphml/plugins/__init__.py +35 -0
- morphml/plugins/custom_evaluator_example.py +81 -0
- morphml/plugins/custom_optimizer_example.py +63 -0
- morphml/plugins/plugin_system.py +454 -0
- morphml/reports/__init__.py +30 -0
- morphml/reports/generator.py +362 -0
- morphml/tracking/__init__.py +7 -0
- morphml/tracking/experiment.py +309 -0
- morphml/tracking/logger.py +301 -0
- morphml/tracking/reporter.py +357 -0
- morphml/utils/__init__.py +6 -0
- morphml/utils/checkpoint.py +189 -0
- morphml/utils/comparison.py +390 -0
- morphml/utils/export.py +407 -0
- morphml/utils/progress.py +392 -0
- morphml/utils/validation.py +392 -0
- morphml/version.py +7 -0
- morphml/visualization/__init__.py +50 -0
- morphml/visualization/analytics.py +423 -0
- morphml/visualization/architecture_diagrams.py +353 -0
- morphml/visualization/architecture_plot.py +223 -0
- morphml/visualization/convergence_plot.py +174 -0
- morphml/visualization/crossover_viz.py +386 -0
- morphml/visualization/graph_viz.py +338 -0
- morphml/visualization/pareto_plot.py +149 -0
- morphml/visualization/plotly_dashboards.py +422 -0
- morphml/visualization/population.py +309 -0
- morphml/visualization/progress.py +260 -0
- morphml-1.0.0.dist-info/METADATA +434 -0
- morphml-1.0.0.dist-info/RECORD +158 -0
- morphml-1.0.0.dist-info/WHEEL +4 -0
- morphml-1.0.0.dist-info/entry_points.txt +3 -0
- morphml-1.0.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,423 @@
|
|
|
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
|
+
|
|
5
|
+
from . import worker_pb2 as worker__pb2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class MasterServiceStub(object):
|
|
9
|
+
"""Master service - called by workers"""
|
|
10
|
+
|
|
11
|
+
def __init__(self, channel):
|
|
12
|
+
"""Constructor.
|
|
13
|
+
|
|
14
|
+
Args:
|
|
15
|
+
channel: A grpc.Channel.
|
|
16
|
+
"""
|
|
17
|
+
self.RegisterWorker = channel.unary_unary(
|
|
18
|
+
"/morphml.distributed.MasterService/RegisterWorker",
|
|
19
|
+
request_serializer=worker__pb2.RegisterRequest.SerializeToString,
|
|
20
|
+
response_deserializer=worker__pb2.RegisterResponse.FromString,
|
|
21
|
+
)
|
|
22
|
+
self.Heartbeat = channel.unary_unary(
|
|
23
|
+
"/morphml.distributed.MasterService/Heartbeat",
|
|
24
|
+
request_serializer=worker__pb2.HeartbeatRequest.SerializeToString,
|
|
25
|
+
response_deserializer=worker__pb2.HeartbeatResponse.FromString,
|
|
26
|
+
)
|
|
27
|
+
self.SubmitResult = channel.unary_unary(
|
|
28
|
+
"/morphml.distributed.MasterService/SubmitResult",
|
|
29
|
+
request_serializer=worker__pb2.ResultRequest.SerializeToString,
|
|
30
|
+
response_deserializer=worker__pb2.ResultResponse.FromString,
|
|
31
|
+
)
|
|
32
|
+
self.RequestTask = channel.unary_unary(
|
|
33
|
+
"/morphml.distributed.MasterService/RequestTask",
|
|
34
|
+
request_serializer=worker__pb2.TaskRequest.SerializeToString,
|
|
35
|
+
response_deserializer=worker__pb2.TaskResponse.FromString,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class MasterServiceServicer(object):
|
|
40
|
+
"""Master service - called by workers"""
|
|
41
|
+
|
|
42
|
+
def RegisterWorker(self, request, context):
|
|
43
|
+
"""Register a new worker with the master"""
|
|
44
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
45
|
+
context.set_details("Method not implemented!")
|
|
46
|
+
raise NotImplementedError("Method not implemented!")
|
|
47
|
+
|
|
48
|
+
def Heartbeat(self, request, context):
|
|
49
|
+
"""Send periodic heartbeat"""
|
|
50
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
51
|
+
context.set_details("Method not implemented!")
|
|
52
|
+
raise NotImplementedError("Method not implemented!")
|
|
53
|
+
|
|
54
|
+
def SubmitResult(self, request, context):
|
|
55
|
+
"""Submit evaluation result"""
|
|
56
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
57
|
+
context.set_details("Method not implemented!")
|
|
58
|
+
raise NotImplementedError("Method not implemented!")
|
|
59
|
+
|
|
60
|
+
def RequestTask(self, request, context):
|
|
61
|
+
"""Request a task (pull model)"""
|
|
62
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
63
|
+
context.set_details("Method not implemented!")
|
|
64
|
+
raise NotImplementedError("Method not implemented!")
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def add_MasterServiceServicer_to_server(servicer, server):
|
|
68
|
+
rpc_method_handlers = {
|
|
69
|
+
"RegisterWorker": grpc.unary_unary_rpc_method_handler(
|
|
70
|
+
servicer.RegisterWorker,
|
|
71
|
+
request_deserializer=worker__pb2.RegisterRequest.FromString,
|
|
72
|
+
response_serializer=worker__pb2.RegisterResponse.SerializeToString,
|
|
73
|
+
),
|
|
74
|
+
"Heartbeat": grpc.unary_unary_rpc_method_handler(
|
|
75
|
+
servicer.Heartbeat,
|
|
76
|
+
request_deserializer=worker__pb2.HeartbeatRequest.FromString,
|
|
77
|
+
response_serializer=worker__pb2.HeartbeatResponse.SerializeToString,
|
|
78
|
+
),
|
|
79
|
+
"SubmitResult": grpc.unary_unary_rpc_method_handler(
|
|
80
|
+
servicer.SubmitResult,
|
|
81
|
+
request_deserializer=worker__pb2.ResultRequest.FromString,
|
|
82
|
+
response_serializer=worker__pb2.ResultResponse.SerializeToString,
|
|
83
|
+
),
|
|
84
|
+
"RequestTask": grpc.unary_unary_rpc_method_handler(
|
|
85
|
+
servicer.RequestTask,
|
|
86
|
+
request_deserializer=worker__pb2.TaskRequest.FromString,
|
|
87
|
+
response_serializer=worker__pb2.TaskResponse.SerializeToString,
|
|
88
|
+
),
|
|
89
|
+
}
|
|
90
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
91
|
+
"morphml.distributed.MasterService", rpc_method_handlers
|
|
92
|
+
)
|
|
93
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# This class is part of an EXPERIMENTAL API.
|
|
97
|
+
class MasterService(object):
|
|
98
|
+
"""Master service - called by workers"""
|
|
99
|
+
|
|
100
|
+
@staticmethod
|
|
101
|
+
def RegisterWorker(
|
|
102
|
+
request,
|
|
103
|
+
target,
|
|
104
|
+
options=(),
|
|
105
|
+
channel_credentials=None,
|
|
106
|
+
call_credentials=None,
|
|
107
|
+
insecure=False,
|
|
108
|
+
compression=None,
|
|
109
|
+
wait_for_ready=None,
|
|
110
|
+
timeout=None,
|
|
111
|
+
metadata=None,
|
|
112
|
+
):
|
|
113
|
+
return grpc.experimental.unary_unary(
|
|
114
|
+
request,
|
|
115
|
+
target,
|
|
116
|
+
"/morphml.distributed.MasterService/RegisterWorker",
|
|
117
|
+
worker__pb2.RegisterRequest.SerializeToString,
|
|
118
|
+
worker__pb2.RegisterResponse.FromString,
|
|
119
|
+
options,
|
|
120
|
+
channel_credentials,
|
|
121
|
+
insecure,
|
|
122
|
+
call_credentials,
|
|
123
|
+
compression,
|
|
124
|
+
wait_for_ready,
|
|
125
|
+
timeout,
|
|
126
|
+
metadata,
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
@staticmethod
|
|
130
|
+
def Heartbeat(
|
|
131
|
+
request,
|
|
132
|
+
target,
|
|
133
|
+
options=(),
|
|
134
|
+
channel_credentials=None,
|
|
135
|
+
call_credentials=None,
|
|
136
|
+
insecure=False,
|
|
137
|
+
compression=None,
|
|
138
|
+
wait_for_ready=None,
|
|
139
|
+
timeout=None,
|
|
140
|
+
metadata=None,
|
|
141
|
+
):
|
|
142
|
+
return grpc.experimental.unary_unary(
|
|
143
|
+
request,
|
|
144
|
+
target,
|
|
145
|
+
"/morphml.distributed.MasterService/Heartbeat",
|
|
146
|
+
worker__pb2.HeartbeatRequest.SerializeToString,
|
|
147
|
+
worker__pb2.HeartbeatResponse.FromString,
|
|
148
|
+
options,
|
|
149
|
+
channel_credentials,
|
|
150
|
+
insecure,
|
|
151
|
+
call_credentials,
|
|
152
|
+
compression,
|
|
153
|
+
wait_for_ready,
|
|
154
|
+
timeout,
|
|
155
|
+
metadata,
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
@staticmethod
|
|
159
|
+
def SubmitResult(
|
|
160
|
+
request,
|
|
161
|
+
target,
|
|
162
|
+
options=(),
|
|
163
|
+
channel_credentials=None,
|
|
164
|
+
call_credentials=None,
|
|
165
|
+
insecure=False,
|
|
166
|
+
compression=None,
|
|
167
|
+
wait_for_ready=None,
|
|
168
|
+
timeout=None,
|
|
169
|
+
metadata=None,
|
|
170
|
+
):
|
|
171
|
+
return grpc.experimental.unary_unary(
|
|
172
|
+
request,
|
|
173
|
+
target,
|
|
174
|
+
"/morphml.distributed.MasterService/SubmitResult",
|
|
175
|
+
worker__pb2.ResultRequest.SerializeToString,
|
|
176
|
+
worker__pb2.ResultResponse.FromString,
|
|
177
|
+
options,
|
|
178
|
+
channel_credentials,
|
|
179
|
+
insecure,
|
|
180
|
+
call_credentials,
|
|
181
|
+
compression,
|
|
182
|
+
wait_for_ready,
|
|
183
|
+
timeout,
|
|
184
|
+
metadata,
|
|
185
|
+
)
|
|
186
|
+
|
|
187
|
+
@staticmethod
|
|
188
|
+
def RequestTask(
|
|
189
|
+
request,
|
|
190
|
+
target,
|
|
191
|
+
options=(),
|
|
192
|
+
channel_credentials=None,
|
|
193
|
+
call_credentials=None,
|
|
194
|
+
insecure=False,
|
|
195
|
+
compression=None,
|
|
196
|
+
wait_for_ready=None,
|
|
197
|
+
timeout=None,
|
|
198
|
+
metadata=None,
|
|
199
|
+
):
|
|
200
|
+
return grpc.experimental.unary_unary(
|
|
201
|
+
request,
|
|
202
|
+
target,
|
|
203
|
+
"/morphml.distributed.MasterService/RequestTask",
|
|
204
|
+
worker__pb2.TaskRequest.SerializeToString,
|
|
205
|
+
worker__pb2.TaskResponse.FromString,
|
|
206
|
+
options,
|
|
207
|
+
channel_credentials,
|
|
208
|
+
insecure,
|
|
209
|
+
call_credentials,
|
|
210
|
+
compression,
|
|
211
|
+
wait_for_ready,
|
|
212
|
+
timeout,
|
|
213
|
+
metadata,
|
|
214
|
+
)
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
class WorkerServiceStub(object):
|
|
218
|
+
"""Worker service - called by master"""
|
|
219
|
+
|
|
220
|
+
def __init__(self, channel):
|
|
221
|
+
"""Constructor.
|
|
222
|
+
|
|
223
|
+
Args:
|
|
224
|
+
channel: A grpc.Channel.
|
|
225
|
+
"""
|
|
226
|
+
self.Evaluate = channel.unary_unary(
|
|
227
|
+
"/morphml.distributed.WorkerService/Evaluate",
|
|
228
|
+
request_serializer=worker__pb2.EvaluateRequest.SerializeToString,
|
|
229
|
+
response_deserializer=worker__pb2.EvaluateResponse.FromString,
|
|
230
|
+
)
|
|
231
|
+
self.GetStatus = channel.unary_unary(
|
|
232
|
+
"/morphml.distributed.WorkerService/GetStatus",
|
|
233
|
+
request_serializer=worker__pb2.StatusRequest.SerializeToString,
|
|
234
|
+
response_deserializer=worker__pb2.StatusResponse.FromString,
|
|
235
|
+
)
|
|
236
|
+
self.Shutdown = channel.unary_unary(
|
|
237
|
+
"/morphml.distributed.WorkerService/Shutdown",
|
|
238
|
+
request_serializer=worker__pb2.ShutdownRequest.SerializeToString,
|
|
239
|
+
response_deserializer=worker__pb2.ShutdownResponse.FromString,
|
|
240
|
+
)
|
|
241
|
+
self.CancelTask = channel.unary_unary(
|
|
242
|
+
"/morphml.distributed.WorkerService/CancelTask",
|
|
243
|
+
request_serializer=worker__pb2.CancelRequest.SerializeToString,
|
|
244
|
+
response_deserializer=worker__pb2.CancelResponse.FromString,
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
class WorkerServiceServicer(object):
|
|
249
|
+
"""Worker service - called by master"""
|
|
250
|
+
|
|
251
|
+
def Evaluate(self, request, context):
|
|
252
|
+
"""Evaluate an architecture (push model)"""
|
|
253
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
254
|
+
context.set_details("Method not implemented!")
|
|
255
|
+
raise NotImplementedError("Method not implemented!")
|
|
256
|
+
|
|
257
|
+
def GetStatus(self, request, context):
|
|
258
|
+
"""Get worker status"""
|
|
259
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
260
|
+
context.set_details("Method not implemented!")
|
|
261
|
+
raise NotImplementedError("Method not implemented!")
|
|
262
|
+
|
|
263
|
+
def Shutdown(self, request, context):
|
|
264
|
+
"""Shutdown worker gracefully"""
|
|
265
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
266
|
+
context.set_details("Method not implemented!")
|
|
267
|
+
raise NotImplementedError("Method not implemented!")
|
|
268
|
+
|
|
269
|
+
def CancelTask(self, request, context):
|
|
270
|
+
"""Cancel running task"""
|
|
271
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
272
|
+
context.set_details("Method not implemented!")
|
|
273
|
+
raise NotImplementedError("Method not implemented!")
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
def add_WorkerServiceServicer_to_server(servicer, server):
|
|
277
|
+
rpc_method_handlers = {
|
|
278
|
+
"Evaluate": grpc.unary_unary_rpc_method_handler(
|
|
279
|
+
servicer.Evaluate,
|
|
280
|
+
request_deserializer=worker__pb2.EvaluateRequest.FromString,
|
|
281
|
+
response_serializer=worker__pb2.EvaluateResponse.SerializeToString,
|
|
282
|
+
),
|
|
283
|
+
"GetStatus": grpc.unary_unary_rpc_method_handler(
|
|
284
|
+
servicer.GetStatus,
|
|
285
|
+
request_deserializer=worker__pb2.StatusRequest.FromString,
|
|
286
|
+
response_serializer=worker__pb2.StatusResponse.SerializeToString,
|
|
287
|
+
),
|
|
288
|
+
"Shutdown": grpc.unary_unary_rpc_method_handler(
|
|
289
|
+
servicer.Shutdown,
|
|
290
|
+
request_deserializer=worker__pb2.ShutdownRequest.FromString,
|
|
291
|
+
response_serializer=worker__pb2.ShutdownResponse.SerializeToString,
|
|
292
|
+
),
|
|
293
|
+
"CancelTask": grpc.unary_unary_rpc_method_handler(
|
|
294
|
+
servicer.CancelTask,
|
|
295
|
+
request_deserializer=worker__pb2.CancelRequest.FromString,
|
|
296
|
+
response_serializer=worker__pb2.CancelResponse.SerializeToString,
|
|
297
|
+
),
|
|
298
|
+
}
|
|
299
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
300
|
+
"morphml.distributed.WorkerService", rpc_method_handlers
|
|
301
|
+
)
|
|
302
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
# This class is part of an EXPERIMENTAL API.
|
|
306
|
+
class WorkerService(object):
|
|
307
|
+
"""Worker service - called by master"""
|
|
308
|
+
|
|
309
|
+
@staticmethod
|
|
310
|
+
def Evaluate(
|
|
311
|
+
request,
|
|
312
|
+
target,
|
|
313
|
+
options=(),
|
|
314
|
+
channel_credentials=None,
|
|
315
|
+
call_credentials=None,
|
|
316
|
+
insecure=False,
|
|
317
|
+
compression=None,
|
|
318
|
+
wait_for_ready=None,
|
|
319
|
+
timeout=None,
|
|
320
|
+
metadata=None,
|
|
321
|
+
):
|
|
322
|
+
return grpc.experimental.unary_unary(
|
|
323
|
+
request,
|
|
324
|
+
target,
|
|
325
|
+
"/morphml.distributed.WorkerService/Evaluate",
|
|
326
|
+
worker__pb2.EvaluateRequest.SerializeToString,
|
|
327
|
+
worker__pb2.EvaluateResponse.FromString,
|
|
328
|
+
options,
|
|
329
|
+
channel_credentials,
|
|
330
|
+
insecure,
|
|
331
|
+
call_credentials,
|
|
332
|
+
compression,
|
|
333
|
+
wait_for_ready,
|
|
334
|
+
timeout,
|
|
335
|
+
metadata,
|
|
336
|
+
)
|
|
337
|
+
|
|
338
|
+
@staticmethod
|
|
339
|
+
def GetStatus(
|
|
340
|
+
request,
|
|
341
|
+
target,
|
|
342
|
+
options=(),
|
|
343
|
+
channel_credentials=None,
|
|
344
|
+
call_credentials=None,
|
|
345
|
+
insecure=False,
|
|
346
|
+
compression=None,
|
|
347
|
+
wait_for_ready=None,
|
|
348
|
+
timeout=None,
|
|
349
|
+
metadata=None,
|
|
350
|
+
):
|
|
351
|
+
return grpc.experimental.unary_unary(
|
|
352
|
+
request,
|
|
353
|
+
target,
|
|
354
|
+
"/morphml.distributed.WorkerService/GetStatus",
|
|
355
|
+
worker__pb2.StatusRequest.SerializeToString,
|
|
356
|
+
worker__pb2.StatusResponse.FromString,
|
|
357
|
+
options,
|
|
358
|
+
channel_credentials,
|
|
359
|
+
insecure,
|
|
360
|
+
call_credentials,
|
|
361
|
+
compression,
|
|
362
|
+
wait_for_ready,
|
|
363
|
+
timeout,
|
|
364
|
+
metadata,
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
@staticmethod
|
|
368
|
+
def Shutdown(
|
|
369
|
+
request,
|
|
370
|
+
target,
|
|
371
|
+
options=(),
|
|
372
|
+
channel_credentials=None,
|
|
373
|
+
call_credentials=None,
|
|
374
|
+
insecure=False,
|
|
375
|
+
compression=None,
|
|
376
|
+
wait_for_ready=None,
|
|
377
|
+
timeout=None,
|
|
378
|
+
metadata=None,
|
|
379
|
+
):
|
|
380
|
+
return grpc.experimental.unary_unary(
|
|
381
|
+
request,
|
|
382
|
+
target,
|
|
383
|
+
"/morphml.distributed.WorkerService/Shutdown",
|
|
384
|
+
worker__pb2.ShutdownRequest.SerializeToString,
|
|
385
|
+
worker__pb2.ShutdownResponse.FromString,
|
|
386
|
+
options,
|
|
387
|
+
channel_credentials,
|
|
388
|
+
insecure,
|
|
389
|
+
call_credentials,
|
|
390
|
+
compression,
|
|
391
|
+
wait_for_ready,
|
|
392
|
+
timeout,
|
|
393
|
+
metadata,
|
|
394
|
+
)
|
|
395
|
+
|
|
396
|
+
@staticmethod
|
|
397
|
+
def CancelTask(
|
|
398
|
+
request,
|
|
399
|
+
target,
|
|
400
|
+
options=(),
|
|
401
|
+
channel_credentials=None,
|
|
402
|
+
call_credentials=None,
|
|
403
|
+
insecure=False,
|
|
404
|
+
compression=None,
|
|
405
|
+
wait_for_ready=None,
|
|
406
|
+
timeout=None,
|
|
407
|
+
metadata=None,
|
|
408
|
+
):
|
|
409
|
+
return grpc.experimental.unary_unary(
|
|
410
|
+
request,
|
|
411
|
+
target,
|
|
412
|
+
"/morphml.distributed.WorkerService/CancelTask",
|
|
413
|
+
worker__pb2.CancelRequest.SerializeToString,
|
|
414
|
+
worker__pb2.CancelResponse.FromString,
|
|
415
|
+
options,
|
|
416
|
+
channel_credentials,
|
|
417
|
+
insecure,
|
|
418
|
+
call_credentials,
|
|
419
|
+
compression,
|
|
420
|
+
wait_for_ready,
|
|
421
|
+
timeout,
|
|
422
|
+
metadata,
|
|
423
|
+
)
|