flwr-nightly 1.15.0.dev20250129__py3-none-any.whl → 1.15.2.dev20250214__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.
Files changed (68) hide show
  1. flwr/cli/auth_plugin/oidc_cli_plugin.py +2 -2
  2. flwr/cli/ls.py +3 -2
  3. flwr/cli/new/templates/app/README.baseline.md.tpl +4 -4
  4. flwr/cli/new/templates/app/README.md.tpl +3 -2
  5. flwr/cli/new/templates/app/pyproject.baseline.toml.tpl +4 -4
  6. flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +2 -2
  7. flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +4 -4
  8. flwr/cli/new/templates/app/pyproject.jax.toml.tpl +2 -2
  9. flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +2 -2
  10. flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +2 -2
  11. flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +2 -2
  12. flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +3 -3
  13. flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +2 -2
  14. flwr/cli/stop.py +3 -2
  15. flwr/cli/utils.py +3 -3
  16. flwr/client/supernode/app.py +4 -28
  17. flwr/common/args.py +25 -47
  18. flwr/common/config.py +15 -2
  19. flwr/common/constant.py +9 -7
  20. flwr/common/exit_handlers.py +17 -29
  21. flwr/common/logger.py +10 -5
  22. flwr/common/object_ref.py +0 -14
  23. flwr/proto/clientappio_pb2.py +3 -13
  24. flwr/proto/clientappio_pb2_grpc.py +12 -63
  25. flwr/proto/error_pb2.py +3 -13
  26. flwr/proto/error_pb2_grpc.py +0 -20
  27. flwr/proto/exec_pb2.py +5 -15
  28. flwr/proto/exec_pb2_grpc.py +24 -105
  29. flwr/proto/fab_pb2.py +3 -13
  30. flwr/proto/fab_pb2_grpc.py +0 -20
  31. flwr/proto/fleet_pb2.py +4 -14
  32. flwr/proto/fleet_pb2_grpc.py +28 -119
  33. flwr/proto/grpcadapter_pb2.py +4 -14
  34. flwr/proto/grpcadapter_pb2_grpc.py +4 -35
  35. flwr/proto/log_pb2.py +3 -13
  36. flwr/proto/log_pb2_grpc.py +0 -20
  37. flwr/proto/message_pb2.py +5 -15
  38. flwr/proto/message_pb2_grpc.py +0 -20
  39. flwr/proto/node_pb2.py +3 -13
  40. flwr/proto/node_pb2_grpc.py +0 -20
  41. flwr/proto/recordset_pb2.py +8 -18
  42. flwr/proto/recordset_pb2_grpc.py +0 -20
  43. flwr/proto/run_pb2.py +6 -16
  44. flwr/proto/run_pb2_grpc.py +0 -20
  45. flwr/proto/serverappio_pb2.py +26 -45
  46. flwr/proto/serverappio_pb2.pyi +0 -62
  47. flwr/proto/serverappio_pb2_grpc.py +47 -264
  48. flwr/proto/serverappio_pb2_grpc.pyi +7 -27
  49. flwr/proto/simulationio_pb2.py +3 -13
  50. flwr/proto/simulationio_pb2_grpc.py +24 -105
  51. flwr/proto/task_pb2.py +9 -19
  52. flwr/proto/task_pb2.pyi +1 -4
  53. flwr/proto/task_pb2_grpc.py +0 -20
  54. flwr/proto/transport_pb2.py +10 -20
  55. flwr/proto/transport_pb2_grpc.py +4 -35
  56. flwr/server/app.py +5 -9
  57. flwr/server/driver/inmemory_driver.py +0 -1
  58. flwr/server/superlink/driver/serverappio_servicer.py +1 -99
  59. flwr/server/superlink/fleet/grpc_rere/server_interceptor.py +17 -4
  60. flwr/server/superlink/fleet/message_handler/message_handler.py +0 -4
  61. flwr/server/superlink/fleet/vce/vce_api.py +0 -1
  62. flwr/server/superlink/linkstate/sqlite_linkstate.py +0 -6
  63. flwr/server/utils/validator.py +0 -3
  64. {flwr_nightly-1.15.0.dev20250129.dist-info → flwr_nightly-1.15.2.dev20250214.dist-info}/METADATA +4 -4
  65. {flwr_nightly-1.15.0.dev20250129.dist-info → flwr_nightly-1.15.2.dev20250214.dist-info}/RECORD +68 -68
  66. {flwr_nightly-1.15.0.dev20250129.dist-info → flwr_nightly-1.15.2.dev20250214.dist-info}/LICENSE +0 -0
  67. {flwr_nightly-1.15.0.dev20250129.dist-info → flwr_nightly-1.15.2.dev20250214.dist-info}/WHEEL +0 -0
  68. {flwr_nightly-1.15.0.dev20250129.dist-info → flwr_nightly-1.15.2.dev20250214.dist-info}/entry_points.txt +0 -0
@@ -1,31 +1,11 @@
1
1
  # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
3
  import grpc
4
- import warnings
5
4
 
6
5
  from flwr.proto import log_pb2 as flwr_dot_proto_dot_log__pb2
7
6
  from flwr.proto import run_pb2 as flwr_dot_proto_dot_run__pb2
8
7
  from flwr.proto import simulationio_pb2 as flwr_dot_proto_dot_simulationio__pb2
9
8
 
10
- GRPC_GENERATED_VERSION = '1.69.0'
11
- GRPC_VERSION = grpc.__version__
12
- _version_not_supported = False
13
-
14
- try:
15
- from grpc._utilities import first_version_is_lower
16
- _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
17
- except ImportError:
18
- _version_not_supported = True
19
-
20
- if _version_not_supported:
21
- raise RuntimeError(
22
- f'The grpc package installed is at version {GRPC_VERSION},'
23
- + f' but the generated code in flwr/proto/simulationio_pb2_grpc.py depends on'
24
- + f' grpcio>={GRPC_GENERATED_VERSION}.'
25
- + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
26
- + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
27
- )
28
-
29
9
 
30
10
  class SimulationIoStub(object):
31
11
  """Missing associated documentation comment in .proto file."""
@@ -40,32 +20,32 @@ class SimulationIoStub(object):
40
20
  '/flwr.proto.SimulationIo/PullSimulationInputs',
41
21
  request_serializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsRequest.SerializeToString,
42
22
  response_deserializer=flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsResponse.FromString,
43
- _registered_method=True)
23
+ )
44
24
  self.PushSimulationOutputs = channel.unary_unary(
45
25
  '/flwr.proto.SimulationIo/PushSimulationOutputs',
46
26
  request_serializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsRequest.SerializeToString,
47
27
  response_deserializer=flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsResponse.FromString,
48
- _registered_method=True)
28
+ )
49
29
  self.UpdateRunStatus = channel.unary_unary(
50
30
  '/flwr.proto.SimulationIo/UpdateRunStatus',
51
31
  request_serializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
52
32
  response_deserializer=flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
53
- _registered_method=True)
33
+ )
54
34
  self.PushLogs = channel.unary_unary(
55
35
  '/flwr.proto.SimulationIo/PushLogs',
56
36
  request_serializer=flwr_dot_proto_dot_log__pb2.PushLogsRequest.SerializeToString,
57
37
  response_deserializer=flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
58
- _registered_method=True)
38
+ )
59
39
  self.GetFederationOptions = channel.unary_unary(
60
40
  '/flwr.proto.SimulationIo/GetFederationOptions',
61
41
  request_serializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.SerializeToString,
62
42
  response_deserializer=flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
63
- _registered_method=True)
43
+ )
64
44
  self.GetRunStatus = channel.unary_unary(
65
45
  '/flwr.proto.SimulationIo/GetRunStatus',
66
46
  request_serializer=flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
67
47
  response_deserializer=flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
68
- _registered_method=True)
48
+ )
69
49
 
70
50
 
71
51
  class SimulationIoServicer(object):
@@ -150,7 +130,6 @@ def add_SimulationIoServicer_to_server(servicer, server):
150
130
  generic_handler = grpc.method_handlers_generic_handler(
151
131
  'flwr.proto.SimulationIo', rpc_method_handlers)
152
132
  server.add_generic_rpc_handlers((generic_handler,))
153
- server.add_registered_method_handlers('flwr.proto.SimulationIo', rpc_method_handlers)
154
133
 
155
134
 
156
135
  # This class is part of an EXPERIMENTAL API.
@@ -168,21 +147,11 @@ class SimulationIo(object):
168
147
  wait_for_ready=None,
169
148
  timeout=None,
170
149
  metadata=None):
171
- return grpc.experimental.unary_unary(
172
- request,
173
- target,
174
- '/flwr.proto.SimulationIo/PullSimulationInputs',
150
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PullSimulationInputs',
175
151
  flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsRequest.SerializeToString,
176
152
  flwr_dot_proto_dot_simulationio__pb2.PullSimulationInputsResponse.FromString,
177
- options,
178
- channel_credentials,
179
- insecure,
180
- call_credentials,
181
- compression,
182
- wait_for_ready,
183
- timeout,
184
- metadata,
185
- _registered_method=True)
153
+ options, channel_credentials,
154
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
186
155
 
187
156
  @staticmethod
188
157
  def PushSimulationOutputs(request,
@@ -195,21 +164,11 @@ class SimulationIo(object):
195
164
  wait_for_ready=None,
196
165
  timeout=None,
197
166
  metadata=None):
198
- return grpc.experimental.unary_unary(
199
- request,
200
- target,
201
- '/flwr.proto.SimulationIo/PushSimulationOutputs',
167
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PushSimulationOutputs',
202
168
  flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsRequest.SerializeToString,
203
169
  flwr_dot_proto_dot_simulationio__pb2.PushSimulationOutputsResponse.FromString,
204
- options,
205
- channel_credentials,
206
- insecure,
207
- call_credentials,
208
- compression,
209
- wait_for_ready,
210
- timeout,
211
- metadata,
212
- _registered_method=True)
170
+ options, channel_credentials,
171
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
213
172
 
214
173
  @staticmethod
215
174
  def UpdateRunStatus(request,
@@ -222,21 +181,11 @@ class SimulationIo(object):
222
181
  wait_for_ready=None,
223
182
  timeout=None,
224
183
  metadata=None):
225
- return grpc.experimental.unary_unary(
226
- request,
227
- target,
228
- '/flwr.proto.SimulationIo/UpdateRunStatus',
184
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/UpdateRunStatus',
229
185
  flwr_dot_proto_dot_run__pb2.UpdateRunStatusRequest.SerializeToString,
230
186
  flwr_dot_proto_dot_run__pb2.UpdateRunStatusResponse.FromString,
231
- options,
232
- channel_credentials,
233
- insecure,
234
- call_credentials,
235
- compression,
236
- wait_for_ready,
237
- timeout,
238
- metadata,
239
- _registered_method=True)
187
+ options, channel_credentials,
188
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
240
189
 
241
190
  @staticmethod
242
191
  def PushLogs(request,
@@ -249,21 +198,11 @@ class SimulationIo(object):
249
198
  wait_for_ready=None,
250
199
  timeout=None,
251
200
  metadata=None):
252
- return grpc.experimental.unary_unary(
253
- request,
254
- target,
255
- '/flwr.proto.SimulationIo/PushLogs',
201
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/PushLogs',
256
202
  flwr_dot_proto_dot_log__pb2.PushLogsRequest.SerializeToString,
257
203
  flwr_dot_proto_dot_log__pb2.PushLogsResponse.FromString,
258
- options,
259
- channel_credentials,
260
- insecure,
261
- call_credentials,
262
- compression,
263
- wait_for_ready,
264
- timeout,
265
- metadata,
266
- _registered_method=True)
204
+ options, channel_credentials,
205
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
267
206
 
268
207
  @staticmethod
269
208
  def GetFederationOptions(request,
@@ -276,21 +215,11 @@ class SimulationIo(object):
276
215
  wait_for_ready=None,
277
216
  timeout=None,
278
217
  metadata=None):
279
- return grpc.experimental.unary_unary(
280
- request,
281
- target,
282
- '/flwr.proto.SimulationIo/GetFederationOptions',
218
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/GetFederationOptions',
283
219
  flwr_dot_proto_dot_run__pb2.GetFederationOptionsRequest.SerializeToString,
284
220
  flwr_dot_proto_dot_run__pb2.GetFederationOptionsResponse.FromString,
285
- options,
286
- channel_credentials,
287
- insecure,
288
- call_credentials,
289
- compression,
290
- wait_for_ready,
291
- timeout,
292
- metadata,
293
- _registered_method=True)
221
+ options, channel_credentials,
222
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
294
223
 
295
224
  @staticmethod
296
225
  def GetRunStatus(request,
@@ -303,18 +232,8 @@ class SimulationIo(object):
303
232
  wait_for_ready=None,
304
233
  timeout=None,
305
234
  metadata=None):
306
- return grpc.experimental.unary_unary(
307
- request,
308
- target,
309
- '/flwr.proto.SimulationIo/GetRunStatus',
235
+ return grpc.experimental.unary_unary(request, target, '/flwr.proto.SimulationIo/GetRunStatus',
310
236
  flwr_dot_proto_dot_run__pb2.GetRunStatusRequest.SerializeToString,
311
237
  flwr_dot_proto_dot_run__pb2.GetRunStatusResponse.FromString,
312
- options,
313
- channel_credentials,
314
- insecure,
315
- call_credentials,
316
- compression,
317
- wait_for_ready,
318
- timeout,
319
- metadata,
320
- _registered_method=True)
238
+ options, channel_credentials,
239
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
flwr/proto/task_pb2.py CHANGED
@@ -1,22 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # NO CHECKED-IN PROTOBUF GENCODE
4
3
  # source: flwr/proto/task.proto
5
- # Protobuf Python Version: 5.29.0
4
+ # Protobuf Python Version: 4.25.1
6
5
  """Generated protocol buffer code."""
7
6
  from google.protobuf import descriptor as _descriptor
8
7
  from google.protobuf import descriptor_pool as _descriptor_pool
9
- from google.protobuf import runtime_version as _runtime_version
10
8
  from google.protobuf import symbol_database as _symbol_database
11
9
  from google.protobuf.internal import builder as _builder
12
- _runtime_version.ValidateProtobufRuntimeVersion(
13
- _runtime_version.Domain.PUBLIC,
14
- 5,
15
- 29,
16
- 0,
17
- '',
18
- 'flwr/proto/task.proto'
19
- )
20
10
  # @@protoc_insertion_point(imports)
21
11
 
22
12
  _sym_db = _symbol_database.Default()
@@ -27,17 +17,17 @@ from flwr.proto import recordset_pb2 as flwr_dot_proto_dot_recordset__pb2
27
17
  from flwr.proto import error_pb2 as flwr_dot_proto_dot_error__pb2
28
18
 
29
19
 
30
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x66lwr/proto/task.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x1a\x66lwr/proto/recordset.proto\x1a\x16\x66lwr/proto/error.proto\"\x89\x02\n\x04Task\x12\"\n\x08producer\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\"\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x12\n\ncreated_at\x18\x03 \x01(\x01\x12\x14\n\x0c\x64\x65livered_at\x18\x04 \x01(\t\x12\x11\n\tpushed_at\x18\x05 \x01(\x01\x12\x0b\n\x03ttl\x18\x06 \x01(\x01\x12\x10\n\x08\x61ncestry\x18\x07 \x03(\t\x12\x11\n\ttask_type\x18\x08 \x01(\t\x12(\n\trecordset\x18\t \x01(\x0b\x32\x15.flwr.proto.RecordSet\x12 \n\x05\x65rror\x18\n \x01(\x0b\x32\x11.flwr.proto.Error\"\\\n\x07TaskIns\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\x12\x1e\n\x04task\x18\x04 \x01(\x0b\x32\x10.flwr.proto.Task\"\\\n\x07TaskRes\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\x12\x1e\n\x04task\x18\x04 \x01(\x0b\x32\x10.flwr.proto.Taskb\x06proto3')
20
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x15\x66lwr/proto/task.proto\x12\nflwr.proto\x1a\x15\x66lwr/proto/node.proto\x1a\x1a\x66lwr/proto/recordset.proto\x1a\x16\x66lwr/proto/error.proto\"\xf6\x01\n\x04Task\x12\"\n\x08producer\x18\x01 \x01(\x0b\x32\x10.flwr.proto.Node\x12\"\n\x08\x63onsumer\x18\x02 \x01(\x0b\x32\x10.flwr.proto.Node\x12\x12\n\ncreated_at\x18\x03 \x01(\x01\x12\x14\n\x0c\x64\x65livered_at\x18\x04 \x01(\t\x12\x0b\n\x03ttl\x18\x06 \x01(\x01\x12\x10\n\x08\x61ncestry\x18\x07 \x03(\t\x12\x11\n\ttask_type\x18\x08 \x01(\t\x12(\n\trecordset\x18\t \x01(\x0b\x32\x15.flwr.proto.RecordSet\x12 \n\x05\x65rror\x18\n \x01(\x0b\x32\x11.flwr.proto.Error\"\\\n\x07TaskIns\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\x12\x1e\n\x04task\x18\x04 \x01(\x0b\x32\x10.flwr.proto.Task\"\\\n\x07TaskRes\x12\x0f\n\x07task_id\x18\x01 \x01(\t\x12\x10\n\x08group_id\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\x04\x12\x1e\n\x04task\x18\x04 \x01(\x0b\x32\x10.flwr.proto.Taskb\x06proto3')
31
21
 
32
22
  _globals = globals()
33
23
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
34
24
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.task_pb2', _globals)
35
- if not _descriptor._USE_C_DESCRIPTORS:
36
- DESCRIPTOR._loaded_options = None
25
+ if _descriptor._USE_C_DESCRIPTORS == False:
26
+ DESCRIPTOR._options = None
37
27
  _globals['_TASK']._serialized_start=113
38
- _globals['_TASK']._serialized_end=378
39
- _globals['_TASKINS']._serialized_start=380
40
- _globals['_TASKINS']._serialized_end=472
41
- _globals['_TASKRES']._serialized_start=474
42
- _globals['_TASKRES']._serialized_end=566
28
+ _globals['_TASK']._serialized_end=359
29
+ _globals['_TASKINS']._serialized_start=361
30
+ _globals['_TASKINS']._serialized_end=453
31
+ _globals['_TASKRES']._serialized_start=455
32
+ _globals['_TASKRES']._serialized_end=547
43
33
  # @@protoc_insertion_point(module_scope)
flwr/proto/task_pb2.pyi CHANGED
@@ -20,7 +20,6 @@ class Task(google.protobuf.message.Message):
20
20
  CONSUMER_FIELD_NUMBER: builtins.int
21
21
  CREATED_AT_FIELD_NUMBER: builtins.int
22
22
  DELIVERED_AT_FIELD_NUMBER: builtins.int
23
- PUSHED_AT_FIELD_NUMBER: builtins.int
24
23
  TTL_FIELD_NUMBER: builtins.int
25
24
  ANCESTRY_FIELD_NUMBER: builtins.int
26
25
  TASK_TYPE_FIELD_NUMBER: builtins.int
@@ -32,7 +31,6 @@ class Task(google.protobuf.message.Message):
32
31
  def consumer(self) -> flwr.proto.node_pb2.Node: ...
33
32
  created_at: builtins.float
34
33
  delivered_at: typing.Text
35
- pushed_at: builtins.float
36
34
  ttl: builtins.float
37
35
  @property
38
36
  def ancestry(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[typing.Text]: ...
@@ -47,7 +45,6 @@ class Task(google.protobuf.message.Message):
47
45
  consumer: typing.Optional[flwr.proto.node_pb2.Node] = ...,
48
46
  created_at: builtins.float = ...,
49
47
  delivered_at: typing.Text = ...,
50
- pushed_at: builtins.float = ...,
51
48
  ttl: builtins.float = ...,
52
49
  ancestry: typing.Optional[typing.Iterable[typing.Text]] = ...,
53
50
  task_type: typing.Text = ...,
@@ -55,7 +52,7 @@ class Task(google.protobuf.message.Message):
55
52
  error: typing.Optional[flwr.proto.error_pb2.Error] = ...,
56
53
  ) -> None: ...
57
54
  def HasField(self, field_name: typing_extensions.Literal["consumer",b"consumer","error",b"error","producer",b"producer","recordset",b"recordset"]) -> builtins.bool: ...
58
- def ClearField(self, field_name: typing_extensions.Literal["ancestry",b"ancestry","consumer",b"consumer","created_at",b"created_at","delivered_at",b"delivered_at","error",b"error","producer",b"producer","pushed_at",b"pushed_at","recordset",b"recordset","task_type",b"task_type","ttl",b"ttl"]) -> None: ...
55
+ def ClearField(self, field_name: typing_extensions.Literal["ancestry",b"ancestry","consumer",b"consumer","created_at",b"created_at","delivered_at",b"delivered_at","error",b"error","producer",b"producer","recordset",b"recordset","task_type",b"task_type","ttl",b"ttl"]) -> None: ...
59
56
  global___Task = Task
60
57
 
61
58
  class TaskIns(google.protobuf.message.Message):
@@ -1,24 +1,4 @@
1
1
  # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
3
  import grpc
4
- import warnings
5
4
 
6
-
7
- GRPC_GENERATED_VERSION = '1.69.0'
8
- GRPC_VERSION = grpc.__version__
9
- _version_not_supported = False
10
-
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
-
17
- if _version_not_supported:
18
- raise RuntimeError(
19
- f'The grpc package installed is at version {GRPC_VERSION},'
20
- + f' but the generated code in flwr/proto/task_pb2_grpc.py depends on'
21
- + f' grpcio>={GRPC_GENERATED_VERSION}.'
22
- + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
23
- + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
24
- )
@@ -1,22 +1,12 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
- # NO CHECKED-IN PROTOBUF GENCODE
4
3
  # source: flwr/proto/transport.proto
5
- # Protobuf Python Version: 5.29.0
4
+ # Protobuf Python Version: 4.25.1
6
5
  """Generated protocol buffer code."""
7
6
  from google.protobuf import descriptor as _descriptor
8
7
  from google.protobuf import descriptor_pool as _descriptor_pool
9
- from google.protobuf import runtime_version as _runtime_version
10
8
  from google.protobuf import symbol_database as _symbol_database
11
9
  from google.protobuf.internal import builder as _builder
12
- _runtime_version.ValidateProtobufRuntimeVersion(
13
- _runtime_version.Domain.PUBLIC,
14
- 5,
15
- 29,
16
- 0,
17
- '',
18
- 'flwr/proto/transport.proto'
19
- )
20
10
  # @@protoc_insertion_point(imports)
21
11
 
22
12
  _sym_db = _symbol_database.Default()
@@ -29,21 +19,21 @@ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1a\x66lwr/proto/
29
19
  _globals = globals()
30
20
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
21
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'flwr.proto.transport_pb2', _globals)
32
- if not _descriptor._USE_C_DESCRIPTORS:
33
- DESCRIPTOR._loaded_options = None
34
- _globals['_SERVERMESSAGE_GETPROPERTIESINS_CONFIGENTRY']._loaded_options = None
22
+ if _descriptor._USE_C_DESCRIPTORS == False:
23
+ DESCRIPTOR._options = None
24
+ _globals['_SERVERMESSAGE_GETPROPERTIESINS_CONFIGENTRY']._options = None
35
25
  _globals['_SERVERMESSAGE_GETPROPERTIESINS_CONFIGENTRY']._serialized_options = b'8\001'
36
- _globals['_SERVERMESSAGE_GETPARAMETERSINS_CONFIGENTRY']._loaded_options = None
26
+ _globals['_SERVERMESSAGE_GETPARAMETERSINS_CONFIGENTRY']._options = None
37
27
  _globals['_SERVERMESSAGE_GETPARAMETERSINS_CONFIGENTRY']._serialized_options = b'8\001'
38
- _globals['_SERVERMESSAGE_FITINS_CONFIGENTRY']._loaded_options = None
28
+ _globals['_SERVERMESSAGE_FITINS_CONFIGENTRY']._options = None
39
29
  _globals['_SERVERMESSAGE_FITINS_CONFIGENTRY']._serialized_options = b'8\001'
40
- _globals['_SERVERMESSAGE_EVALUATEINS_CONFIGENTRY']._loaded_options = None
30
+ _globals['_SERVERMESSAGE_EVALUATEINS_CONFIGENTRY']._options = None
41
31
  _globals['_SERVERMESSAGE_EVALUATEINS_CONFIGENTRY']._serialized_options = b'8\001'
42
- _globals['_CLIENTMESSAGE_GETPROPERTIESRES_PROPERTIESENTRY']._loaded_options = None
32
+ _globals['_CLIENTMESSAGE_GETPROPERTIESRES_PROPERTIESENTRY']._options = None
43
33
  _globals['_CLIENTMESSAGE_GETPROPERTIESRES_PROPERTIESENTRY']._serialized_options = b'8\001'
44
- _globals['_CLIENTMESSAGE_FITRES_METRICSENTRY']._loaded_options = None
34
+ _globals['_CLIENTMESSAGE_FITRES_METRICSENTRY']._options = None
45
35
  _globals['_CLIENTMESSAGE_FITRES_METRICSENTRY']._serialized_options = b'8\001'
46
- _globals['_CLIENTMESSAGE_EVALUATERES_METRICSENTRY']._loaded_options = None
36
+ _globals['_CLIENTMESSAGE_EVALUATERES_METRICSENTRY']._options = None
47
37
  _globals['_CLIENTMESSAGE_EVALUATERES_METRICSENTRY']._serialized_options = b'8\001'
48
38
  _globals['_CODE']._serialized_start=2551
49
39
  _globals['_CODE']._serialized_end=2692
@@ -1,29 +1,9 @@
1
1
  # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
3
  import grpc
4
- import warnings
5
4
 
6
5
  from flwr.proto import transport_pb2 as flwr_dot_proto_dot_transport__pb2
7
6
 
8
- GRPC_GENERATED_VERSION = '1.69.0'
9
- GRPC_VERSION = grpc.__version__
10
- _version_not_supported = False
11
-
12
- try:
13
- from grpc._utilities import first_version_is_lower
14
- _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
15
- except ImportError:
16
- _version_not_supported = True
17
-
18
- if _version_not_supported:
19
- raise RuntimeError(
20
- f'The grpc package installed is at version {GRPC_VERSION},'
21
- + f' but the generated code in flwr/proto/transport_pb2_grpc.py depends on'
22
- + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
- + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
- + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
25
- )
26
-
27
7
 
28
8
  class FlowerServiceStub(object):
29
9
  """Missing associated documentation comment in .proto file."""
@@ -38,7 +18,7 @@ class FlowerServiceStub(object):
38
18
  '/flwr.proto.FlowerService/Join',
39
19
  request_serializer=flwr_dot_proto_dot_transport__pb2.ClientMessage.SerializeToString,
40
20
  response_deserializer=flwr_dot_proto_dot_transport__pb2.ServerMessage.FromString,
41
- _registered_method=True)
21
+ )
42
22
 
43
23
 
44
24
  class FlowerServiceServicer(object):
@@ -62,7 +42,6 @@ def add_FlowerServiceServicer_to_server(servicer, server):
62
42
  generic_handler = grpc.method_handlers_generic_handler(
63
43
  'flwr.proto.FlowerService', rpc_method_handlers)
64
44
  server.add_generic_rpc_handlers((generic_handler,))
65
- server.add_registered_method_handlers('flwr.proto.FlowerService', rpc_method_handlers)
66
45
 
67
46
 
68
47
  # This class is part of an EXPERIMENTAL API.
@@ -80,18 +59,8 @@ class FlowerService(object):
80
59
  wait_for_ready=None,
81
60
  timeout=None,
82
61
  metadata=None):
83
- return grpc.experimental.stream_stream(
84
- request_iterator,
85
- target,
86
- '/flwr.proto.FlowerService/Join',
62
+ return grpc.experimental.stream_stream(request_iterator, target, '/flwr.proto.FlowerService/Join',
87
63
  flwr_dot_proto_dot_transport__pb2.ClientMessage.SerializeToString,
88
64
  flwr_dot_proto_dot_transport__pb2.ServerMessage.FromString,
89
- options,
90
- channel_credentials,
91
- insecure,
92
- call_credentials,
93
- compression,
94
- wait_for_ready,
95
- timeout,
96
- metadata,
97
- _registered_method=True)
65
+ options, channel_credentials,
66
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
flwr/server/app.py CHANGED
@@ -40,7 +40,7 @@ from flwr.common.args import try_obtain_server_certificates
40
40
  from flwr.common.auth_plugin import ExecAuthPlugin
41
41
  from flwr.common.config import get_flwr_dir, parse_config_args
42
42
  from flwr.common.constant import (
43
- AUTH_TYPE_KEY,
43
+ AUTH_TYPE_YAML_KEY,
44
44
  CLIENT_OCTET,
45
45
  EXEC_API_DEFAULT_SERVER_ADDRESS,
46
46
  FLEET_API_GRPC_BIDI_DEFAULT_ADDRESS,
@@ -265,7 +265,7 @@ def run_superlink() -> None:
265
265
  simulationio_address, _, _ = _format_address(args.simulationio_api_address)
266
266
 
267
267
  # Obtain certificates
268
- certificates = try_obtain_server_certificates(args, args.fleet_api_type)
268
+ certificates = try_obtain_server_certificates(args)
269
269
 
270
270
  # Disable the user auth TLS check if args.disable_oidc_tls_cert_verification is
271
271
  # provided
@@ -353,17 +353,13 @@ def run_superlink() -> None:
353
353
  ) is None:
354
354
  flwr_exit(ExitCode.COMMON_MISSING_EXTRA_REST)
355
355
 
356
- _, ssl_certfile, ssl_keyfile = (
357
- certificates if certificates is not None else (None, None, None)
358
- )
359
-
360
356
  fleet_thread = threading.Thread(
361
357
  target=_run_fleet_api_rest,
362
358
  args=(
363
359
  host,
364
360
  port,
365
- ssl_keyfile,
366
- ssl_certfile,
361
+ args.ssl_keyfile,
362
+ args.ssl_certfile,
367
363
  state_factory,
368
364
  ffs_factory,
369
365
  num_workers,
@@ -582,7 +578,7 @@ def _try_obtain_exec_auth_plugin(
582
578
 
583
579
  # Load authentication configuration
584
580
  auth_config: dict[str, Any] = config.get("authentication", {})
585
- auth_type: str = auth_config.get(AUTH_TYPE_KEY, "")
581
+ auth_type: str = auth_config.get(AUTH_TYPE_YAML_KEY, "")
586
582
 
587
583
  # Load authentication plugin
588
584
  try:
@@ -126,7 +126,6 @@ class InMemoryDriver(Driver):
126
126
  # Convert Message to TaskIns
127
127
  taskins = message_to_taskins(msg)
128
128
  # Store in state
129
- taskins.task.pushed_at = time.time()
130
129
  task_id = self.state.store_task_ins(taskins)
131
130
  if task_id:
132
131
  task_ids.append(str(task_id))
@@ -22,7 +22,7 @@ from uuid import UUID
22
22
 
23
23
  import grpc
24
24
 
25
- from flwr.common import ConfigsRecord, now
25
+ from flwr.common import ConfigsRecord
26
26
  from flwr.common.constant import Status
27
27
  from flwr.common.logger import log
28
28
  from flwr.common.serde import (
@@ -64,14 +64,10 @@ from flwr.proto.serverappio_pb2 import ( # pylint: disable=E0611
64
64
  PullResMessagesResponse,
65
65
  PullServerAppInputsRequest,
66
66
  PullServerAppInputsResponse,
67
- PullTaskResRequest,
68
- PullTaskResResponse,
69
67
  PushInsMessagesRequest,
70
68
  PushInsMessagesResponse,
71
69
  PushServerAppOutputsRequest,
72
70
  PushServerAppOutputsResponse,
73
- PushTaskInsRequest,
74
- PushTaskInsResponse,
75
71
  )
76
72
  from flwr.proto.task_pb2 import TaskRes # pylint: disable=E0611
77
73
  from flwr.server.superlink.ffs.ffs import Ffs
@@ -138,57 +134,6 @@ class ServerAppIoServicer(serverappio_pb2_grpc.ServerAppIoServicer):
138
134
  )
139
135
  return CreateRunResponse(run_id=run_id)
140
136
 
141
- def PushTaskIns(
142
- self, request: PushTaskInsRequest, context: grpc.ServicerContext
143
- ) -> PushTaskInsResponse:
144
- """Push a set of TaskIns."""
145
- log(DEBUG, "ServerAppIoServicer.PushTaskIns")
146
-
147
- # Init state
148
- state: LinkState = self.state_factory.state()
149
-
150
- # Abort if the run is not running
151
- abort_if(
152
- request.run_id,
153
- [Status.PENDING, Status.STARTING, Status.FINISHED],
154
- state,
155
- context,
156
- )
157
-
158
- # Set pushed_at (timestamp in seconds)
159
- pushed_at = now().timestamp()
160
- for task_ins in request.task_ins_list:
161
- task_ins.task.pushed_at = pushed_at
162
-
163
- # Validate request
164
- _raise_if(
165
- validation_error=len(request.task_ins_list) == 0,
166
- request_name="PushTaskIns",
167
- detail="`task_ins_list` must not be empty",
168
- )
169
- for task_ins in request.task_ins_list:
170
- validation_errors = validate_task_ins_or_res(task_ins)
171
- _raise_if(
172
- validation_error=bool(validation_errors),
173
- request_name="PushTaskIns",
174
- detail=", ".join(validation_errors),
175
- )
176
- _raise_if(
177
- validation_error=request.run_id != task_ins.run_id,
178
- request_name="PushTaskIns",
179
- detail="`task_ins` has mismatched `run_id`",
180
- )
181
-
182
- # Store each TaskIns
183
- task_ids: list[Optional[UUID]] = []
184
- for task_ins in request.task_ins_list:
185
- task_id: Optional[UUID] = state.store_task_ins(task_ins=task_ins)
186
- task_ids.append(task_id)
187
-
188
- return PushTaskInsResponse(
189
- task_ids=[str(task_id) if task_id else "" for task_id in task_ids]
190
- )
191
-
192
137
  def PushMessages(
193
138
  self, request: PushInsMessagesRequest, context: grpc.ServicerContext
194
139
  ) -> PushInsMessagesResponse:
@@ -206,9 +151,6 @@ class ServerAppIoServicer(serverappio_pb2_grpc.ServerAppIoServicer):
206
151
  context,
207
152
  )
208
153
 
209
- # Set pushed_at (timestamp in seconds)
210
- pushed_at = now().timestamp()
211
-
212
154
  # Validate request and insert in State
213
155
  _raise_if(
214
156
  validation_error=len(request.messages_list) == 0,
@@ -220,7 +162,6 @@ class ServerAppIoServicer(serverappio_pb2_grpc.ServerAppIoServicer):
220
162
  message_proto = request.messages_list.pop(0)
221
163
  message = message_from_proto(message_proto=message_proto)
222
164
  task_ins = message_to_taskins(message=message)
223
- task_ins.task.pushed_at = pushed_at
224
165
  validation_errors = validate_task_ins_or_res(task_ins)
225
166
  _raise_if(
226
167
  validation_error=bool(validation_errors),
@@ -242,45 +183,6 @@ class ServerAppIoServicer(serverappio_pb2_grpc.ServerAppIoServicer):
242
183
  ]
243
184
  )
244
185
 
245
- def PullTaskRes(
246
- self, request: PullTaskResRequest, context: grpc.ServicerContext
247
- ) -> PullTaskResResponse:
248
- """Pull a set of TaskRes."""
249
- log(DEBUG, "ServerAppIoServicer.PullTaskRes")
250
-
251
- # Init state
252
- state: LinkState = self.state_factory.state()
253
-
254
- # Abort if the run is not running
255
- abort_if(
256
- request.run_id,
257
- [Status.PENDING, Status.STARTING, Status.FINISHED],
258
- state,
259
- context,
260
- )
261
-
262
- # Convert each task_id str to UUID
263
- task_ids: set[UUID] = {UUID(task_id) for task_id in request.task_ids}
264
-
265
- # Read from state
266
- task_res_list: list[TaskRes] = state.get_task_res(task_ids=task_ids)
267
-
268
- # Validate request
269
- for task_res in task_res_list:
270
- _raise_if(
271
- validation_error=request.run_id != task_res.run_id,
272
- request_name="PullTaskRes",
273
- detail="`task_res` has mismatched `run_id`",
274
- )
275
-
276
- # Delete the TaskIns/TaskRes pairs if TaskRes is found
277
- task_ins_ids_to_delete = {
278
- UUID(task_res.task.ancestry[0]) for task_res in task_res_list
279
- }
280
- state.delete_tasks(task_ins_ids=task_ins_ids_to_delete)
281
-
282
- return PullTaskResResponse(task_res_list=task_res_list)
283
-
284
186
  def PullMessages(
285
187
  self, request: PullResMessagesRequest, context: grpc.ServicerContext
286
188
  ) -> PullResMessagesResponse: