flwr-nightly 1.8.0.dev20240315__py3-none-any.whl → 1.15.0.dev20250114__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- flwr/cli/app.py +16 -2
- flwr/cli/build.py +181 -0
- flwr/cli/cli_user_auth_interceptor.py +90 -0
- flwr/cli/config_utils.py +343 -0
- flwr/cli/example.py +4 -1
- flwr/cli/install.py +253 -0
- flwr/cli/log.py +182 -0
- flwr/{server/superlink/state → cli/login}/__init__.py +4 -10
- flwr/cli/login/login.py +88 -0
- flwr/cli/ls.py +327 -0
- flwr/cli/new/__init__.py +1 -0
- flwr/cli/new/new.py +210 -66
- flwr/cli/new/templates/app/.gitignore.tpl +163 -0
- flwr/cli/new/templates/app/LICENSE.tpl +202 -0
- flwr/cli/new/templates/app/README.baseline.md.tpl +127 -0
- flwr/cli/new/templates/app/README.flowertune.md.tpl +66 -0
- flwr/cli/new/templates/app/README.md.tpl +16 -32
- flwr/cli/new/templates/app/code/__init__.baseline.py.tpl +1 -0
- flwr/cli/new/templates/app/code/__init__.py.tpl +1 -1
- flwr/cli/new/templates/app/code/client.baseline.py.tpl +58 -0
- flwr/cli/new/templates/app/code/client.huggingface.py.tpl +55 -0
- flwr/cli/new/templates/app/code/client.jax.py.tpl +50 -0
- flwr/cli/new/templates/app/code/client.mlx.py.tpl +73 -0
- flwr/cli/new/templates/app/code/client.numpy.py.tpl +7 -7
- flwr/cli/new/templates/app/code/client.pytorch.py.tpl +30 -21
- flwr/cli/new/templates/app/code/client.sklearn.py.tpl +63 -0
- flwr/cli/new/templates/app/code/client.tensorflow.py.tpl +57 -1
- flwr/cli/new/templates/app/code/dataset.baseline.py.tpl +36 -0
- flwr/cli/new/templates/app/code/flwr_tune/__init__.py +15 -0
- flwr/cli/new/templates/app/code/flwr_tune/client_app.py.tpl +126 -0
- flwr/cli/new/templates/app/code/flwr_tune/dataset.py.tpl +87 -0
- flwr/cli/new/templates/app/code/flwr_tune/models.py.tpl +78 -0
- flwr/cli/new/templates/app/code/flwr_tune/server_app.py.tpl +94 -0
- flwr/cli/new/templates/app/code/flwr_tune/strategy.py.tpl +83 -0
- flwr/cli/new/templates/app/code/model.baseline.py.tpl +80 -0
- flwr/cli/new/templates/app/code/server.baseline.py.tpl +46 -0
- flwr/cli/new/templates/app/code/server.huggingface.py.tpl +38 -0
- flwr/cli/new/templates/app/code/server.jax.py.tpl +26 -0
- flwr/cli/new/templates/app/code/server.mlx.py.tpl +31 -0
- flwr/cli/new/templates/app/code/server.numpy.py.tpl +22 -9
- flwr/cli/new/templates/app/code/server.pytorch.py.tpl +21 -18
- flwr/cli/new/templates/app/code/server.sklearn.py.tpl +36 -0
- flwr/cli/new/templates/app/code/server.tensorflow.py.tpl +29 -1
- flwr/cli/new/templates/app/code/strategy.baseline.py.tpl +1 -0
- flwr/cli/new/templates/app/code/task.huggingface.py.tpl +102 -0
- flwr/cli/new/templates/app/code/task.jax.py.tpl +57 -0
- flwr/cli/new/templates/app/code/task.mlx.py.tpl +102 -0
- flwr/cli/new/templates/app/code/task.numpy.py.tpl +7 -0
- flwr/cli/new/templates/app/code/task.pytorch.py.tpl +29 -24
- flwr/cli/new/templates/app/code/task.sklearn.py.tpl +67 -0
- flwr/cli/new/templates/app/code/task.tensorflow.py.tpl +53 -0
- flwr/cli/new/templates/app/code/utils.baseline.py.tpl +1 -0
- flwr/cli/new/templates/app/pyproject.baseline.toml.tpl +138 -0
- flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +68 -0
- flwr/cli/new/templates/app/pyproject.huggingface.toml.tpl +46 -0
- flwr/cli/new/templates/app/pyproject.jax.toml.tpl +35 -0
- flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +39 -0
- flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +25 -12
- flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +29 -14
- flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +35 -0
- flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +29 -14
- flwr/cli/run/__init__.py +1 -0
- flwr/cli/run/run.py +212 -34
- flwr/cli/stop.py +130 -0
- flwr/cli/utils.py +240 -5
- flwr/client/__init__.py +3 -2
- flwr/client/app.py +432 -255
- flwr/client/client.py +1 -11
- flwr/client/client_app.py +74 -13
- flwr/client/clientapp/__init__.py +22 -0
- flwr/client/clientapp/app.py +259 -0
- flwr/client/clientapp/clientappio_servicer.py +244 -0
- flwr/client/clientapp/utils.py +115 -0
- flwr/client/dpfedavg_numpy_client.py +7 -8
- flwr/client/grpc_adapter_client/__init__.py +15 -0
- flwr/client/grpc_adapter_client/connection.py +98 -0
- flwr/client/grpc_client/connection.py +21 -7
- flwr/client/grpc_rere_client/__init__.py +1 -1
- flwr/client/grpc_rere_client/client_interceptor.py +176 -0
- flwr/client/grpc_rere_client/connection.py +163 -56
- flwr/client/grpc_rere_client/grpc_adapter.py +167 -0
- flwr/client/heartbeat.py +74 -0
- flwr/client/message_handler/__init__.py +1 -1
- flwr/client/message_handler/message_handler.py +10 -11
- flwr/client/mod/__init__.py +5 -5
- flwr/client/mod/centraldp_mods.py +4 -2
- flwr/client/mod/comms_mods.py +5 -4
- flwr/client/mod/localdp_mod.py +10 -5
- flwr/client/mod/secure_aggregation/__init__.py +1 -1
- flwr/client/mod/secure_aggregation/secaggplus_mod.py +26 -26
- flwr/client/mod/utils.py +2 -4
- flwr/client/nodestate/__init__.py +26 -0
- flwr/client/nodestate/in_memory_nodestate.py +38 -0
- flwr/client/nodestate/nodestate.py +31 -0
- flwr/client/nodestate/nodestate_factory.py +38 -0
- flwr/client/numpy_client.py +8 -31
- flwr/client/rest_client/__init__.py +1 -1
- flwr/client/rest_client/connection.py +199 -176
- flwr/client/run_info_store.py +112 -0
- flwr/client/supernode/__init__.py +24 -0
- flwr/client/supernode/app.py +321 -0
- flwr/client/typing.py +1 -0
- flwr/common/__init__.py +17 -11
- flwr/common/address.py +47 -3
- flwr/common/args.py +153 -0
- flwr/common/auth_plugin/__init__.py +24 -0
- flwr/common/auth_plugin/auth_plugin.py +121 -0
- flwr/common/config.py +243 -0
- flwr/common/constant.py +132 -1
- flwr/common/context.py +32 -2
- flwr/common/date.py +22 -4
- flwr/common/differential_privacy.py +2 -2
- flwr/common/dp.py +2 -4
- flwr/common/exit_handlers.py +3 -3
- flwr/common/grpc.py +164 -5
- flwr/common/logger.py +230 -12
- flwr/common/message.py +191 -106
- flwr/common/object_ref.py +179 -44
- flwr/common/pyproject.py +1 -0
- flwr/common/record/__init__.py +2 -1
- flwr/common/record/configsrecord.py +58 -18
- flwr/common/record/metricsrecord.py +57 -17
- flwr/common/record/parametersrecord.py +88 -20
- flwr/common/record/recordset.py +153 -30
- flwr/common/record/typeddict.py +30 -55
- flwr/common/recordset_compat.py +31 -12
- flwr/common/retry_invoker.py +123 -30
- flwr/common/secure_aggregation/__init__.py +1 -1
- flwr/common/secure_aggregation/crypto/__init__.py +1 -1
- flwr/common/secure_aggregation/crypto/shamir.py +11 -11
- flwr/common/secure_aggregation/crypto/symmetric_encryption.py +68 -4
- flwr/common/secure_aggregation/ndarrays_arithmetic.py +17 -17
- flwr/common/secure_aggregation/quantization.py +8 -8
- flwr/common/secure_aggregation/secaggplus_constants.py +1 -1
- flwr/common/secure_aggregation/secaggplus_utils.py +10 -12
- flwr/common/serde.py +298 -19
- flwr/common/telemetry.py +65 -29
- flwr/common/typing.py +120 -19
- flwr/common/version.py +17 -3
- flwr/proto/clientappio_pb2.py +45 -0
- flwr/proto/clientappio_pb2.pyi +132 -0
- flwr/proto/clientappio_pb2_grpc.py +135 -0
- flwr/proto/clientappio_pb2_grpc.pyi +53 -0
- flwr/proto/exec_pb2.py +62 -0
- flwr/proto/exec_pb2.pyi +212 -0
- flwr/proto/exec_pb2_grpc.py +237 -0
- flwr/proto/exec_pb2_grpc.pyi +93 -0
- flwr/proto/fab_pb2.py +31 -0
- flwr/proto/fab_pb2.pyi +65 -0
- flwr/proto/fab_pb2_grpc.py +4 -0
- flwr/proto/fab_pb2_grpc.pyi +4 -0
- flwr/proto/fleet_pb2.py +42 -23
- flwr/proto/fleet_pb2.pyi +123 -1
- flwr/proto/fleet_pb2_grpc.py +170 -0
- flwr/proto/fleet_pb2_grpc.pyi +61 -0
- flwr/proto/grpcadapter_pb2.py +32 -0
- flwr/proto/grpcadapter_pb2.pyi +43 -0
- flwr/proto/grpcadapter_pb2_grpc.py +66 -0
- flwr/proto/grpcadapter_pb2_grpc.pyi +24 -0
- flwr/proto/log_pb2.py +29 -0
- flwr/proto/log_pb2.pyi +39 -0
- flwr/proto/log_pb2_grpc.py +4 -0
- flwr/proto/log_pb2_grpc.pyi +4 -0
- flwr/proto/message_pb2.py +41 -0
- flwr/proto/message_pb2.pyi +128 -0
- flwr/proto/message_pb2_grpc.py +4 -0
- flwr/proto/message_pb2_grpc.pyi +4 -0
- flwr/proto/node_pb2.py +1 -1
- flwr/proto/recordset_pb2.py +35 -33
- flwr/proto/recordset_pb2.pyi +40 -14
- flwr/proto/run_pb2.py +64 -0
- flwr/proto/run_pb2.pyi +268 -0
- flwr/proto/run_pb2_grpc.py +4 -0
- flwr/proto/run_pb2_grpc.pyi +4 -0
- flwr/proto/serverappio_pb2.py +52 -0
- flwr/proto/{driver_pb2.pyi → serverappio_pb2.pyi} +62 -20
- flwr/proto/serverappio_pb2_grpc.py +410 -0
- flwr/proto/serverappio_pb2_grpc.pyi +160 -0
- flwr/proto/simulationio_pb2.py +38 -0
- flwr/proto/simulationio_pb2.pyi +65 -0
- flwr/proto/simulationio_pb2_grpc.py +239 -0
- flwr/proto/simulationio_pb2_grpc.pyi +94 -0
- flwr/proto/task_pb2.py +7 -8
- flwr/proto/task_pb2.pyi +8 -5
- flwr/proto/transport_pb2.py +8 -8
- flwr/proto/transport_pb2.pyi +9 -6
- flwr/server/__init__.py +2 -10
- flwr/server/app.py +579 -402
- flwr/server/client_manager.py +8 -6
- flwr/server/compat/app.py +6 -62
- flwr/server/compat/app_utils.py +14 -8
- flwr/server/compat/driver_client_proxy.py +25 -58
- flwr/server/compat/legacy_context.py +5 -4
- flwr/server/driver/__init__.py +2 -0
- flwr/server/driver/driver.py +36 -131
- flwr/server/driver/grpc_driver.py +217 -81
- flwr/server/driver/inmemory_driver.py +182 -0
- flwr/server/history.py +28 -29
- flwr/server/run_serverapp.py +15 -126
- flwr/server/server.py +50 -44
- flwr/server/server_app.py +59 -10
- flwr/server/serverapp/__init__.py +22 -0
- flwr/server/serverapp/app.py +256 -0
- flwr/server/serverapp_components.py +52 -0
- flwr/server/strategy/__init__.py +2 -2
- flwr/server/strategy/aggregate.py +37 -23
- flwr/server/strategy/bulyan.py +9 -9
- flwr/server/strategy/dp_adaptive_clipping.py +25 -25
- flwr/server/strategy/dp_fixed_clipping.py +23 -22
- flwr/server/strategy/dpfedavg_adaptive.py +8 -8
- flwr/server/strategy/dpfedavg_fixed.py +13 -12
- flwr/server/strategy/fault_tolerant_fedavg.py +11 -11
- flwr/server/strategy/fedadagrad.py +9 -9
- flwr/server/strategy/fedadam.py +20 -10
- flwr/server/strategy/fedavg.py +16 -16
- flwr/server/strategy/fedavg_android.py +17 -17
- flwr/server/strategy/fedavgm.py +9 -9
- flwr/server/strategy/fedmedian.py +5 -5
- flwr/server/strategy/fedopt.py +6 -6
- flwr/server/strategy/fedprox.py +7 -7
- flwr/server/strategy/fedtrimmedavg.py +8 -8
- flwr/server/strategy/fedxgb_bagging.py +12 -12
- flwr/server/strategy/fedxgb_cyclic.py +10 -10
- flwr/server/strategy/fedxgb_nn_avg.py +6 -6
- flwr/server/strategy/fedyogi.py +9 -9
- flwr/server/strategy/krum.py +9 -9
- flwr/server/strategy/qfedavg.py +16 -16
- flwr/server/strategy/strategy.py +10 -10
- flwr/server/superlink/driver/__init__.py +2 -2
- flwr/server/superlink/driver/serverappio_grpc.py +61 -0
- flwr/server/superlink/driver/serverappio_servicer.py +363 -0
- flwr/server/superlink/ffs/__init__.py +24 -0
- flwr/server/superlink/ffs/disk_ffs.py +108 -0
- flwr/server/superlink/ffs/ffs.py +79 -0
- flwr/server/superlink/ffs/ffs_factory.py +47 -0
- flwr/server/superlink/fleet/__init__.py +1 -1
- flwr/server/superlink/fleet/grpc_adapter/__init__.py +15 -0
- flwr/server/superlink/fleet/grpc_adapter/grpc_adapter_servicer.py +162 -0
- flwr/server/superlink/fleet/grpc_bidi/__init__.py +1 -1
- flwr/server/superlink/fleet/grpc_bidi/flower_service_servicer.py +4 -2
- flwr/server/superlink/fleet/grpc_bidi/grpc_bridge.py +3 -2
- flwr/server/superlink/fleet/grpc_bidi/grpc_client_proxy.py +1 -1
- flwr/server/superlink/fleet/grpc_bidi/grpc_server.py +5 -154
- flwr/server/superlink/fleet/grpc_rere/__init__.py +1 -1
- flwr/server/superlink/fleet/grpc_rere/fleet_servicer.py +120 -13
- flwr/server/superlink/fleet/grpc_rere/server_interceptor.py +228 -0
- flwr/server/superlink/fleet/message_handler/__init__.py +1 -1
- flwr/server/superlink/fleet/message_handler/message_handler.py +153 -9
- flwr/server/superlink/fleet/rest_rere/__init__.py +1 -1
- flwr/server/superlink/fleet/rest_rere/rest_api.py +119 -81
- flwr/server/superlink/fleet/vce/__init__.py +1 -0
- flwr/server/superlink/fleet/vce/backend/__init__.py +4 -4
- flwr/server/superlink/fleet/vce/backend/backend.py +8 -9
- flwr/server/superlink/fleet/vce/backend/raybackend.py +87 -68
- flwr/server/superlink/fleet/vce/vce_api.py +208 -146
- flwr/server/superlink/linkstate/__init__.py +28 -0
- flwr/server/superlink/linkstate/in_memory_linkstate.py +581 -0
- flwr/server/superlink/linkstate/linkstate.py +389 -0
- flwr/server/superlink/{state/state_factory.py → linkstate/linkstate_factory.py} +19 -10
- flwr/server/superlink/linkstate/sqlite_linkstate.py +1236 -0
- flwr/server/superlink/linkstate/utils.py +389 -0
- flwr/server/superlink/simulation/__init__.py +15 -0
- flwr/server/superlink/simulation/simulationio_grpc.py +65 -0
- flwr/server/superlink/simulation/simulationio_servicer.py +186 -0
- flwr/server/superlink/utils.py +65 -0
- flwr/server/typing.py +2 -0
- flwr/server/utils/__init__.py +1 -1
- flwr/server/utils/tensorboard.py +5 -5
- flwr/server/utils/validator.py +31 -11
- flwr/server/workflow/default_workflows.py +70 -26
- flwr/server/workflow/secure_aggregation/secagg_workflow.py +1 -0
- flwr/server/workflow/secure_aggregation/secaggplus_workflow.py +40 -27
- flwr/simulation/__init__.py +12 -5
- flwr/simulation/app.py +247 -315
- flwr/simulation/legacy_app.py +402 -0
- flwr/simulation/ray_transport/__init__.py +1 -1
- flwr/simulation/ray_transport/ray_actor.py +42 -67
- flwr/simulation/ray_transport/ray_client_proxy.py +37 -17
- flwr/simulation/ray_transport/utils.py +1 -0
- flwr/simulation/run_simulation.py +306 -163
- flwr/simulation/simulationio_connection.py +89 -0
- flwr/superexec/__init__.py +15 -0
- flwr/superexec/app.py +59 -0
- flwr/superexec/deployment.py +188 -0
- flwr/superexec/exec_grpc.py +80 -0
- flwr/superexec/exec_servicer.py +231 -0
- flwr/superexec/exec_user_auth_interceptor.py +101 -0
- flwr/superexec/executor.py +96 -0
- flwr/superexec/simulation.py +124 -0
- {flwr_nightly-1.8.0.dev20240315.dist-info → flwr_nightly-1.15.0.dev20250114.dist-info}/METADATA +33 -26
- flwr_nightly-1.15.0.dev20250114.dist-info/RECORD +328 -0
- flwr_nightly-1.15.0.dev20250114.dist-info/entry_points.txt +12 -0
- flwr/cli/flower_toml.py +0 -140
- flwr/cli/new/templates/app/flower.toml.tpl +0 -13
- flwr/cli/new/templates/app/requirements.numpy.txt.tpl +0 -2
- flwr/cli/new/templates/app/requirements.pytorch.txt.tpl +0 -4
- flwr/cli/new/templates/app/requirements.tensorflow.txt.tpl +0 -4
- flwr/client/node_state.py +0 -48
- flwr/client/node_state_tests.py +0 -65
- flwr/proto/driver_pb2.py +0 -44
- flwr/proto/driver_pb2_grpc.py +0 -169
- flwr/proto/driver_pb2_grpc.pyi +0 -66
- flwr/server/superlink/driver/driver_grpc.py +0 -54
- flwr/server/superlink/driver/driver_servicer.py +0 -129
- flwr/server/superlink/state/in_memory_state.py +0 -230
- flwr/server/superlink/state/sqlite_state.py +0 -630
- flwr/server/superlink/state/state.py +0 -154
- flwr_nightly-1.8.0.dev20240315.dist-info/RECORD +0 -211
- flwr_nightly-1.8.0.dev20240315.dist-info/entry_points.txt +0 -9
- {flwr_nightly-1.8.0.dev20240315.dist-info → flwr_nightly-1.15.0.dev20250114.dist-info}/LICENSE +0 -0
- {flwr_nightly-1.8.0.dev20240315.dist-info → flwr_nightly-1.15.0.dev20250114.dist-info}/WHEEL +0 -0
flwr/server/client_manager.py
CHANGED
@@ -19,7 +19,7 @@ import random
|
|
19
19
|
import threading
|
20
20
|
from abc import ABC, abstractmethod
|
21
21
|
from logging import INFO
|
22
|
-
from typing import
|
22
|
+
from typing import Optional
|
23
23
|
|
24
24
|
from flwr.common.logger import log
|
25
25
|
|
@@ -47,6 +47,7 @@ class ClientManager(ABC):
|
|
47
47
|
Parameters
|
48
48
|
----------
|
49
49
|
client : flwr.server.client_proxy.ClientProxy
|
50
|
+
The ClientProxy of the Client to register.
|
50
51
|
|
51
52
|
Returns
|
52
53
|
-------
|
@@ -64,10 +65,11 @@ class ClientManager(ABC):
|
|
64
65
|
Parameters
|
65
66
|
----------
|
66
67
|
client : flwr.server.client_proxy.ClientProxy
|
68
|
+
The ClientProxy of the Client to unregister.
|
67
69
|
"""
|
68
70
|
|
69
71
|
@abstractmethod
|
70
|
-
def all(self) ->
|
72
|
+
def all(self) -> dict[str, ClientProxy]:
|
71
73
|
"""Return all available clients."""
|
72
74
|
|
73
75
|
@abstractmethod
|
@@ -80,7 +82,7 @@ class ClientManager(ABC):
|
|
80
82
|
num_clients: int,
|
81
83
|
min_num_clients: Optional[int] = None,
|
82
84
|
criterion: Optional[Criterion] = None,
|
83
|
-
) ->
|
85
|
+
) -> list[ClientProxy]:
|
84
86
|
"""Sample a number of Flower ClientProxy instances."""
|
85
87
|
|
86
88
|
|
@@ -88,7 +90,7 @@ class SimpleClientManager(ClientManager):
|
|
88
90
|
"""Provides a pool of available clients."""
|
89
91
|
|
90
92
|
def __init__(self) -> None:
|
91
|
-
self.clients:
|
93
|
+
self.clients: dict[str, ClientProxy] = {}
|
92
94
|
self._cv = threading.Condition()
|
93
95
|
|
94
96
|
def __len__(self) -> int:
|
@@ -170,7 +172,7 @@ class SimpleClientManager(ClientManager):
|
|
170
172
|
with self._cv:
|
171
173
|
self._cv.notify_all()
|
172
174
|
|
173
|
-
def all(self) ->
|
175
|
+
def all(self) -> dict[str, ClientProxy]:
|
174
176
|
"""Return all available clients."""
|
175
177
|
return self.clients
|
176
178
|
|
@@ -179,7 +181,7 @@ class SimpleClientManager(ClientManager):
|
|
179
181
|
num_clients: int,
|
180
182
|
min_num_clients: Optional[int] = None,
|
181
183
|
criterion: Optional[Criterion] = None,
|
182
|
-
) ->
|
184
|
+
) -> list[ClientProxy]:
|
183
185
|
"""Sample a number of Flower ClientProxy instances."""
|
184
186
|
# Block until at least num_clients are connected.
|
185
187
|
if min_num_clients is None:
|
flwr/server/compat/app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2024 Flower Labs GmbH. All Rights Reserved.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -15,14 +15,10 @@
|
|
15
15
|
"""Flower driver app."""
|
16
16
|
|
17
17
|
|
18
|
-
import sys
|
19
18
|
from logging import INFO
|
20
|
-
from
|
21
|
-
from typing import Optional, Union
|
19
|
+
from typing import Optional
|
22
20
|
|
23
|
-
from flwr.common import
|
24
|
-
from flwr.common.address import parse_address
|
25
|
-
from flwr.common.logger import log, warn_deprecated_feature
|
21
|
+
from flwr.common.logger import log
|
26
22
|
from flwr.server.client_manager import ClientManager
|
27
23
|
from flwr.server.history import History
|
28
24
|
from flwr.server.server import Server, init_defaults, run_fl
|
@@ -32,33 +28,21 @@ from flwr.server.strategy import Strategy
|
|
32
28
|
from ..driver import Driver
|
33
29
|
from .app_utils import start_update_client_manager_thread
|
34
30
|
|
35
|
-
DEFAULT_SERVER_ADDRESS_DRIVER = "[::]:9091"
|
36
|
-
|
37
|
-
ERROR_MESSAGE_DRIVER_NOT_CONNECTED = """
|
38
|
-
[Driver] Error: Not connected.
|
39
|
-
|
40
|
-
Call `connect()` on the `Driver` instance before calling any of the other `Driver`
|
41
|
-
methods.
|
42
|
-
"""
|
43
|
-
|
44
31
|
|
45
32
|
def start_driver( # pylint: disable=too-many-arguments, too-many-locals
|
46
33
|
*,
|
47
|
-
|
34
|
+
driver: Driver,
|
48
35
|
server: Optional[Server] = None,
|
49
36
|
config: Optional[ServerConfig] = None,
|
50
37
|
strategy: Optional[Strategy] = None,
|
51
38
|
client_manager: Optional[ClientManager] = None,
|
52
|
-
root_certificates: Optional[Union[bytes, str]] = None,
|
53
|
-
driver: Optional[Driver] = None,
|
54
39
|
) -> History:
|
55
40
|
"""Start a Flower Driver API server.
|
56
41
|
|
57
42
|
Parameters
|
58
43
|
----------
|
59
|
-
|
60
|
-
The
|
61
|
-
Defaults to `"[::]:8080"`.
|
44
|
+
driver : Driver
|
45
|
+
The Driver object to use.
|
62
46
|
server : Optional[flwr.server.Server] (default: None)
|
63
47
|
A server implementation, either `flwr.server.Server` or a subclass
|
64
48
|
thereof. If no instance is provided, then `start_driver` will create
|
@@ -74,50 +58,12 @@ def start_driver( # pylint: disable=too-many-arguments, too-many-locals
|
|
74
58
|
An implementation of the class `flwr.server.ClientManager`. If no
|
75
59
|
implementation is provided, then `start_driver` will use
|
76
60
|
`flwr.server.SimpleClientManager`.
|
77
|
-
root_certificates : Optional[Union[bytes, str]] (default: None)
|
78
|
-
The PEM-encoded root certificates as a byte string or a path string.
|
79
|
-
If provided, a secure connection using the certificates will be
|
80
|
-
established to an SSL-enabled Flower server.
|
81
|
-
driver : Optional[Driver] (default: None)
|
82
|
-
The Driver object to use.
|
83
61
|
|
84
62
|
Returns
|
85
63
|
-------
|
86
64
|
hist : flwr.server.history.History
|
87
65
|
Object containing training and evaluation metrics.
|
88
|
-
|
89
|
-
Examples
|
90
|
-
--------
|
91
|
-
Starting a driver that connects to an insecure server:
|
92
|
-
|
93
|
-
>>> start_driver()
|
94
|
-
|
95
|
-
Starting a driver that connects to an SSL-enabled server:
|
96
|
-
|
97
|
-
>>> start_driver(
|
98
|
-
>>> root_certificates=Path("/crts/root.pem").read_bytes()
|
99
|
-
>>> )
|
100
66
|
"""
|
101
|
-
event(EventType.START_DRIVER_ENTER)
|
102
|
-
|
103
|
-
if driver is None:
|
104
|
-
# Not passing a `Driver` object is deprecated
|
105
|
-
warn_deprecated_feature("start_driver")
|
106
|
-
|
107
|
-
# Parse IP address
|
108
|
-
parsed_address = parse_address(server_address)
|
109
|
-
if not parsed_address:
|
110
|
-
sys.exit(f"Server IP address ({server_address}) cannot be parsed.")
|
111
|
-
host, port, is_v6 = parsed_address
|
112
|
-
address = f"[{host}]:{port}" if is_v6 else f"{host}:{port}"
|
113
|
-
|
114
|
-
# Create the Driver
|
115
|
-
if isinstance(root_certificates, str):
|
116
|
-
root_certificates = Path(root_certificates).read_bytes()
|
117
|
-
driver = Driver(
|
118
|
-
driver_service_address=address, root_certificates=root_certificates
|
119
|
-
)
|
120
|
-
|
121
67
|
# Initialize the Driver API server and config
|
122
68
|
initialized_server, initialized_config = init_defaults(
|
123
69
|
server=server,
|
@@ -147,6 +93,4 @@ def start_driver( # pylint: disable=too-many-arguments, too-many-locals
|
|
147
93
|
f_stop.set()
|
148
94
|
thread.join()
|
149
95
|
|
150
|
-
event(EventType.START_SERVER_LEAVE)
|
151
|
-
|
152
96
|
return hist
|
flwr/server/compat/app_utils.py
CHANGED
@@ -16,8 +16,8 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
import threading
|
19
|
-
|
20
|
-
from typing import
|
19
|
+
|
20
|
+
from flwr.common.typing import RunNotRunningException
|
21
21
|
|
22
22
|
from ..client_manager import ClientManager
|
23
23
|
from ..compat.driver_client_proxy import DriverClientProxy
|
@@ -27,7 +27,7 @@ from ..driver import Driver
|
|
27
27
|
def start_update_client_manager_thread(
|
28
28
|
driver: Driver,
|
29
29
|
client_manager: ClientManager,
|
30
|
-
) ->
|
30
|
+
) -> tuple[threading.Thread, threading.Event]:
|
31
31
|
"""Periodically update the nodes list in the client manager in a thread.
|
32
32
|
|
33
33
|
This function starts a thread that periodically uses the associated driver to
|
@@ -60,6 +60,7 @@ def start_update_client_manager_thread(
|
|
60
60
|
client_manager,
|
61
61
|
f_stop,
|
62
62
|
),
|
63
|
+
daemon=True,
|
63
64
|
)
|
64
65
|
thread.start()
|
65
66
|
|
@@ -73,9 +74,13 @@ def _update_client_manager(
|
|
73
74
|
) -> None:
|
74
75
|
"""Update the nodes list in the client manager."""
|
75
76
|
# Loop until the driver is disconnected
|
76
|
-
registered_nodes:
|
77
|
+
registered_nodes: dict[int, DriverClientProxy] = {}
|
77
78
|
while not f_stop.is_set():
|
78
|
-
|
79
|
+
try:
|
80
|
+
all_node_ids = set(driver.get_node_ids())
|
81
|
+
except RunNotRunningException:
|
82
|
+
f_stop.set()
|
83
|
+
break
|
79
84
|
dead_nodes = set(registered_nodes).difference(all_node_ids)
|
80
85
|
new_nodes = all_node_ids.difference(registered_nodes)
|
81
86
|
|
@@ -89,9 +94,9 @@ def _update_client_manager(
|
|
89
94
|
for node_id in new_nodes:
|
90
95
|
client_proxy = DriverClientProxy(
|
91
96
|
node_id=node_id,
|
92
|
-
driver=driver
|
97
|
+
driver=driver,
|
93
98
|
anonymous=False,
|
94
|
-
run_id=driver.run_id,
|
99
|
+
run_id=driver.run.run_id,
|
95
100
|
)
|
96
101
|
if client_manager.register(client_proxy):
|
97
102
|
registered_nodes[node_id] = client_proxy
|
@@ -99,4 +104,5 @@ def _update_client_manager(
|
|
99
104
|
raise RuntimeError("Could not register node.")
|
100
105
|
|
101
106
|
# Sleep for 3 seconds
|
102
|
-
|
107
|
+
if not f_stop.is_set():
|
108
|
+
f_stop.wait(3)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2024 Flower Labs GmbH. All Rights Reserved.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -15,25 +15,20 @@
|
|
15
15
|
"""Flower ClientProxy implementation for Driver API."""
|
16
16
|
|
17
17
|
|
18
|
-
import
|
19
|
-
from typing import List, Optional
|
18
|
+
from typing import Optional
|
20
19
|
|
21
20
|
from flwr import common
|
22
|
-
from flwr.common import MessageType, MessageTypeLegacy, RecordSet
|
21
|
+
from flwr.common import Message, MessageType, MessageTypeLegacy, RecordSet
|
23
22
|
from flwr.common import recordset_compat as compat
|
24
|
-
from flwr.common import serde
|
25
|
-
from flwr.proto import driver_pb2, node_pb2, task_pb2 # pylint: disable=E0611
|
26
23
|
from flwr.server.client_proxy import ClientProxy
|
27
24
|
|
28
|
-
from ..driver.
|
29
|
-
|
30
|
-
SLEEP_TIME = 1
|
25
|
+
from ..driver.driver import Driver
|
31
26
|
|
32
27
|
|
33
28
|
class DriverClientProxy(ClientProxy):
|
34
29
|
"""Flower client proxy which delegates work using the Driver API."""
|
35
30
|
|
36
|
-
def __init__(self, node_id: int, driver:
|
31
|
+
def __init__(self, node_id: int, driver: Driver, anonymous: bool, run_id: int):
|
37
32
|
super().__init__(str(node_id))
|
38
33
|
self.node_id = node_id
|
39
34
|
self.driver = driver
|
@@ -114,56 +109,28 @@ class DriverClientProxy(ClientProxy):
|
|
114
109
|
timeout: Optional[float],
|
115
110
|
group_id: Optional[int],
|
116
111
|
) -> RecordSet:
|
117
|
-
task_ins = task_pb2.TaskIns( # pylint: disable=E1101
|
118
|
-
task_id="",
|
119
|
-
group_id=str(group_id) if group_id is not None else "",
|
120
|
-
run_id=self.run_id,
|
121
|
-
task=task_pb2.Task( # pylint: disable=E1101
|
122
|
-
producer=node_pb2.Node( # pylint: disable=E1101
|
123
|
-
node_id=0,
|
124
|
-
anonymous=True,
|
125
|
-
),
|
126
|
-
consumer=node_pb2.Node( # pylint: disable=E1101
|
127
|
-
node_id=self.node_id,
|
128
|
-
anonymous=self.anonymous,
|
129
|
-
),
|
130
|
-
task_type=task_type,
|
131
|
-
recordset=serde.recordset_to_proto(recordset),
|
132
|
-
),
|
133
|
-
)
|
134
|
-
push_task_ins_req = driver_pb2.PushTaskInsRequest( # pylint: disable=E1101
|
135
|
-
task_ins_list=[task_ins]
|
136
|
-
)
|
137
|
-
|
138
|
-
# Send TaskIns to Driver API
|
139
|
-
push_task_ins_res = self.driver.push_task_ins(req=push_task_ins_req)
|
140
|
-
|
141
|
-
if len(push_task_ins_res.task_ids) != 1:
|
142
|
-
raise ValueError("Unexpected number of task_ids")
|
143
112
|
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
113
|
+
# Create message
|
114
|
+
message = self.driver.create_message(
|
115
|
+
content=recordset,
|
116
|
+
message_type=task_type,
|
117
|
+
dst_node_id=self.node_id,
|
118
|
+
group_id=str(group_id) if group_id else "",
|
119
|
+
ttl=timeout,
|
120
|
+
)
|
150
121
|
|
151
|
-
|
152
|
-
|
153
|
-
node=node_pb2.Node(node_id=0, anonymous=True), # pylint: disable=E1101
|
154
|
-
task_ids=[task_id],
|
155
|
-
)
|
122
|
+
# Send message and wait for reply
|
123
|
+
messages = list(self.driver.send_and_receive(messages=[message]))
|
156
124
|
|
157
|
-
|
158
|
-
|
125
|
+
# A single reply is expected
|
126
|
+
if len(messages) != 1:
|
127
|
+
raise ValueError(f"Expected one Message but got: {len(messages)}")
|
159
128
|
|
160
|
-
|
161
|
-
|
129
|
+
# Only messages without errors can be handled beyond these point
|
130
|
+
msg: Message = messages[0]
|
131
|
+
if msg.has_error():
|
132
|
+
raise ValueError(
|
133
|
+
f"Message contains an Error (reason: {msg.error.reason}). "
|
134
|
+
"It originated during client-side execution of a message."
|
162
135
|
)
|
163
|
-
|
164
|
-
task_res = task_res_list[0]
|
165
|
-
return serde.recordset_from_proto(task_res.task.recordset)
|
166
|
-
|
167
|
-
if timeout is not None and time.time() > start_time + timeout:
|
168
|
-
raise RuntimeError("Timeout reached")
|
169
|
-
time.sleep(SLEEP_TIME)
|
136
|
+
return msg.content
|
@@ -18,7 +18,7 @@
|
|
18
18
|
from dataclasses import dataclass
|
19
19
|
from typing import Optional
|
20
20
|
|
21
|
-
from flwr.common import Context
|
21
|
+
from flwr.common import Context
|
22
22
|
|
23
23
|
from ..client_manager import ClientManager, SimpleClientManager
|
24
24
|
from ..history import History
|
@@ -35,9 +35,9 @@ class LegacyContext(Context):
|
|
35
35
|
client_manager: ClientManager
|
36
36
|
history: History
|
37
37
|
|
38
|
-
def __init__(
|
38
|
+
def __init__( # pylint: disable=too-many-arguments
|
39
39
|
self,
|
40
|
-
|
40
|
+
context: Context,
|
41
41
|
config: Optional[ServerConfig] = None,
|
42
42
|
strategy: Optional[Strategy] = None,
|
43
43
|
client_manager: Optional[ClientManager] = None,
|
@@ -52,4 +52,5 @@ class LegacyContext(Context):
|
|
52
52
|
self.strategy = strategy
|
53
53
|
self.client_manager = client_manager
|
54
54
|
self.history = History()
|
55
|
-
|
55
|
+
|
56
|
+
super().__init__(**vars(context))
|
flwr/server/driver/__init__.py
CHANGED
flwr/server/driver/driver.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2024 Flower Labs GmbH. All Rights Reserved.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -12,85 +12,47 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
# ==============================================================================
|
15
|
-
"""
|
15
|
+
"""Driver (abstract base class)."""
|
16
16
|
|
17
17
|
|
18
|
-
import
|
19
|
-
from
|
18
|
+
from abc import ABC, abstractmethod
|
19
|
+
from collections.abc import Iterable
|
20
|
+
from typing import Optional
|
20
21
|
|
21
|
-
from flwr.common import Message,
|
22
|
-
from flwr.common.
|
23
|
-
from flwr.proto.driver_pb2 import ( # pylint: disable=E0611
|
24
|
-
CreateRunRequest,
|
25
|
-
GetNodesRequest,
|
26
|
-
PullTaskResRequest,
|
27
|
-
PushTaskInsRequest,
|
28
|
-
)
|
29
|
-
from flwr.proto.node_pb2 import Node # pylint: disable=E0611
|
30
|
-
from flwr.proto.task_pb2 import TaskIns # pylint: disable=E0611
|
22
|
+
from flwr.common import Message, RecordSet
|
23
|
+
from flwr.common.typing import Run
|
31
24
|
|
32
|
-
from .grpc_driver import DEFAULT_SERVER_ADDRESS_DRIVER, GrpcDriver
|
33
25
|
|
26
|
+
class Driver(ABC):
|
27
|
+
"""Abstract base Driver class for the ServerAppIo API."""
|
34
28
|
|
35
|
-
|
36
|
-
|
29
|
+
@abstractmethod
|
30
|
+
def set_run(self, run_id: int) -> None:
|
31
|
+
"""Request a run to the SuperLink with a given `run_id`.
|
37
32
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
The IPv4 or IPv6 address of the Driver API server.
|
42
|
-
Defaults to `"[::]:9091"`.
|
43
|
-
certificates : bytes (default: None)
|
44
|
-
Tuple containing root certificate, server certificate, and private key
|
45
|
-
to start a secure SSL-enabled server. The tuple is expected to have
|
46
|
-
three bytes elements in the following order:
|
33
|
+
If a Run with the specified `run_id` exists, a local Run
|
34
|
+
object will be created. It enables further functionality
|
35
|
+
in the driver, such as sending `Messages`.
|
47
36
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
def __init__(
|
54
|
-
self,
|
55
|
-
driver_service_address: str = DEFAULT_SERVER_ADDRESS_DRIVER,
|
56
|
-
root_certificates: Optional[bytes] = None,
|
57
|
-
) -> None:
|
58
|
-
self.addr = driver_service_address
|
59
|
-
self.root_certificates = root_certificates
|
60
|
-
self.grpc_driver: Optional[GrpcDriver] = None
|
61
|
-
self.run_id: Optional[int] = None
|
62
|
-
self.node = Node(node_id=0, anonymous=True)
|
63
|
-
|
64
|
-
def _get_grpc_driver_and_run_id(self) -> Tuple[GrpcDriver, int]:
|
65
|
-
# Check if the GrpcDriver is initialized
|
66
|
-
if self.grpc_driver is None or self.run_id is None:
|
67
|
-
# Connect and create run
|
68
|
-
self.grpc_driver = GrpcDriver(
|
69
|
-
driver_service_address=self.addr,
|
70
|
-
root_certificates=self.root_certificates,
|
71
|
-
)
|
72
|
-
self.grpc_driver.connect()
|
73
|
-
res = self.grpc_driver.create_run(CreateRunRequest())
|
74
|
-
self.run_id = res.run_id
|
75
|
-
return self.grpc_driver, self.run_id
|
37
|
+
Parameters
|
38
|
+
----------
|
39
|
+
run_id : int
|
40
|
+
The `run_id` of the Run this Driver object operates in.
|
41
|
+
"""
|
76
42
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
and message.metadata.src_node_id == self.node.node_id
|
82
|
-
and message.metadata.message_id == ""
|
83
|
-
and message.metadata.reply_to_message == ""
|
84
|
-
):
|
85
|
-
raise ValueError(f"Invalid message: {message}")
|
43
|
+
@property
|
44
|
+
@abstractmethod
|
45
|
+
def run(self) -> Run:
|
46
|
+
"""Run information."""
|
86
47
|
|
87
|
-
|
48
|
+
@abstractmethod
|
49
|
+
def create_message( # pylint: disable=too-many-arguments,R0917
|
88
50
|
self,
|
89
51
|
content: RecordSet,
|
90
52
|
message_type: str,
|
91
53
|
dst_node_id: int,
|
92
54
|
group_id: str,
|
93
|
-
ttl:
|
55
|
+
ttl: Optional[float] = None,
|
94
56
|
) -> Message:
|
95
57
|
"""Create a new message with specified parameters.
|
96
58
|
|
@@ -110,36 +72,23 @@ class Driver:
|
|
110
72
|
group_id : str
|
111
73
|
The ID of the group to which this message is associated. In some settings,
|
112
74
|
this is used as the FL round.
|
113
|
-
ttl :
|
75
|
+
ttl : Optional[float] (default: None)
|
114
76
|
Time-to-live for the round trip of this message, i.e., the time from sending
|
115
|
-
this message to receiving a reply. It specifies the duration for
|
116
|
-
message and its potential reply are considered valid.
|
77
|
+
this message to receiving a reply. It specifies in seconds the duration for
|
78
|
+
which the message and its potential reply are considered valid. If unset,
|
79
|
+
the default TTL (i.e., `common.DEFAULT_TTL`) will be used.
|
117
80
|
|
118
81
|
Returns
|
119
82
|
-------
|
120
83
|
message : Message
|
121
84
|
A new `Message` instance with the specified content and metadata.
|
122
85
|
"""
|
123
|
-
_, run_id = self._get_grpc_driver_and_run_id()
|
124
|
-
metadata = Metadata(
|
125
|
-
run_id=run_id,
|
126
|
-
message_id="", # Will be set by the server
|
127
|
-
src_node_id=self.node.node_id,
|
128
|
-
dst_node_id=dst_node_id,
|
129
|
-
reply_to_message="",
|
130
|
-
group_id=group_id,
|
131
|
-
ttl=ttl,
|
132
|
-
message_type=message_type,
|
133
|
-
)
|
134
|
-
return Message(metadata=metadata, content=content)
|
135
86
|
|
136
|
-
|
87
|
+
@abstractmethod
|
88
|
+
def get_node_ids(self) -> list[int]:
|
137
89
|
"""Get node IDs."""
|
138
|
-
grpc_driver, run_id = self._get_grpc_driver_and_run_id()
|
139
|
-
# Call GrpcDriver method
|
140
|
-
res = grpc_driver.get_nodes(GetNodesRequest(run_id=run_id))
|
141
|
-
return [node.node_id for node in res.nodes]
|
142
90
|
|
91
|
+
@abstractmethod
|
143
92
|
def push_messages(self, messages: Iterable[Message]) -> Iterable[str]:
|
144
93
|
"""Push messages to specified node IDs.
|
145
94
|
|
@@ -157,20 +106,8 @@ class Driver:
|
|
157
106
|
An iterable of IDs for the messages that were sent, which can be used
|
158
107
|
to pull replies.
|
159
108
|
"""
|
160
|
-
grpc_driver, _ = self._get_grpc_driver_and_run_id()
|
161
|
-
# Construct TaskIns
|
162
|
-
task_ins_list: List[TaskIns] = []
|
163
|
-
for msg in messages:
|
164
|
-
# Check message
|
165
|
-
self._check_message(msg)
|
166
|
-
# Convert Message to TaskIns
|
167
|
-
taskins = message_to_taskins(msg)
|
168
|
-
# Add to list
|
169
|
-
task_ins_list.append(taskins)
|
170
|
-
# Call GrpcDriver method
|
171
|
-
res = grpc_driver.push_task_ins(PushTaskInsRequest(task_ins_list=task_ins_list))
|
172
|
-
return list(res.task_ids)
|
173
109
|
|
110
|
+
@abstractmethod
|
174
111
|
def pull_messages(self, message_ids: Iterable[str]) -> Iterable[Message]:
|
175
112
|
"""Pull messages based on message IDs.
|
176
113
|
|
@@ -187,15 +124,8 @@ class Driver:
|
|
187
124
|
messages : Iterable[Message]
|
188
125
|
An iterable of messages received.
|
189
126
|
"""
|
190
|
-
grpc_driver, _ = self._get_grpc_driver_and_run_id()
|
191
|
-
# Pull TaskRes
|
192
|
-
res = grpc_driver.pull_task_res(
|
193
|
-
PullTaskResRequest(node=self.node, task_ids=message_ids)
|
194
|
-
)
|
195
|
-
# Convert TaskRes to Message
|
196
|
-
msgs = [message_from_taskres(taskres) for taskres in res.task_res_list]
|
197
|
-
return msgs
|
198
127
|
|
128
|
+
@abstractmethod
|
199
129
|
def send_and_receive(
|
200
130
|
self,
|
201
131
|
messages: Iterable[Message],
|
@@ -229,28 +159,3 @@ class Driver:
|
|
229
159
|
replies for all sent messages. A message remains valid until its TTL,
|
230
160
|
which is not affected by `timeout`.
|
231
161
|
"""
|
232
|
-
# Push messages
|
233
|
-
msg_ids = set(self.push_messages(messages))
|
234
|
-
|
235
|
-
# Pull messages
|
236
|
-
end_time = time.time() + (timeout if timeout is not None else 0.0)
|
237
|
-
ret: List[Message] = []
|
238
|
-
while timeout is None or time.time() < end_time:
|
239
|
-
res_msgs = self.pull_messages(msg_ids)
|
240
|
-
ret.extend(res_msgs)
|
241
|
-
msg_ids.difference_update(
|
242
|
-
{msg.metadata.reply_to_message for msg in res_msgs}
|
243
|
-
)
|
244
|
-
if len(msg_ids) == 0:
|
245
|
-
break
|
246
|
-
# Sleep
|
247
|
-
time.sleep(3)
|
248
|
-
return ret
|
249
|
-
|
250
|
-
def close(self) -> None:
|
251
|
-
"""Disconnect from the SuperLink if connected."""
|
252
|
-
# Check if GrpcDriver is initialized
|
253
|
-
if self.grpc_driver is None:
|
254
|
-
return
|
255
|
-
# Disconnect
|
256
|
-
self.grpc_driver.disconnect()
|