flwr-nightly 1.19.0.dev20250613__py3-none-any.whl → 1.19.0.dev20250616__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.
flwr/server/app.py CHANGED
@@ -91,7 +91,6 @@ P = TypeVar("P", ExecAuthPlugin, ExecAuthzPlugin)
91
91
  try:
92
92
  from flwr.ee import (
93
93
  add_ee_args_superlink,
94
- get_dashboard_server,
95
94
  get_exec_auth_plugins,
96
95
  get_exec_authz_plugins,
97
96
  get_exec_event_log_writer_plugins,
@@ -333,17 +332,6 @@ def run_superlink() -> None:
333
332
  scheduler_th.start()
334
333
  bckg_threads.append(scheduler_th)
335
334
 
336
- # Add Dashboard server if available
337
- if dashboard_address := getattr(args, "dashboard_address", None):
338
- dashboard_address_str, _, _ = _format_address(dashboard_address)
339
- dashboard_server = get_dashboard_server(
340
- address=dashboard_address_str,
341
- state_factory=state_factory,
342
- certificates=None,
343
- )
344
-
345
- grpc_servers.append(dashboard_server)
346
-
347
335
  # Graceful shutdown
348
336
  register_exit_handlers(
349
337
  event_type=EventType.RUN_SUPERLINK_LEAVE,
@@ -249,7 +249,9 @@ class InMemoryLinkState(LinkState): # pylint: disable=R0902,R0904
249
249
  inquired_in_message_ids=message_ids,
250
250
  found_in_message_dict=self.message_ins_store,
251
251
  node_id_to_online_until={
252
- node_id: self.node_ids[node_id][0] for node_id in dst_node_ids
252
+ node_id: self.node_ids[node_id][0]
253
+ for node_id in dst_node_ids
254
+ if node_id in self.node_ids
253
255
  },
254
256
  current_time=current,
255
257
  )
@@ -25,7 +25,7 @@ from flwr.common import Message
25
25
  from flwr.common.constant import SUPERLINK_NODE_ID, Status
26
26
  from flwr.common.inflatable import (
27
27
  UnexpectedObjectContentError,
28
- get_descendant_object_ids,
28
+ get_all_nested_objects,
29
29
  get_object_tree,
30
30
  no_object_id_recompute,
31
31
  )
@@ -181,7 +181,7 @@ class ServerAppIoServicer(serverappio_pb2_grpc.ServerAppIoServicer):
181
181
  objects_to_push=objects_to_push,
182
182
  )
183
183
 
184
- def PullMessages(
184
+ def PullMessages( # pylint: disable=R0914
185
185
  self, request: PullResMessagesRequest, context: grpc.ServicerContext
186
186
  ) -> PullResMessagesResponse:
187
187
  """Pull a set of Messages."""
@@ -209,14 +209,18 @@ class ServerAppIoServicer(serverappio_pb2_grpc.ServerAppIoServicer):
209
209
  for msg_res in messages_res:
210
210
  if msg_res.metadata.src_node_id == SUPERLINK_NODE_ID:
211
211
  with no_object_id_recompute():
212
- descendants = list(get_descendant_object_ids(msg_res))
212
+ all_objects = get_all_nested_objects(msg_res)
213
+ descendants = list(all_objects.keys())[:-1]
213
214
  message_obj_id = msg_res.metadata.message_id
214
- # Store mapping
215
- store.set_message_descendant_ids(
216
- msg_object_id=message_obj_id, descendant_ids=descendants
217
- )
218
- # Preregister
219
- store.preregister(request.run_id, get_object_tree(msg_res))
215
+ # Store mapping
216
+ store.set_message_descendant_ids(
217
+ msg_object_id=message_obj_id, descendant_ids=descendants
218
+ )
219
+ # Preregister
220
+ store.preregister(request.run_id, get_object_tree(msg_res))
221
+ # Store objects
222
+ for obj_id, obj in all_objects.items():
223
+ store.put(obj_id, obj.deflate())
220
224
 
221
225
  # Delete the instruction Messages and their replies if found
222
226
  message_ins_ids_to_delete = {
@@ -243,10 +247,8 @@ class ServerAppIoServicer(serverappio_pb2_grpc.ServerAppIoServicer):
243
247
  try:
244
248
  msg_object_id = msg.metadata.message_id
245
249
  descendants = store.get_message_descendant_ids(msg_object_id)
246
- # Include the object_id of the message itself
247
- objects_to_pull[msg_object_id] = ObjectIDs(
248
- object_ids=descendants + [msg_object_id]
249
- )
250
+ # Add mapping of message object ID to its descendants
251
+ objects_to_pull[msg_object_id] = ObjectIDs(object_ids=descendants)
250
252
  except NoObjectInStoreError as e:
251
253
  log(ERROR, e.message)
252
254
  # Delete message ins from state
@@ -241,11 +241,20 @@ def start_client_internal(
241
241
  outputs = clientappio_servicer.get_outputs()
242
242
  reply_message, context = outputs.message, outputs.context
243
243
 
244
- # Update node state
244
+ # Update context in the state
245
245
  state.store_context(context)
246
246
 
247
247
  # Send
248
248
  send(reply_message)
249
+
250
+ # Delete messages from the state
251
+ state.delete_messages(
252
+ message_ids=[
253
+ message.metadata.message_id,
254
+ message.metadata.reply_to_message_id,
255
+ ]
256
+ )
257
+
249
258
  log(INFO, "Sent reply")
250
259
 
251
260
  except RunNotRunningException:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: flwr-nightly
3
- Version: 1.19.0.dev20250613
3
+ Version: 1.19.0.dev20250616
4
4
  Summary: Flower: A Friendly Federated AI Framework
5
5
  License: Apache-2.0
6
6
  Keywords: Artificial Intelligence,Federated AI,Federated Analytics,Federated Evaluation,Federated Learning,Flower,Machine Learning
@@ -226,7 +226,7 @@ flwr/proto/transport_pb2_grpc.py,sha256=vLN3EHtx2aEEMCO4f1Upu-l27BPzd3-5pV-u8wPc
226
226
  flwr/proto/transport_pb2_grpc.pyi,sha256=AGXf8RiIiW2J5IKMlm_3qT3AzcDa4F3P5IqUjve_esA,766
227
227
  flwr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
228
228
  flwr/server/__init__.py,sha256=LQQHiuL2jy7TpNaKastRdGsexlxSt5ZWAQNVqitDnrY,1598
229
- flwr/server/app.py,sha256=UffIRGj_lbANzL1P63yx0QBc6PCKbig7ZqTDiP5jbLg,29927
229
+ flwr/server/app.py,sha256=reOCH1YmngNxWXBvxp8UfQNTfLP95NMh8j8jU0dW1IU,29492
230
230
  flwr/server/client_manager.py,sha256=5jCGavVli7XdupvWWo7ru3PdFTlRU8IGvHFSSoUVLRs,6227
231
231
  flwr/server/client_proxy.py,sha256=sv0E9AldBYOvc3pusqFh-GnyreeMfsXQ1cuTtxTq_wY,2399
232
232
  flwr/server/compat/__init__.py,sha256=0IsttWvY15qO98_1GyzVC-vR1e_ZPXOdu2qUlOkYMPE,886
@@ -298,14 +298,14 @@ flwr/server/superlink/fleet/vce/backend/backend.py,sha256=-wDHjgAy5mrfEgXj0GxkJI
298
298
  flwr/server/superlink/fleet/vce/backend/raybackend.py,sha256=Hx9hxL7lju1_VJoAwkhBOGerZ3628u0P1zgkPhGWRPY,7154
299
299
  flwr/server/superlink/fleet/vce/vce_api.py,sha256=xSjQbBYHmUTinw7Q_-UxqR7qt07kqj9FCSpPYRsUKf8,12909
300
300
  flwr/server/superlink/linkstate/__init__.py,sha256=OtsgvDTnZLU3k0sUbkHbqoVwW6ql2FDmb6uT6DbNkZo,1064
301
- flwr/server/superlink/linkstate/in_memory_linkstate.py,sha256=-a_CjUYw3YfEbLJ0Tv25057X6UA5Ym4AFqo-E4e9IjU,26410
301
+ flwr/server/superlink/linkstate/in_memory_linkstate.py,sha256=OuyuW_btDL-Nuon2aAcyXDapzwzZX4PrRWTjb0epoaI,26478
302
302
  flwr/server/superlink/linkstate/linkstate.py,sha256=JZHshn7NnUHr_hvHqO593YWwuCQVJm7InXor60DRcX0,13238
303
303
  flwr/server/superlink/linkstate/linkstate_factory.py,sha256=8RlosqSpKOoD_vhUUQPY0jtE3A84GeF96Z7sWNkRRcA,2069
304
304
  flwr/server/superlink/linkstate/sqlite_linkstate.py,sha256=E699Ak0jMF3N7i1SIeFRutjorg51Fd7qBqaPX_gkWU0,43687
305
305
  flwr/server/superlink/linkstate/utils.py,sha256=IeLh7iGRCHU5MEWOl7iriaSE4L__8GWOa2OleXadK5M,15444
306
306
  flwr/server/superlink/serverappio/__init__.py,sha256=Fy4zJuoccZe5mZSEIpOmQvU6YeXFBa1M4eZuXXmJcn8,717
307
307
  flwr/server/superlink/serverappio/serverappio_grpc.py,sha256=6-FUUt0GiLcBPljj8bBrUNeAITUoDQOLzaMihKo52hg,2326
308
- flwr/server/superlink/serverappio/serverappio_servicer.py,sha256=LFt_Wu2OOmbNQWZrLW6GoQFdvZ60bupF4c7lvLF7kDw,18617
308
+ flwr/server/superlink/serverappio/serverappio_servicer.py,sha256=pjBjZ6NQdOKO3AYZ8tGD-wzGHh4LaVS3lpPZb6XpKU8,18823
309
309
  flwr/server/superlink/simulation/__init__.py,sha256=Ry8DrNaZCMcQXvUc4FoCN2m3dvUQgWjasfp015o3Ec4,718
310
310
  flwr/server/superlink/simulation/simulationio_grpc.py,sha256=0l0F-UjYEk6W7HZmI28PbJQLFxSi_vBHRkdchgdaSMQ,2224
311
311
  flwr/server/superlink/simulation/simulationio_servicer.py,sha256=8jACbVPe7YPLaR0hbpEofBBwWjc-uQPhf2FU1eNOtsw,7743
@@ -358,8 +358,8 @@ flwr/supernode/runtime/run_clientapp.py,sha256=cvWSby7u31u97QapWHxJM-Wer6F1k6mbb
358
358
  flwr/supernode/servicer/__init__.py,sha256=lucTzre5WPK7G1YLCfaqg3rbFWdNSb7ZTt-ca8gxdEo,717
359
359
  flwr/supernode/servicer/clientappio/__init__.py,sha256=vJyOjO2FXZ2URbnthmdsgs6948wbYfdq1L1V8Um-Lr8,895
360
360
  flwr/supernode/servicer/clientappio/clientappio_servicer.py,sha256=LmzkxtNQBn5vVrHc0Bhq2WqaK6-LM2v4kfLBN0PiNNM,8522
361
- flwr/supernode/start_client_internal.py,sha256=AkJ1FsBK6EpK7cmIGcae5WZazPhU71gileiSQogTZ-k,18164
362
- flwr_nightly-1.19.0.dev20250613.dist-info/METADATA,sha256=rOWrbtaPZuiuu3AEjnl73VHt4ILeNP1rL4RPIfHrs_E,15910
363
- flwr_nightly-1.19.0.dev20250613.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
364
- flwr_nightly-1.19.0.dev20250613.dist-info/entry_points.txt,sha256=jNpDXGBGgs21RqUxelF_jwGaxtqFwm-MQyfz-ZqSjrA,367
365
- flwr_nightly-1.19.0.dev20250613.dist-info/RECORD,,
361
+ flwr/supernode/start_client_internal.py,sha256=M1_sYScUzhXAg1obVf64E6UxYP0m9g6OmA2vZiB75As,18453
362
+ flwr_nightly-1.19.0.dev20250616.dist-info/METADATA,sha256=dzYxYe5YgeuTZHTSGgctOaiLXYFPBczS5POBfjrRTv4,15910
363
+ flwr_nightly-1.19.0.dev20250616.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
364
+ flwr_nightly-1.19.0.dev20250616.dist-info/entry_points.txt,sha256=jNpDXGBGgs21RqUxelF_jwGaxtqFwm-MQyfz-ZqSjrA,367
365
+ flwr_nightly-1.19.0.dev20250616.dist-info/RECORD,,