flwr-nightly 1.7.0.dev20240116__py3-none-any.whl → 1.7.0.dev20240118__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. flwr/client/app.py +7 -4
  2. flwr/client/dpfedavg_numpy_client.py +4 -4
  3. flwr/client/grpc_client/connection.py +7 -4
  4. flwr/client/grpc_rere_client/connection.py +4 -4
  5. flwr/client/message_handler/message_handler.py +11 -2
  6. flwr/client/message_handler/task_handler.py +8 -6
  7. flwr/client/node_state_tests.py +1 -1
  8. flwr/client/numpy_client.py +2 -2
  9. flwr/client/rest_client/connection.py +7 -3
  10. flwr/client/secure_aggregation/secaggplus_handler.py +6 -6
  11. flwr/client/typing.py +1 -1
  12. flwr/common/configsrecord.py +98 -0
  13. flwr/common/logger.py +14 -0
  14. flwr/common/metricsrecord.py +96 -0
  15. flwr/common/parametersrecord.py +110 -0
  16. flwr/common/recordset.py +8 -18
  17. flwr/common/recordset_utils.py +87 -0
  18. flwr/common/retry_invoker.py +1 -0
  19. flwr/common/serde.py +12 -8
  20. flwr/common/typing.py +9 -0
  21. flwr/driver/app.py +5 -3
  22. flwr/driver/driver.py +3 -3
  23. flwr/driver/driver_client_proxy.py +24 -15
  24. flwr/driver/grpc_driver.py +6 -6
  25. flwr/proto/driver_pb2.py +23 -88
  26. flwr/proto/fleet_pb2.py +29 -111
  27. flwr/proto/node_pb2.py +7 -15
  28. flwr/proto/task_pb2.py +33 -127
  29. flwr/proto/transport_pb2.py +69 -278
  30. flwr/server/app.py +9 -3
  31. flwr/server/driver/driver_servicer.py +4 -4
  32. flwr/server/fleet/grpc_bidi/flower_service_servicer.py +5 -2
  33. flwr/server/fleet/grpc_bidi/grpc_bridge.py +9 -6
  34. flwr/server/fleet/grpc_bidi/grpc_client_proxy.py +4 -1
  35. flwr/server/fleet/grpc_bidi/grpc_server.py +3 -1
  36. flwr/server/fleet/grpc_bidi/ins_scheduler.py +7 -4
  37. flwr/server/fleet/grpc_rere/fleet_servicer.py +2 -2
  38. flwr/server/fleet/message_handler/message_handler.py +3 -3
  39. flwr/server/fleet/rest_rere/rest_api.py +1 -1
  40. flwr/server/state/in_memory_state.py +1 -1
  41. flwr/server/state/sqlite_state.py +8 -5
  42. flwr/server/state/state.py +1 -1
  43. flwr/server/strategy/aggregate.py +8 -8
  44. flwr/server/strategy/dpfedavg_adaptive.py +1 -1
  45. flwr/server/strategy/dpfedavg_fixed.py +2 -2
  46. flwr/server/strategy/fedavg_android.py +0 -2
  47. flwr/server/strategy/fedmedian.py +1 -1
  48. flwr/server/strategy/fedxgb_nn_avg.py +9 -2
  49. flwr/server/strategy/qfedavg.py +1 -1
  50. flwr/server/utils/validator.py +1 -1
  51. {flwr_nightly-1.7.0.dev20240116.dist-info → flwr_nightly-1.7.0.dev20240118.dist-info}/METADATA +3 -3
  52. {flwr_nightly-1.7.0.dev20240116.dist-info → flwr_nightly-1.7.0.dev20240118.dist-info}/RECORD +55 -51
  53. {flwr_nightly-1.7.0.dev20240116.dist-info → flwr_nightly-1.7.0.dev20240118.dist-info}/LICENSE +0 -0
  54. {flwr_nightly-1.7.0.dev20240116.dist-info → flwr_nightly-1.7.0.dev20240118.dist-info}/WHEEL +0 -0
  55. {flwr_nightly-1.7.0.dev20240116.dist-info → flwr_nightly-1.7.0.dev20240118.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,87 @@
1
+ # Copyright 2024 Flower Labs GmbH. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ # ==============================================================================
15
+ """RecordSet utilities."""
16
+
17
+
18
+ from typing import OrderedDict
19
+
20
+ from .parametersrecord import Array, ParametersRecord
21
+ from .typing import Parameters
22
+
23
+
24
+ def parametersrecord_to_parameters(
25
+ record: ParametersRecord, keep_input: bool = False
26
+ ) -> Parameters:
27
+ """Convert ParameterRecord to legacy Parameters.
28
+
29
+ Warning: Because `Arrays` in `ParametersRecord` encode more information of the
30
+ array-like or tensor-like data (e.g their datatype, shape) than `Parameters` it
31
+ might not be possible to reconstruct such data structures from `Parameters` objects
32
+ alone. Additional information or metadta must be provided from elsewhere.
33
+
34
+ Parameters
35
+ ----------
36
+ record : ParametersRecord
37
+ The record to be conveted into Parameters.
38
+ keep_input : bool (default: False)
39
+ A boolean indicating whether entries in the record should be deleted from the
40
+ input dictionary immediately after adding them to the record.
41
+ """
42
+ parameters = Parameters(tensors=[], tensor_type="")
43
+
44
+ for key in list(record.data.keys()):
45
+ parameters.tensors.append(record.data[key].data)
46
+
47
+ if not keep_input:
48
+ del record.data[key]
49
+
50
+ return parameters
51
+
52
+
53
+ def parameters_to_parametersrecord(
54
+ parameters: Parameters, keep_input: bool = False
55
+ ) -> ParametersRecord:
56
+ """Convert legacy Parameters into a single ParametersRecord.
57
+
58
+ Because there is no concept of names in the legacy Parameters, arbitrary keys will
59
+ be used when constructing the ParametersRecord. Similarly, the shape and data type
60
+ won't be recorded in the Array objects.
61
+
62
+ Parameters
63
+ ----------
64
+ parameters : Parameters
65
+ Parameters object to be represented as a ParametersRecord.
66
+ keep_input : bool (default: False)
67
+ A boolean indicating whether parameters should be deleted from the input
68
+ Parameters object (i.e. a list of serialized NumPy arrays) immediately after
69
+ adding them to the record.
70
+ """
71
+ tensor_type = parameters.tensor_type
72
+
73
+ p_record = ParametersRecord()
74
+
75
+ num_arrays = len(parameters.tensors)
76
+ for idx in range(num_arrays):
77
+ if keep_input:
78
+ tensor = parameters.tensors[idx]
79
+ else:
80
+ tensor = parameters.tensors.pop(0)
81
+ p_record.set_parameters(
82
+ OrderedDict(
83
+ {str(idx): Array(data=tensor, dtype="", stype=tensor_type, shape=[])}
84
+ )
85
+ )
86
+
87
+ return p_record
@@ -156,6 +156,7 @@ class RetryInvoker:
156
156
  >>> invoker.invoke(my_func, arg1, arg2, kw1=kwarg1)
157
157
  """
158
158
 
159
+ # pylint: disable-next=too-many-arguments
159
160
  def __init__(
160
161
  self,
161
162
  wait_factory: Callable[[], Generator[float, None, None]],
flwr/common/serde.py CHANGED
@@ -17,8 +17,8 @@
17
17
 
18
18
  from typing import Any, Dict, List, MutableMapping, cast
19
19
 
20
- from flwr.proto.task_pb2 import Value
21
- from flwr.proto.transport_pb2 import (
20
+ from flwr.proto.task_pb2 import Value # pylint: disable=E0611
21
+ from flwr.proto.transport_pb2 import ( # pylint: disable=E0611
22
22
  ClientMessage,
23
23
  Code,
24
24
  Parameters,
@@ -59,7 +59,9 @@ def server_message_to_proto(server_message: typing.ServerMessage) -> ServerMessa
59
59
  server_message.evaluate_ins,
60
60
  )
61
61
  )
62
- raise Exception("No instruction set in ServerMessage, cannot serialize to ProtoBuf")
62
+ raise ValueError(
63
+ "No instruction set in ServerMessage, cannot serialize to ProtoBuf"
64
+ )
63
65
 
64
66
 
65
67
  def server_message_from_proto(
@@ -91,7 +93,7 @@ def server_message_from_proto(
91
93
  server_message_proto.evaluate_ins,
92
94
  )
93
95
  )
94
- raise Exception(
96
+ raise ValueError(
95
97
  "Unsupported instruction in ServerMessage, cannot deserialize from ProtoBuf"
96
98
  )
97
99
 
@@ -125,7 +127,9 @@ def client_message_to_proto(client_message: typing.ClientMessage) -> ClientMessa
125
127
  client_message.evaluate_res,
126
128
  )
127
129
  )
128
- raise Exception("No instruction set in ClientMessage, cannot serialize to ProtoBuf")
130
+ raise ValueError(
131
+ "No instruction set in ClientMessage, cannot serialize to ProtoBuf"
132
+ )
129
133
 
130
134
 
131
135
  def client_message_from_proto(
@@ -157,7 +161,7 @@ def client_message_from_proto(
157
161
  client_message_proto.evaluate_res,
158
162
  )
159
163
  )
160
- raise Exception(
164
+ raise ValueError(
161
165
  "Unsupported instruction in ClientMessage, cannot deserialize from ProtoBuf"
162
166
  )
163
167
 
@@ -474,7 +478,7 @@ def scalar_to_proto(scalar: typing.Scalar) -> Scalar:
474
478
  if isinstance(scalar, str):
475
479
  return Scalar(string=scalar)
476
480
 
477
- raise Exception(
481
+ raise ValueError(
478
482
  f"Accepted types: {bool, bytes, float, int, str} (but not {type(scalar)})"
479
483
  )
480
484
 
@@ -518,7 +522,7 @@ def _check_value(value: typing.Value) -> None:
518
522
  for element in value:
519
523
  if isinstance(element, data_type):
520
524
  continue
521
- raise Exception(
525
+ raise TypeError(
522
526
  f"Inconsistent type: the types of elements in the list must "
523
527
  f"be the same (expected {data_type}, but got {type(element)})."
524
528
  )
flwr/common/typing.py CHANGED
@@ -45,6 +45,15 @@ Value = Union[
45
45
  List[str],
46
46
  ]
47
47
 
48
+ # Value types for common.MetricsRecord
49
+ MetricsScalar = Union[int, float]
50
+ MetricsScalarList = Union[List[int], List[float]]
51
+ MetricsRecordValues = Union[MetricsScalar, MetricsScalarList]
52
+ # Value types for common.ConfigsRecord
53
+ ConfigsScalar = Union[MetricsScalar, str, bytes]
54
+ ConfigsScalarList = Union[MetricsScalarList, List[str], List[bytes]]
55
+ ConfigsRecordValues = Union[ConfigsScalar, ConfigsScalarList]
56
+
48
57
  Metrics = Dict[str, Scalar]
49
58
  MetricsAggregationFn = Callable[[List[Tuple[int, Metrics]]], Metrics]
50
59
 
flwr/driver/app.py CHANGED
@@ -25,7 +25,7 @@ from typing import Dict, Optional, Union
25
25
  from flwr.common import EventType, event
26
26
  from flwr.common.address import parse_address
27
27
  from flwr.common.logger import log
28
- from flwr.proto import driver_pb2
28
+ from flwr.proto import driver_pb2 # pylint: disable=E0611
29
29
  from flwr.server.app import ServerConfig, init_defaults, run_fl
30
30
  from flwr.server.client_manager import ClientManager
31
31
  from flwr.server.history import History
@@ -171,7 +171,9 @@ def update_client_manager(
171
171
  `client_manager.unregister()`.
172
172
  """
173
173
  # Request for run_id
174
- run_id = driver.create_run(driver_pb2.CreateRunRequest()).run_id
174
+ run_id = driver.create_run(
175
+ driver_pb2.CreateRunRequest() # pylint: disable=E1101
176
+ ).run_id
175
177
 
176
178
  # Loop until the driver is disconnected
177
179
  registered_nodes: Dict[int, DriverClientProxy] = {}
@@ -181,7 +183,7 @@ def update_client_manager(
181
183
  if driver.stub is None:
182
184
  break
183
185
  get_nodes_res = driver.get_nodes(
184
- req=driver_pb2.GetNodesRequest(run_id=run_id)
186
+ req=driver_pb2.GetNodesRequest(run_id=run_id) # pylint: disable=E1101
185
187
  )
186
188
  all_node_ids = {node.node_id for node in get_nodes_res.nodes}
187
189
  dead_nodes = set(registered_nodes).difference(all_node_ids)
flwr/driver/driver.py CHANGED
@@ -18,14 +18,14 @@
18
18
  from typing import Iterable, List, Optional, Tuple
19
19
 
20
20
  from flwr.driver.grpc_driver import DEFAULT_SERVER_ADDRESS_DRIVER, GrpcDriver
21
- from flwr.proto.driver_pb2 import (
21
+ from flwr.proto.driver_pb2 import ( # pylint: disable=E0611
22
22
  CreateRunRequest,
23
23
  GetNodesRequest,
24
24
  PullTaskResRequest,
25
25
  PushTaskInsRequest,
26
26
  )
27
- from flwr.proto.node_pb2 import Node
28
- from flwr.proto.task_pb2 import TaskIns, TaskRes
27
+ from flwr.proto.node_pb2 import Node # pylint: disable=E0611
28
+ from flwr.proto.task_pb2 import TaskIns, TaskRes # pylint: disable=E0611
29
29
 
30
30
 
31
31
  class Driver:
@@ -20,7 +20,12 @@ from typing import List, Optional, cast
20
20
 
21
21
  from flwr import common
22
22
  from flwr.common import serde
23
- from flwr.proto import driver_pb2, node_pb2, task_pb2, transport_pb2
23
+ from flwr.proto import ( # pylint: disable=E0611
24
+ driver_pb2,
25
+ node_pb2,
26
+ task_pb2,
27
+ transport_pb2,
28
+ )
24
29
  from flwr.server.client_proxy import ClientProxy
25
30
 
26
31
  from .grpc_driver import GrpcDriver
@@ -42,7 +47,7 @@ class DriverClientProxy(ClientProxy):
42
47
  self, ins: common.GetPropertiesIns, timeout: Optional[float]
43
48
  ) -> common.GetPropertiesRes:
44
49
  """Return client's properties."""
45
- server_message_proto: transport_pb2.ServerMessage = (
50
+ server_message_proto: transport_pb2.ServerMessage = ( # pylint: disable=E1101
46
51
  serde.server_message_to_proto(
47
52
  server_message=common.ServerMessage(get_properties_ins=ins)
48
53
  )
@@ -56,7 +61,7 @@ class DriverClientProxy(ClientProxy):
56
61
  self, ins: common.GetParametersIns, timeout: Optional[float]
57
62
  ) -> common.GetParametersRes:
58
63
  """Return the current local model parameters."""
59
- server_message_proto: transport_pb2.ServerMessage = (
64
+ server_message_proto: transport_pb2.ServerMessage = ( # pylint: disable=E1101
60
65
  serde.server_message_to_proto(
61
66
  server_message=common.ServerMessage(get_parameters_ins=ins)
62
67
  )
@@ -68,7 +73,7 @@ class DriverClientProxy(ClientProxy):
68
73
 
69
74
  def fit(self, ins: common.FitIns, timeout: Optional[float]) -> common.FitRes:
70
75
  """Train model parameters on the locally held dataset."""
71
- server_message_proto: transport_pb2.ServerMessage = (
76
+ server_message_proto: transport_pb2.ServerMessage = ( # pylint: disable=E1101
72
77
  serde.server_message_to_proto(
73
78
  server_message=common.ServerMessage(fit_ins=ins)
74
79
  )
@@ -82,7 +87,7 @@ class DriverClientProxy(ClientProxy):
82
87
  self, ins: common.EvaluateIns, timeout: Optional[float]
83
88
  ) -> common.EvaluateRes:
84
89
  """Evaluate model parameters on the locally held dataset."""
85
- server_message_proto: transport_pb2.ServerMessage = (
90
+ server_message_proto: transport_pb2.ServerMessage = ( # pylint: disable=E1101
86
91
  serde.server_message_to_proto(
87
92
  server_message=common.ServerMessage(evaluate_ins=ins)
88
93
  )
@@ -99,25 +104,29 @@ class DriverClientProxy(ClientProxy):
99
104
  return common.DisconnectRes(reason="") # Nothing to do here (yet)
100
105
 
101
106
  def _send_receive_msg(
102
- self, server_message: transport_pb2.ServerMessage, timeout: Optional[float]
103
- ) -> transport_pb2.ClientMessage:
104
- task_ins = task_pb2.TaskIns(
107
+ self,
108
+ server_message: transport_pb2.ServerMessage, # pylint: disable=E1101
109
+ timeout: Optional[float],
110
+ ) -> transport_pb2.ClientMessage: # pylint: disable=E1101
111
+ task_ins = task_pb2.TaskIns( # pylint: disable=E1101
105
112
  task_id="",
106
113
  group_id="",
107
114
  run_id=self.run_id,
108
- task=task_pb2.Task(
109
- producer=node_pb2.Node(
115
+ task=task_pb2.Task( # pylint: disable=E1101
116
+ producer=node_pb2.Node( # pylint: disable=E1101
110
117
  node_id=0,
111
118
  anonymous=True,
112
119
  ),
113
- consumer=node_pb2.Node(
120
+ consumer=node_pb2.Node( # pylint: disable=E1101
114
121
  node_id=self.node_id,
115
122
  anonymous=self.anonymous,
116
123
  ),
117
124
  legacy_server_message=server_message,
118
125
  ),
119
126
  )
120
- push_task_ins_req = driver_pb2.PushTaskInsRequest(task_ins_list=[task_ins])
127
+ push_task_ins_req = driver_pb2.PushTaskInsRequest( # pylint: disable=E1101
128
+ task_ins_list=[task_ins]
129
+ )
121
130
 
122
131
  # Send TaskIns to Driver API
123
132
  push_task_ins_res = self.driver.push_task_ins(req=push_task_ins_req)
@@ -133,15 +142,15 @@ class DriverClientProxy(ClientProxy):
133
142
  start_time = time.time()
134
143
 
135
144
  while True:
136
- pull_task_res_req = driver_pb2.PullTaskResRequest(
137
- node=node_pb2.Node(node_id=0, anonymous=True),
145
+ pull_task_res_req = driver_pb2.PullTaskResRequest( # pylint: disable=E1101
146
+ node=node_pb2.Node(node_id=0, anonymous=True), # pylint: disable=E1101
138
147
  task_ids=[task_id],
139
148
  )
140
149
 
141
150
  # Ask Driver API for TaskRes
142
151
  pull_task_res_res = self.driver.pull_task_res(req=pull_task_res_req)
143
152
 
144
- task_res_list: List[task_pb2.TaskRes] = list(
153
+ task_res_list: List[task_pb2.TaskRes] = list( # pylint: disable=E1101
145
154
  pull_task_res_res.task_res_list
146
155
  )
147
156
  if len(task_res_list) == 1:
@@ -23,7 +23,7 @@ import grpc
23
23
  from flwr.common import EventType, event
24
24
  from flwr.common.grpc import create_channel
25
25
  from flwr.common.logger import log
26
- from flwr.proto.driver_pb2 import (
26
+ from flwr.proto.driver_pb2 import ( # pylint: disable=E0611
27
27
  CreateRunRequest,
28
28
  CreateRunResponse,
29
29
  GetNodesRequest,
@@ -33,7 +33,7 @@ from flwr.proto.driver_pb2 import (
33
33
  PushTaskInsRequest,
34
34
  PushTaskInsResponse,
35
35
  )
36
- from flwr.proto.driver_pb2_grpc import DriverStub
36
+ from flwr.proto.driver_pb2_grpc import DriverStub # pylint: disable=E0611
37
37
 
38
38
  DEFAULT_SERVER_ADDRESS_DRIVER = "[::]:9091"
39
39
 
@@ -89,7 +89,7 @@ class GrpcDriver:
89
89
  # Check if channel is open
90
90
  if self.stub is None:
91
91
  log(ERROR, ERROR_MESSAGE_DRIVER_NOT_CONNECTED)
92
- raise Exception("`GrpcDriver` instance not connected")
92
+ raise ConnectionError("`GrpcDriver` instance not connected")
93
93
 
94
94
  # Call Driver API
95
95
  res: CreateRunResponse = self.stub.CreateRun(request=req)
@@ -100,7 +100,7 @@ class GrpcDriver:
100
100
  # Check if channel is open
101
101
  if self.stub is None:
102
102
  log(ERROR, ERROR_MESSAGE_DRIVER_NOT_CONNECTED)
103
- raise Exception("`GrpcDriver` instance not connected")
103
+ raise ConnectionError("`GrpcDriver` instance not connected")
104
104
 
105
105
  # Call gRPC Driver API
106
106
  res: GetNodesResponse = self.stub.GetNodes(request=req)
@@ -111,7 +111,7 @@ class GrpcDriver:
111
111
  # Check if channel is open
112
112
  if self.stub is None:
113
113
  log(ERROR, ERROR_MESSAGE_DRIVER_NOT_CONNECTED)
114
- raise Exception("`GrpcDriver` instance not connected")
114
+ raise ConnectionError("`GrpcDriver` instance not connected")
115
115
 
116
116
  # Call gRPC Driver API
117
117
  res: PushTaskInsResponse = self.stub.PushTaskIns(request=req)
@@ -122,7 +122,7 @@ class GrpcDriver:
122
122
  # Check if channel is open
123
123
  if self.stub is None:
124
124
  log(ERROR, ERROR_MESSAGE_DRIVER_NOT_CONNECTED)
125
- raise Exception("`GrpcDriver` instance not connected")
125
+ raise ConnectionError("`GrpcDriver` instance not connected")
126
126
 
127
127
  # Call Driver API
128
128
  res: PullTaskResResponse = self.stub.PullTaskRes(request=req)
flwr/proto/driver_pb2.py CHANGED
@@ -1,12 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # source: flwr/proto/driver.proto
4
+ # Protobuf Python Version: 4.25.0
4
5
  """Generated protocol buffer code."""
5
6
  from google.protobuf import descriptor as _descriptor
6
7
  from google.protobuf import descriptor_pool as _descriptor_pool
7
- from google.protobuf import message as _message
8
- from google.protobuf import reflection as _reflection
9
8
  from google.protobuf import symbol_database as _symbol_database
9
+ from google.protobuf.internal import builder as _builder
10
10
  # @@protoc_insertion_point(imports)
11
11
 
12
12
  _sym_db = _symbol_database.Default()
@@ -18,92 +18,27 @@ from flwr.proto import task_pb2 as flwr_dot_proto_dot_task__pb2
18
18
 
19
19
  DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x17\x66lwr/proto/driver.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x15\x66lwr/proto/task.proto\"\x12\n\x10\x43reateRunRequest\"#\n\x11\x43reateRunResponse\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\"!\n\x0fGetNodesRequest\x12\x0e\n\x06run_id\x18\x01 \x01(\x12\"3\n\x10GetNodesResponse\x12\x1f\n\x05nodes\x18\x01 \x03(\x0b\x32\x10.flwr.proto.Node\"@\n\x12PushTaskInsRequest\x12*\n\rtask_ins_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.TaskIns\"\'\n\x13PushTaskInsResponse\x12\x10\n\x08task_ids\x18\x02 \x03(\t\"F\n\x12PullTaskResRequest\x12\x1e\n\x04node\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x10\n\x08task_ids\x18\x02 \x03(\t\"A\n\x13PullTaskResResponse\x12*\n\rtask_res_list\x18\x01 \x03(\x0b\x32\x13.flwr.proto.TaskRes2\xc1\x02\n\x06\x44river\x12J\n\tCreateRun\x12\x1c.flwr.proto.CreateRunRequest\x1a\x1d.flwr.proto.CreateRunResponse\"\x00\x12G\n\x08GetNodes\x12\x1b.flwr.proto.GetNodesRequest\x1a\x1c.flwr.proto.GetNodesResponse\"\x00\x12P\n\x0bPushTaskIns\x12\x1e.flwr.proto.PushTaskInsRequest\x1a\x1f.flwr.proto.PushTaskInsResponse\"\x00\x12P\n\x0bPullTaskRes\x12\x1e.flwr.proto.PullTaskResRequest\x1a\x1f.flwr.proto.PullTaskResResponse\"\x00\x62\x06proto3')
20
20
 
21
-
22
-
23
- _CREATERUNREQUEST = DESCRIPTOR.message_types_by_name['CreateRunRequest']
24
- _CREATERUNRESPONSE = DESCRIPTOR.message_types_by_name['CreateRunResponse']
25
- _GETNODESREQUEST = DESCRIPTOR.message_types_by_name['GetNodesRequest']
26
- _GETNODESRESPONSE = DESCRIPTOR.message_types_by_name['GetNodesResponse']
27
- _PUSHTASKINSREQUEST = DESCRIPTOR.message_types_by_name['PushTaskInsRequest']
28
- _PUSHTASKINSRESPONSE = DESCRIPTOR.message_types_by_name['PushTaskInsResponse']
29
- _PULLTASKRESREQUEST = DESCRIPTOR.message_types_by_name['PullTaskResRequest']
30
- _PULLTASKRESRESPONSE = DESCRIPTOR.message_types_by_name['PullTaskResResponse']
31
- CreateRunRequest = _reflection.GeneratedProtocolMessageType('CreateRunRequest', (_message.Message,), {
32
- 'DESCRIPTOR' : _CREATERUNREQUEST,
33
- '__module__' : 'flwr.proto.driver_pb2'
34
- # @@protoc_insertion_point(class_scope:flwr.proto.CreateRunRequest)
35
- })
36
- _sym_db.RegisterMessage(CreateRunRequest)
37
-
38
- CreateRunResponse = _reflection.GeneratedProtocolMessageType('CreateRunResponse', (_message.Message,), {
39
- 'DESCRIPTOR' : _CREATERUNRESPONSE,
40
- '__module__' : 'flwr.proto.driver_pb2'
41
- # @@protoc_insertion_point(class_scope:flwr.proto.CreateRunResponse)
42
- })
43
- _sym_db.RegisterMessage(CreateRunResponse)
44
-
45
- GetNodesRequest = _reflection.GeneratedProtocolMessageType('GetNodesRequest', (_message.Message,), {
46
- 'DESCRIPTOR' : _GETNODESREQUEST,
47
- '__module__' : 'flwr.proto.driver_pb2'
48
- # @@protoc_insertion_point(class_scope:flwr.proto.GetNodesRequest)
49
- })
50
- _sym_db.RegisterMessage(GetNodesRequest)
51
-
52
- GetNodesResponse = _reflection.GeneratedProtocolMessageType('GetNodesResponse', (_message.Message,), {
53
- 'DESCRIPTOR' : _GETNODESRESPONSE,
54
- '__module__' : 'flwr.proto.driver_pb2'
55
- # @@protoc_insertion_point(class_scope:flwr.proto.GetNodesResponse)
56
- })
57
- _sym_db.RegisterMessage(GetNodesResponse)
58
-
59
- PushTaskInsRequest = _reflection.GeneratedProtocolMessageType('PushTaskInsRequest', (_message.Message,), {
60
- 'DESCRIPTOR' : _PUSHTASKINSREQUEST,
61
- '__module__' : 'flwr.proto.driver_pb2'
62
- # @@protoc_insertion_point(class_scope:flwr.proto.PushTaskInsRequest)
63
- })
64
- _sym_db.RegisterMessage(PushTaskInsRequest)
65
-
66
- PushTaskInsResponse = _reflection.GeneratedProtocolMessageType('PushTaskInsResponse', (_message.Message,), {
67
- 'DESCRIPTOR' : _PUSHTASKINSRESPONSE,
68
- '__module__' : 'flwr.proto.driver_pb2'
69
- # @@protoc_insertion_point(class_scope:flwr.proto.PushTaskInsResponse)
70
- })
71
- _sym_db.RegisterMessage(PushTaskInsResponse)
72
-
73
- PullTaskResRequest = _reflection.GeneratedProtocolMessageType('PullTaskResRequest', (_message.Message,), {
74
- 'DESCRIPTOR' : _PULLTASKRESREQUEST,
75
- '__module__' : 'flwr.proto.driver_pb2'
76
- # @@protoc_insertion_point(class_scope:flwr.proto.PullTaskResRequest)
77
- })
78
- _sym_db.RegisterMessage(PullTaskResRequest)
79
-
80
- PullTaskResResponse = _reflection.GeneratedProtocolMessageType('PullTaskResResponse', (_message.Message,), {
81
- 'DESCRIPTOR' : _PULLTASKRESRESPONSE,
82
- '__module__' : 'flwr.proto.driver_pb2'
83
- # @@protoc_insertion_point(class_scope:flwr.proto.PullTaskResResponse)
84
- })
85
- _sym_db.RegisterMessage(PullTaskResResponse)
86
-
87
- _DRIVER = DESCRIPTOR.services_by_name['Driver']
21
+ _globals = globals()
22
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
23
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.driver_pb2', _globals)
88
24
  if _descriptor._USE_C_DESCRIPTORS == False:
89
-
90
25
  DESCRIPTOR._options = None
91
- _CREATERUNREQUEST._serialized_start=85
92
- _CREATERUNREQUEST._serialized_end=103
93
- _CREATERUNRESPONSE._serialized_start=105
94
- _CREATERUNRESPONSE._serialized_end=140
95
- _GETNODESREQUEST._serialized_start=142
96
- _GETNODESREQUEST._serialized_end=175
97
- _GETNODESRESPONSE._serialized_start=177
98
- _GETNODESRESPONSE._serialized_end=228
99
- _PUSHTASKINSREQUEST._serialized_start=230
100
- _PUSHTASKINSREQUEST._serialized_end=294
101
- _PUSHTASKINSRESPONSE._serialized_start=296
102
- _PUSHTASKINSRESPONSE._serialized_end=335
103
- _PULLTASKRESREQUEST._serialized_start=337
104
- _PULLTASKRESREQUEST._serialized_end=407
105
- _PULLTASKRESRESPONSE._serialized_start=409
106
- _PULLTASKRESRESPONSE._serialized_end=474
107
- _DRIVER._serialized_start=477
108
- _DRIVER._serialized_end=798
26
+ _globals['_CREATERUNREQUEST']._serialized_start=85
27
+ _globals['_CREATERUNREQUEST']._serialized_end=103
28
+ _globals['_CREATERUNRESPONSE']._serialized_start=105
29
+ _globals['_CREATERUNRESPONSE']._serialized_end=140
30
+ _globals['_GETNODESREQUEST']._serialized_start=142
31
+ _globals['_GETNODESREQUEST']._serialized_end=175
32
+ _globals['_GETNODESRESPONSE']._serialized_start=177
33
+ _globals['_GETNODESRESPONSE']._serialized_end=228
34
+ _globals['_PUSHTASKINSREQUEST']._serialized_start=230
35
+ _globals['_PUSHTASKINSREQUEST']._serialized_end=294
36
+ _globals['_PUSHTASKINSRESPONSE']._serialized_start=296
37
+ _globals['_PUSHTASKINSRESPONSE']._serialized_end=335
38
+ _globals['_PULLTASKRESREQUEST']._serialized_start=337
39
+ _globals['_PULLTASKRESREQUEST']._serialized_end=407
40
+ _globals['_PULLTASKRESRESPONSE']._serialized_start=409
41
+ _globals['_PULLTASKRESRESPONSE']._serialized_end=474
42
+ _globals['_DRIVER']._serialized_start=477
43
+ _globals['_DRIVER']._serialized_end=798
109
44
  # @@protoc_insertion_point(module_scope)