flwr-nightly 1.9.0.dev20240609__py3-none-any.whl → 1.10.0.dev20240610__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 flwr-nightly might be problematic. Click here for more details.
- flwr/cli/new/templates/app/pyproject.hf.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.jax.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +1 -1
- flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +1 -1
- flwr/client/app.py +20 -8
- flwr/client/grpc_rere_client/connection.py +0 -2
- {flwr_nightly-1.9.0.dev20240609.dist-info → flwr_nightly-1.10.0.dev20240610.dist-info}/METADATA +1 -1
- {flwr_nightly-1.9.0.dev20240609.dist-info → flwr_nightly-1.10.0.dev20240610.dist-info}/RECORD +14 -14
- {flwr_nightly-1.9.0.dev20240609.dist-info → flwr_nightly-1.10.0.dev20240610.dist-info}/LICENSE +0 -0
- {flwr_nightly-1.9.0.dev20240609.dist-info → flwr_nightly-1.10.0.dev20240610.dist-info}/WHEEL +0 -0
- {flwr_nightly-1.9.0.dev20240609.dist-info → flwr_nightly-1.10.0.dev20240610.dist-info}/entry_points.txt +0 -0
flwr/client/app.py
CHANGED
|
@@ -265,10 +265,10 @@ def _start_client_internal(
|
|
|
265
265
|
transport, server_address
|
|
266
266
|
)
|
|
267
267
|
|
|
268
|
-
|
|
269
|
-
_ = run_tracker
|
|
268
|
+
app_state_tracker = _AppStateTracker()
|
|
270
269
|
|
|
271
270
|
def _on_sucess(retry_state: RetryState) -> None:
|
|
271
|
+
app_state_tracker.is_connected = True
|
|
272
272
|
if retry_state.tries > 1:
|
|
273
273
|
log(
|
|
274
274
|
INFO,
|
|
@@ -278,6 +278,7 @@ def _start_client_internal(
|
|
|
278
278
|
)
|
|
279
279
|
|
|
280
280
|
def _on_backoff(retry_state: RetryState) -> None:
|
|
281
|
+
app_state_tracker.is_connected = False
|
|
281
282
|
if retry_state.tries == 1:
|
|
282
283
|
log(WARN, "Connection attempt failed, retrying...")
|
|
283
284
|
else:
|
|
@@ -308,7 +309,7 @@ def _start_client_internal(
|
|
|
308
309
|
|
|
309
310
|
node_state = NodeState()
|
|
310
311
|
|
|
311
|
-
while
|
|
312
|
+
while not app_state_tracker.interrupt:
|
|
312
313
|
sleep_duration: int = 0
|
|
313
314
|
with connection(
|
|
314
315
|
address,
|
|
@@ -325,8 +326,9 @@ def _start_client_internal(
|
|
|
325
326
|
if create_node is not None:
|
|
326
327
|
create_node() # pylint: disable=not-callable
|
|
327
328
|
|
|
328
|
-
|
|
329
|
-
|
|
329
|
+
app_state_tracker.register_signal_handler()
|
|
330
|
+
while not app_state_tracker.interrupt:
|
|
331
|
+
try:
|
|
330
332
|
# Receive
|
|
331
333
|
message = receive()
|
|
332
334
|
if message is None:
|
|
@@ -397,7 +399,10 @@ def _start_client_internal(
|
|
|
397
399
|
e_code = ErrorCode.LOAD_CLIENT_APP_EXCEPTION
|
|
398
400
|
exc_entity = "SuperNode"
|
|
399
401
|
|
|
400
|
-
|
|
402
|
+
if not app_state_tracker.interrupt:
|
|
403
|
+
log(
|
|
404
|
+
ERROR, "%s raised an exception", exc_entity, exc_info=ex
|
|
405
|
+
)
|
|
401
406
|
|
|
402
407
|
# Create error message
|
|
403
408
|
reply_message = message.create_error_reply(
|
|
@@ -414,13 +419,19 @@ def _start_client_internal(
|
|
|
414
419
|
send(reply_message)
|
|
415
420
|
log(INFO, "Sent reply")
|
|
416
421
|
|
|
422
|
+
except StopIteration:
|
|
423
|
+
sleep_duration = 0
|
|
424
|
+
break
|
|
425
|
+
|
|
417
426
|
# Unregister node
|
|
418
|
-
if delete_node is not None:
|
|
427
|
+
if delete_node is not None and app_state_tracker.is_connected:
|
|
419
428
|
delete_node() # pylint: disable=not-callable
|
|
420
429
|
|
|
421
430
|
if sleep_duration == 0:
|
|
422
431
|
log(INFO, "Disconnect and shut down")
|
|
432
|
+
del app_state_tracker
|
|
423
433
|
break
|
|
434
|
+
|
|
424
435
|
# Sleep and reconnect afterwards
|
|
425
436
|
log(
|
|
426
437
|
INFO,
|
|
@@ -592,8 +603,9 @@ def _init_connection(transport: Optional[str], server_address: str) -> Tuple[
|
|
|
592
603
|
|
|
593
604
|
|
|
594
605
|
@dataclass
|
|
595
|
-
class
|
|
606
|
+
class _AppStateTracker:
|
|
596
607
|
interrupt: bool = False
|
|
608
|
+
is_connected: bool = False
|
|
597
609
|
|
|
598
610
|
def register_signal_handler(self) -> None:
|
|
599
611
|
"""Register handlers for exit signals."""
|
|
@@ -193,8 +193,6 @@ def grpc_request_response( # pylint: disable=R0913, R0914, R0915
|
|
|
193
193
|
|
|
194
194
|
# Stop the ping-loop thread
|
|
195
195
|
ping_stop_event.set()
|
|
196
|
-
if ping_thread is not None:
|
|
197
|
-
ping_thread.join()
|
|
198
196
|
|
|
199
197
|
# Call FleetAPI
|
|
200
198
|
delete_node_request = DeleteNodeRequest(node=node)
|
{flwr_nightly-1.9.0.dev20240609.dist-info → flwr_nightly-1.10.0.dev20240610.dist-info}/RECORD
RENAMED
|
@@ -31,18 +31,18 @@ flwr/cli/new/templates/app/code/task.jax.py.tpl,sha256=u4o3V019EH79szOw2xzVeC5r9
|
|
|
31
31
|
flwr/cli/new/templates/app/code/task.mlx.py.tpl,sha256=y7aVj3F_98-wBnDcbPsCNnFs9BOHTn0y6XIYkByzv7Y,2598
|
|
32
32
|
flwr/cli/new/templates/app/code/task.pytorch.py.tpl,sha256=NvajdZN-eTyfdqKK0v2MrvWITXw9BjJ3Ri5c1haPJDs,3684
|
|
33
33
|
flwr/cli/new/templates/app/code/task.tensorflow.py.tpl,sha256=cPOUUS07QbblT9PGFucwu9lY1clRA4-W4DQGA7cpcao,1044
|
|
34
|
-
flwr/cli/new/templates/app/pyproject.hf.toml.tpl,sha256=
|
|
35
|
-
flwr/cli/new/templates/app/pyproject.jax.toml.tpl,sha256=
|
|
36
|
-
flwr/cli/new/templates/app/pyproject.mlx.toml.tpl,sha256=
|
|
37
|
-
flwr/cli/new/templates/app/pyproject.numpy.toml.tpl,sha256=
|
|
38
|
-
flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl,sha256=
|
|
39
|
-
flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl,sha256=
|
|
40
|
-
flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl,sha256=
|
|
34
|
+
flwr/cli/new/templates/app/pyproject.hf.toml.tpl,sha256=O3-dgH8_knk9uM49IzX06CYC2Ev5xdPuITB40Phvewc,759
|
|
35
|
+
flwr/cli/new/templates/app/pyproject.jax.toml.tpl,sha256=QIhp6_eYYFk9aJd_n-tc_Ar76Se1OP6zSibTbGeHV7w,568
|
|
36
|
+
flwr/cli/new/templates/app/pyproject.mlx.toml.tpl,sha256=OJ15G7CmjevBsUCVJ3ixv01VFwL4nkPcKkVGKeVW8ew,668
|
|
37
|
+
flwr/cli/new/templates/app/pyproject.numpy.toml.tpl,sha256=VYHSqaZzUS8H4jy1Cr1Plyd2kuoNNWoGD3a8UzbOANI,606
|
|
38
|
+
flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl,sha256=wxN6I8uvWZ4MErvTbQJTJOTbY4H_fsYCBXmZURJWLGQ,675
|
|
39
|
+
flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl,sha256=wFeJuhqnBPQtKCBvnE3ySBpxmbeNdxcsq2Eb_RmSDIg,655
|
|
40
|
+
flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl,sha256=zkxLTQRvujF76sIlzNNGPVU7Y9nVCwNBxAx82AOBaJY,654
|
|
41
41
|
flwr/cli/run/__init__.py,sha256=oCd6HmQDx-sqver1gecgx-uMA38BLTSiiKpl7RGNceg,789
|
|
42
42
|
flwr/cli/run/run.py,sha256=Oadt7JsJX549JG-2P1UPdF11vnblLWS8uGvuVx0modA,2687
|
|
43
43
|
flwr/cli/utils.py,sha256=px-M-IlBLu6Ez-Sc9tWhsJRjWurRaZTmxB9ASz8wurk,4119
|
|
44
44
|
flwr/client/__init__.py,sha256=tcgMyAW8brnmAIk4NmXkonVjYV3lafQJD4vfZ3OJ6kA,1279
|
|
45
|
-
flwr/client/app.py,sha256=
|
|
45
|
+
flwr/client/app.py,sha256=QwSlJ7duRor1X7PRqet0rjVD64Nzsw7KKYwfc7vK50Q,23793
|
|
46
46
|
flwr/client/client.py,sha256=Vp9UkOkoHdNfn6iMYZsj_5m_GICiFfUlKEVaLad-YhM,8183
|
|
47
47
|
flwr/client/client_app.py,sha256=2jyVTzu8pwDtg66z4FjAa_kPzg31Q8-hx-RkDhguIqw,8635
|
|
48
48
|
flwr/client/dpfedavg_numpy_client.py,sha256=9Tnig4iml2J88HBKNahegjXjbfvIQyBtaIQaqjbeqsA,7435
|
|
@@ -50,7 +50,7 @@ flwr/client/grpc_client/__init__.py,sha256=LsnbqXiJhgQcB0XzAlUQgPx011Uf7Y7yabIC1
|
|
|
50
50
|
flwr/client/grpc_client/connection.py,sha256=KWbBwuvn1-2wjrAKteydGCZC_7A2zmEjk3DycQWafrA,8993
|
|
51
51
|
flwr/client/grpc_rere_client/__init__.py,sha256=avn6W_vHEM_yZEB1S7hCZgnTbXb6ZujqRP_vAzyXu-0,752
|
|
52
52
|
flwr/client/grpc_rere_client/client_interceptor.py,sha256=rDBXRVo-d-rflxJ6Kw3eDfBmvChdUHkzRw5eP-bpe6Y,4903
|
|
53
|
-
flwr/client/grpc_rere_client/connection.py,sha256=
|
|
53
|
+
flwr/client/grpc_rere_client/connection.py,sha256=RJxImIWiGem5YFBIpH939GMfY5c_lA4lG2fCp-KYFUU,9649
|
|
54
54
|
flwr/client/heartbeat.py,sha256=cx37mJBH8LyoIN4Lks85wtqT1mnU5GulQnr4pGCvAq0,2404
|
|
55
55
|
flwr/client/message_handler/__init__.py,sha256=abHvBRJJiiaAMNgeILQbMOa6h8WqMK2BcnvxwQZFpic,719
|
|
56
56
|
flwr/client/message_handler/message_handler.py,sha256=ml_FlduAJ5pxO31n1tKRrWfQRSxkMgKLbwXXcRsNSos,6553
|
|
@@ -229,8 +229,8 @@ flwr/simulation/ray_transport/ray_actor.py,sha256=_wv2eP7qxkCZ-6rMyYWnjLrGPBZRxj
|
|
|
229
229
|
flwr/simulation/ray_transport/ray_client_proxy.py,sha256=oDu4sEPIOu39vrNi-fqDAe10xtNUXMO49bM2RWfRcyw,6738
|
|
230
230
|
flwr/simulation/ray_transport/utils.py,sha256=TYdtfg1P9VfTdLMOJlifInGpxWHYs9UfUqIv2wfkRLA,2392
|
|
231
231
|
flwr/simulation/run_simulation.py,sha256=Jmc6DyN5UCY1U1PcDvL04NgYmEQ6ufJ1JisjG5yqfY8,15098
|
|
232
|
-
flwr_nightly-1.
|
|
233
|
-
flwr_nightly-1.
|
|
234
|
-
flwr_nightly-1.
|
|
235
|
-
flwr_nightly-1.
|
|
236
|
-
flwr_nightly-1.
|
|
232
|
+
flwr_nightly-1.10.0.dev20240610.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
233
|
+
flwr_nightly-1.10.0.dev20240610.dist-info/METADATA,sha256=OZC0j2snVxyAeImtM9_Ql6sXmRhCFy6Cc-e-mE_rZwk,15518
|
|
234
|
+
flwr_nightly-1.10.0.dev20240610.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
235
|
+
flwr_nightly-1.10.0.dev20240610.dist-info/entry_points.txt,sha256=8JJPfpqMnXz9c5V_FSt07Xwd-wCWbAO3MFUDXQ5ZGsI,378
|
|
236
|
+
flwr_nightly-1.10.0.dev20240610.dist-info/RECORD,,
|
{flwr_nightly-1.9.0.dev20240609.dist-info → flwr_nightly-1.10.0.dev20240610.dist-info}/LICENSE
RENAMED
|
File without changes
|
{flwr_nightly-1.9.0.dev20240609.dist-info → flwr_nightly-1.10.0.dev20240610.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|