flwr-nightly 1.8.0.dev20240315__py3-none-any.whl → 1.15.0.dev20250115__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 +135 -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 +304 -23
- 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 +2 -2
- flwr/proto/node_pb2.pyi +1 -4
- 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 -9
- flwr/server/compat/driver_client_proxy.py +25 -59
- 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 +220 -81
- flwr/server/driver/inmemory_driver.py +183 -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 +361 -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 +156 -13
- 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 +569 -0
- flwr/server/superlink/linkstate/linkstate.py +376 -0
- flwr/server/superlink/{state/state_factory.py → linkstate/linkstate_factory.py} +19 -10
- flwr/server/superlink/linkstate/sqlite_linkstate.py +1196 -0
- flwr/server/superlink/linkstate/utils.py +399 -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 +40 -45
- 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 +404 -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.dev20250115.dist-info}/METADATA +33 -26
- flwr_nightly-1.15.0.dev20250115.dist-info/RECORD +328 -0
- flwr_nightly-1.15.0.dev20250115.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.dev20250115.dist-info}/LICENSE +0 -0
- {flwr_nightly-1.8.0.dev20240315.dist-info → flwr_nightly-1.15.0.dev20250115.dist-info}/WHEEL +0 -0
@@ -0,0 +1,101 @@
|
|
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
|
+
"""Flower Exec API interceptor."""
|
16
|
+
|
17
|
+
|
18
|
+
from typing import Any, Callable, Union
|
19
|
+
|
20
|
+
import grpc
|
21
|
+
|
22
|
+
from flwr.common.auth_plugin import ExecAuthPlugin
|
23
|
+
from flwr.proto.exec_pb2 import ( # pylint: disable=E0611
|
24
|
+
GetAuthTokensRequest,
|
25
|
+
GetAuthTokensResponse,
|
26
|
+
GetLoginDetailsRequest,
|
27
|
+
GetLoginDetailsResponse,
|
28
|
+
StartRunRequest,
|
29
|
+
StartRunResponse,
|
30
|
+
StreamLogsRequest,
|
31
|
+
StreamLogsResponse,
|
32
|
+
)
|
33
|
+
|
34
|
+
Request = Union[
|
35
|
+
StartRunRequest,
|
36
|
+
StreamLogsRequest,
|
37
|
+
GetLoginDetailsRequest,
|
38
|
+
GetAuthTokensRequest,
|
39
|
+
]
|
40
|
+
|
41
|
+
Response = Union[
|
42
|
+
StartRunResponse, StreamLogsResponse, GetLoginDetailsResponse, GetAuthTokensResponse
|
43
|
+
]
|
44
|
+
|
45
|
+
|
46
|
+
class ExecUserAuthInterceptor(grpc.ServerInterceptor): # type: ignore
|
47
|
+
"""Exec API interceptor for user authentication."""
|
48
|
+
|
49
|
+
def __init__(
|
50
|
+
self,
|
51
|
+
auth_plugin: ExecAuthPlugin,
|
52
|
+
):
|
53
|
+
self.auth_plugin = auth_plugin
|
54
|
+
|
55
|
+
def intercept_service(
|
56
|
+
self,
|
57
|
+
continuation: Callable[[Any], Any],
|
58
|
+
handler_call_details: grpc.HandlerCallDetails,
|
59
|
+
) -> grpc.RpcMethodHandler:
|
60
|
+
"""Flower server interceptor authentication logic.
|
61
|
+
|
62
|
+
Intercept all unary-unary/unary-stream calls from users and authenticate users
|
63
|
+
by validating auth metadata sent by the user. Continue RPC call if user is
|
64
|
+
authenticated, else, terminate RPC call by setting context to abort.
|
65
|
+
"""
|
66
|
+
# One of the method handlers in
|
67
|
+
# `flwr.superexec.exec_servicer.ExecServicer`
|
68
|
+
method_handler: grpc.RpcMethodHandler = continuation(handler_call_details)
|
69
|
+
return self._generic_auth_unary_method_handler(method_handler)
|
70
|
+
|
71
|
+
def _generic_auth_unary_method_handler(
|
72
|
+
self, method_handler: grpc.RpcMethodHandler
|
73
|
+
) -> grpc.RpcMethodHandler:
|
74
|
+
def _generic_method_handler(
|
75
|
+
request: Request,
|
76
|
+
context: grpc.ServicerContext,
|
77
|
+
) -> Response:
|
78
|
+
call = method_handler.unary_unary or method_handler.unary_stream
|
79
|
+
metadata = context.invocation_metadata()
|
80
|
+
if isinstance(
|
81
|
+
request, (GetLoginDetailsRequest, GetAuthTokensRequest)
|
82
|
+
) or self.auth_plugin.validate_tokens_in_metadata(metadata):
|
83
|
+
return call(request, context) # type: ignore
|
84
|
+
|
85
|
+
tokens = self.auth_plugin.refresh_tokens(context.invocation_metadata())
|
86
|
+
if tokens is not None:
|
87
|
+
context.send_initial_metadata(tokens)
|
88
|
+
return call(request, context) # type: ignore
|
89
|
+
|
90
|
+
context.abort(grpc.StatusCode.UNAUTHENTICATED, "Access denied")
|
91
|
+
raise grpc.RpcError() # This line is unreachable
|
92
|
+
|
93
|
+
if method_handler.unary_unary:
|
94
|
+
message_handler = grpc.unary_unary_rpc_method_handler
|
95
|
+
else:
|
96
|
+
message_handler = grpc.unary_stream_rpc_method_handler
|
97
|
+
return message_handler(
|
98
|
+
_generic_method_handler,
|
99
|
+
request_deserializer=method_handler.request_deserializer,
|
100
|
+
response_serializer=method_handler.response_serializer,
|
101
|
+
)
|
@@ -0,0 +1,96 @@
|
|
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
|
+
"""Execute and monitor a Flower run."""
|
16
|
+
|
17
|
+
|
18
|
+
from abc import ABC, abstractmethod
|
19
|
+
from dataclasses import dataclass, field
|
20
|
+
from subprocess import Popen
|
21
|
+
from typing import Optional
|
22
|
+
|
23
|
+
from flwr.common import ConfigsRecord
|
24
|
+
from flwr.common.typing import UserConfig
|
25
|
+
from flwr.server.superlink.ffs.ffs_factory import FfsFactory
|
26
|
+
from flwr.server.superlink.linkstate import LinkStateFactory
|
27
|
+
|
28
|
+
|
29
|
+
@dataclass
|
30
|
+
class RunTracker:
|
31
|
+
"""Track a Flower run (composed of a run_id and the associated process)."""
|
32
|
+
|
33
|
+
run_id: int
|
34
|
+
proc: Popen # type: ignore
|
35
|
+
logs: list[str] = field(default_factory=list)
|
36
|
+
|
37
|
+
|
38
|
+
class Executor(ABC):
|
39
|
+
"""Execute and monitor a Flower run."""
|
40
|
+
|
41
|
+
@abstractmethod
|
42
|
+
def initialize(
|
43
|
+
self, linkstate_factory: LinkStateFactory, ffs_factory: FfsFactory
|
44
|
+
) -> None:
|
45
|
+
"""Initialize the executor with the necessary factories.
|
46
|
+
|
47
|
+
This method sets up the executor by providing it with the factories required
|
48
|
+
to access the LinkState and the Flower File Storage (FFS) in the SuperLink.
|
49
|
+
|
50
|
+
Parameters
|
51
|
+
----------
|
52
|
+
linkstate_factory : LinkStateFactory
|
53
|
+
The factory to create access to the LinkState.
|
54
|
+
ffs_factory : FfsFactory
|
55
|
+
The factory to create access to the Flower File Storage (FFS).
|
56
|
+
"""
|
57
|
+
|
58
|
+
@abstractmethod
|
59
|
+
def set_config(
|
60
|
+
self,
|
61
|
+
config: UserConfig,
|
62
|
+
) -> None:
|
63
|
+
"""Register provided config as class attributes.
|
64
|
+
|
65
|
+
Parameters
|
66
|
+
----------
|
67
|
+
config : UserConfig
|
68
|
+
A dictionary for configuration values.
|
69
|
+
"""
|
70
|
+
|
71
|
+
@abstractmethod
|
72
|
+
def start_run(
|
73
|
+
self,
|
74
|
+
fab_file: bytes,
|
75
|
+
override_config: UserConfig,
|
76
|
+
federation_options: ConfigsRecord,
|
77
|
+
) -> Optional[int]:
|
78
|
+
"""Start a run using the given Flower FAB ID and version.
|
79
|
+
|
80
|
+
This method creates a new run on the SuperLink, returns its run_id
|
81
|
+
and also starts the run execution.
|
82
|
+
|
83
|
+
Parameters
|
84
|
+
----------
|
85
|
+
fab_file : bytes
|
86
|
+
The Flower App Bundle file bytes.
|
87
|
+
override_config: UserConfig
|
88
|
+
The config overrides dict sent by the user (using `flwr run`).
|
89
|
+
federation_options: ConfigsRecord
|
90
|
+
The federation options sent by the user (using `flwr run`).
|
91
|
+
|
92
|
+
Returns
|
93
|
+
-------
|
94
|
+
run_id : Optional[int]
|
95
|
+
The run_id of the run created by the SuperLink, or `None` if it fails.
|
96
|
+
"""
|
@@ -0,0 +1,124 @@
|
|
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
|
+
"""Simulation engine executor."""
|
16
|
+
|
17
|
+
|
18
|
+
import hashlib
|
19
|
+
from logging import ERROR, INFO
|
20
|
+
from typing import Optional
|
21
|
+
|
22
|
+
from typing_extensions import override
|
23
|
+
|
24
|
+
from flwr.cli.config_utils import get_fab_metadata
|
25
|
+
from flwr.common import ConfigsRecord, Context, RecordSet
|
26
|
+
from flwr.common.logger import log
|
27
|
+
from flwr.common.typing import Fab, UserConfig
|
28
|
+
from flwr.server.superlink.ffs import Ffs
|
29
|
+
from flwr.server.superlink.ffs.ffs_factory import FfsFactory
|
30
|
+
from flwr.server.superlink.linkstate import LinkState, LinkStateFactory
|
31
|
+
|
32
|
+
from .executor import Executor
|
33
|
+
|
34
|
+
|
35
|
+
class SimulationEngine(Executor):
|
36
|
+
"""Simulation engine executor."""
|
37
|
+
|
38
|
+
def __init__(
|
39
|
+
self,
|
40
|
+
) -> None:
|
41
|
+
self.linkstate_factory: Optional[LinkStateFactory] = None
|
42
|
+
self.ffs_factory: Optional[FfsFactory] = None
|
43
|
+
|
44
|
+
@override
|
45
|
+
def initialize(
|
46
|
+
self, linkstate_factory: LinkStateFactory, ffs_factory: FfsFactory
|
47
|
+
) -> None:
|
48
|
+
"""Initialize the executor with the necessary factories."""
|
49
|
+
self.linkstate_factory = linkstate_factory
|
50
|
+
self.ffs_factory = ffs_factory
|
51
|
+
|
52
|
+
@property
|
53
|
+
def linkstate(self) -> LinkState:
|
54
|
+
"""Return the LinkState."""
|
55
|
+
if self.linkstate_factory is None:
|
56
|
+
raise RuntimeError("Executor is not initialized.")
|
57
|
+
return self.linkstate_factory.state()
|
58
|
+
|
59
|
+
@property
|
60
|
+
def ffs(self) -> Ffs:
|
61
|
+
"""Return the Flower File Storage (FFS)."""
|
62
|
+
if self.ffs_factory is None:
|
63
|
+
raise RuntimeError("Executor is not initialized.")
|
64
|
+
return self.ffs_factory.ffs()
|
65
|
+
|
66
|
+
@override
|
67
|
+
def set_config(
|
68
|
+
self,
|
69
|
+
config: UserConfig,
|
70
|
+
) -> None:
|
71
|
+
"""Set executor config arguments."""
|
72
|
+
|
73
|
+
# pylint: disable=too-many-locals
|
74
|
+
@override
|
75
|
+
def start_run(
|
76
|
+
self,
|
77
|
+
fab_file: bytes,
|
78
|
+
override_config: UserConfig,
|
79
|
+
federation_options: ConfigsRecord,
|
80
|
+
) -> Optional[int]:
|
81
|
+
"""Start run using the Flower Simulation Engine."""
|
82
|
+
try:
|
83
|
+
# Check that num-supernodes is set
|
84
|
+
if "num-supernodes" not in federation_options:
|
85
|
+
raise ValueError(
|
86
|
+
"Federation options doesn't contain key `num-supernodes`."
|
87
|
+
)
|
88
|
+
|
89
|
+
# Create run
|
90
|
+
fab = Fab(hashlib.sha256(fab_file).hexdigest(), fab_file)
|
91
|
+
fab_hash = self.ffs.put(fab.content, {})
|
92
|
+
if fab_hash != fab.hash_str:
|
93
|
+
raise RuntimeError(
|
94
|
+
f"FAB ({fab.hash_str}) hash from request doesn't match contents"
|
95
|
+
)
|
96
|
+
fab_id, fab_version = get_fab_metadata(fab.content)
|
97
|
+
|
98
|
+
run_id = self.linkstate.create_run(
|
99
|
+
fab_id, fab_version, fab_hash, override_config, federation_options
|
100
|
+
)
|
101
|
+
|
102
|
+
# Create an empty context for the Run
|
103
|
+
context = Context(
|
104
|
+
run_id=run_id,
|
105
|
+
node_id=0,
|
106
|
+
node_config={},
|
107
|
+
state=RecordSet(),
|
108
|
+
run_config={},
|
109
|
+
)
|
110
|
+
|
111
|
+
# Register the context at the LinkState
|
112
|
+
self.linkstate.set_serverapp_context(run_id=run_id, context=context)
|
113
|
+
|
114
|
+
log(INFO, "Created run %s", str(run_id))
|
115
|
+
|
116
|
+
return run_id
|
117
|
+
|
118
|
+
# pylint: disable-next=broad-except
|
119
|
+
except Exception as e:
|
120
|
+
log(ERROR, "Could not start run: %s", str(e))
|
121
|
+
return None
|
122
|
+
|
123
|
+
|
124
|
+
executor = SimulationEngine()
|
{flwr_nightly-1.8.0.dev20240315.dist-info → flwr_nightly-1.15.0.dev20250115.dist-info}/METADATA
RENAMED
@@ -1,13 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: flwr-nightly
|
3
|
-
Version: 1.
|
4
|
-
Summary: Flower: A Friendly Federated
|
3
|
+
Version: 1.15.0.dev20250115
|
4
|
+
Summary: Flower: A Friendly Federated AI Framework
|
5
5
|
Home-page: https://flower.ai
|
6
6
|
License: Apache-2.0
|
7
|
-
Keywords:
|
7
|
+
Keywords: Artificial Intelligence,Federated AI,Federated Analytics,Federated Evaluation,Federated Learning,Flower,Machine Learning
|
8
8
|
Author: The Flower Authors
|
9
9
|
Author-email: hello@flower.ai
|
10
|
-
Requires-Python: >=3.
|
10
|
+
Requires-Python: >=3.9,<4.0
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
12
12
|
Classifier: Intended Audience :: Developers
|
13
13
|
Classifier: Intended Audience :: Science/Research
|
@@ -16,12 +16,12 @@ Classifier: Operating System :: MacOS :: MacOS X
|
|
16
16
|
Classifier: Operating System :: POSIX :: Linux
|
17
17
|
Classifier: Programming Language :: Python
|
18
18
|
Classifier: Programming Language :: Python :: 3
|
19
|
-
Classifier: Programming Language :: Python :: 3.8
|
20
19
|
Classifier: Programming Language :: Python :: 3.9
|
21
20
|
Classifier: Programming Language :: Python :: 3.10
|
22
21
|
Classifier: Programming Language :: Python :: 3.11
|
23
22
|
Classifier: Programming Language :: Python :: 3.12
|
24
23
|
Classifier: Programming Language :: Python :: 3 :: Only
|
24
|
+
Classifier: Programming Language :: Python :: 3.13
|
25
25
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
26
26
|
Classifier: Topic :: Scientific/Engineering
|
27
27
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
@@ -33,23 +33,26 @@ Classifier: Typing :: Typed
|
|
33
33
|
Provides-Extra: rest
|
34
34
|
Provides-Extra: simulation
|
35
35
|
Requires-Dist: cryptography (>=42.0.4,<43.0.0)
|
36
|
-
Requires-Dist: grpcio (>=1.60.0,<2.0.0)
|
36
|
+
Requires-Dist: grpcio (>=1.60.0,<2.0.0,!=1.64.2,<=1.64.3)
|
37
37
|
Requires-Dist: iterators (>=0.0.2,<0.0.3)
|
38
|
-
Requires-Dist: numpy (>=1.
|
38
|
+
Requires-Dist: numpy (>=1.26.0,<3.0.0)
|
39
|
+
Requires-Dist: pathspec (>=0.12.1,<0.13.0)
|
39
40
|
Requires-Dist: protobuf (>=4.25.2,<5.0.0)
|
40
41
|
Requires-Dist: pycryptodome (>=3.18.0,<4.0.0)
|
41
|
-
Requires-Dist:
|
42
|
-
Requires-Dist: ray (==2.
|
43
|
-
Requires-Dist: requests (>=2.31.0,<3.0.0)
|
44
|
-
Requires-Dist:
|
42
|
+
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
|
43
|
+
Requires-Dist: ray (==2.10.0) ; (python_version >= "3.9" and python_version < "3.12") and (extra == "simulation")
|
44
|
+
Requires-Dist: requests (>=2.31.0,<3.0.0)
|
45
|
+
Requires-Dist: rich (>=13.5.0,<14.0.0)
|
46
|
+
Requires-Dist: starlette (>=0.45.2,<0.46.0) ; extra == "rest"
|
45
47
|
Requires-Dist: tomli (>=2.0.1,<3.0.0)
|
46
|
-
Requires-Dist:
|
47
|
-
Requires-Dist:
|
48
|
+
Requires-Dist: tomli-w (>=1.0.0,<2.0.0)
|
49
|
+
Requires-Dist: typer (>=0.12.5,<0.13.0)
|
50
|
+
Requires-Dist: uvicorn[standard] (>=0.34.0,<0.35.0) ; extra == "rest"
|
48
51
|
Project-URL: Documentation, https://flower.ai
|
49
52
|
Project-URL: Repository, https://github.com/adap/flower
|
50
53
|
Description-Content-Type: text/markdown
|
51
54
|
|
52
|
-
# Flower: A Friendly Federated
|
55
|
+
# Flower: A Friendly Federated AI Framework
|
53
56
|
|
54
57
|
<p align="center">
|
55
58
|
<a href="https://flower.ai/">
|
@@ -69,9 +72,10 @@ Description-Content-Type: text/markdown
|
|
69
72
|
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/adap/flower/blob/main/CONTRIBUTING.md)
|
70
73
|
![Build](https://github.com/adap/flower/actions/workflows/framework.yml/badge.svg)
|
71
74
|
[![Downloads](https://static.pepy.tech/badge/flwr)](https://pepy.tech/project/flwr)
|
75
|
+
[![Docker Hub](https://img.shields.io/badge/Docker%20Hub-flwr-blue)](https://hub.docker.com/u/flwr)
|
72
76
|
[![Slack](https://img.shields.io/badge/Chat-Slack-red)](https://flower.ai/join-slack)
|
73
77
|
|
74
|
-
Flower (`flwr`) is a framework for building federated
|
78
|
+
Flower (`flwr`) is a framework for building federated AI systems. The
|
75
79
|
design of Flower is based on a few guiding principles:
|
76
80
|
|
77
81
|
- **Customizable**: Federated learning systems vary wildly from one use case to
|
@@ -84,7 +88,7 @@ design of Flower is based on a few guiding principles:
|
|
84
88
|
|
85
89
|
- **Framework-agnostic**: Different machine learning frameworks have different
|
86
90
|
strengths. Flower can be used with any machine learning framework, for
|
87
|
-
example, [PyTorch](https://pytorch.org), [TensorFlow](https://tensorflow.org), [Hugging Face Transformers](https://huggingface.co/), [PyTorch Lightning](https://pytorchlightning.ai/), [scikit-learn](https://scikit-learn.org/), [JAX](https://jax.readthedocs.io/), [TFLite](https://tensorflow.org/lite/), [MONAI](https://docs.monai.io/en/latest/index.html), [fastai](https://www.fast.ai/), [MLX](https://ml-explore.github.io/mlx/build/html/index.html), [XGBoost](https://xgboost.readthedocs.io/en/stable/), [Pandas](https://pandas.pydata.org/) for federated analytics, or even raw [NumPy](https://numpy.org/)
|
91
|
+
example, [PyTorch](https://pytorch.org), [TensorFlow](https://tensorflow.org), [Hugging Face Transformers](https://huggingface.co/), [PyTorch Lightning](https://pytorchlightning.ai/), [scikit-learn](https://scikit-learn.org/), [JAX](https://jax.readthedocs.io/), [TFLite](https://tensorflow.org/lite/), [MONAI](https://docs.monai.io/en/latest/index.html), [fastai](https://www.fast.ai/), [MLX](https://ml-explore.github.io/mlx/build/html/index.html), [XGBoost](https://xgboost.readthedocs.io/en/stable/), [LeRobot](https://github.com/huggingface/lerobot) for federated robots, [Pandas](https://pandas.pydata.org/) for federated analytics, or even raw [NumPy](https://numpy.org/)
|
88
92
|
for users who enjoy computing gradients by hand.
|
89
93
|
|
90
94
|
- **Understandable**: Flower is written with maintainability in mind. The
|
@@ -98,23 +102,23 @@ Flower's goal is to make federated learning accessible to everyone. This series
|
|
98
102
|
|
99
103
|
0. **What is Federated Learning?**
|
100
104
|
|
101
|
-
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/
|
105
|
+
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-what-is-federated-learning.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-what-is-federated-learning.ipynb))
|
102
106
|
|
103
107
|
1. **An Introduction to Federated Learning**
|
104
108
|
|
105
|
-
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/
|
109
|
+
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-get-started-with-flower-pytorch.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-get-started-with-flower-pytorch.ipynb))
|
106
110
|
|
107
111
|
2. **Using Strategies in Federated Learning**
|
108
112
|
|
109
|
-
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/
|
113
|
+
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-use-a-federated-learning-strategy-pytorch.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-use-a-federated-learning-strategy-pytorch.ipynb))
|
110
114
|
|
111
115
|
3. **Building Strategies for Federated Learning**
|
112
116
|
|
113
|
-
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/
|
117
|
+
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-build-a-strategy-from-scratch-pytorch.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-build-a-strategy-from-scratch-pytorch.ipynb))
|
114
118
|
|
115
119
|
4. **Custom Clients for Federated Learning**
|
116
120
|
|
117
|
-
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/
|
121
|
+
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/adap/flower/blob/main/framework/docs/source/tutorial-series-customize-the-client-pytorch.ipynb) (or open the [Jupyter Notebook](https://github.com/adap/flower/blob/main/framework/docs/source/tutorial-series-customize-the-client-pytorch.ipynb))
|
118
122
|
|
119
123
|
Stay tuned, more tutorials are coming soon. Topics include **Privacy and Security in Federated Learning**, and **Scaling Federated Learning**.
|
120
124
|
|
@@ -152,6 +156,7 @@ Flower Baselines is a collection of community-contributed projects that reproduc
|
|
152
156
|
- [FedNova](https://github.com/adap/flower/tree/main/baselines/fednova)
|
153
157
|
- [HeteroFL](https://github.com/adap/flower/tree/main/baselines/heterofl)
|
154
158
|
- [FedAvgM](https://github.com/adap/flower/tree/main/baselines/fedavgm)
|
159
|
+
- [FedRep](https://github.com/adap/flower/tree/main/baselines/fedrep)
|
155
160
|
- [FedStar](https://github.com/adap/flower/tree/main/baselines/fedstar)
|
156
161
|
- [FedWav2vec2](https://github.com/adap/flower/tree/main/baselines/fedwav2vec2)
|
157
162
|
- [FjORD](https://github.com/adap/flower/tree/main/baselines/fjord)
|
@@ -194,21 +199,23 @@ Other [examples](https://github.com/adap/flower/tree/main/examples):
|
|
194
199
|
- [PyTorch: From Centralized to Federated](https://github.com/adap/flower/tree/main/examples/pytorch-from-centralized-to-federated)
|
195
200
|
- [Vertical FL](https://github.com/adap/flower/tree/main/examples/vertical-fl)
|
196
201
|
- [Federated Finetuning of OpenAI's Whisper](https://github.com/adap/flower/tree/main/examples/whisper-federated-finetuning)
|
197
|
-
- [Federated Finetuning of Large Language Model](https://github.com/adap/flower/tree/main/examples/
|
198
|
-
- [Federated Finetuning of a Vision Transformer](https://github.com/adap/flower/tree/main/examples/vit
|
202
|
+
- [Federated Finetuning of Large Language Model](https://github.com/adap/flower/tree/main/examples/flowertune-llm)
|
203
|
+
- [Federated Finetuning of a Vision Transformer](https://github.com/adap/flower/tree/main/examples/flowertune-vit)
|
199
204
|
- [Advanced Flower with TensorFlow/Keras](https://github.com/adap/flower/tree/main/examples/advanced-tensorflow)
|
200
205
|
- [Advanced Flower with PyTorch](https://github.com/adap/flower/tree/main/examples/advanced-pytorch)
|
201
|
-
- Single-Machine Simulation of Federated Learning Systems ([PyTorch](https://github.com/adap/flower/tree/main/examples/simulation-pytorch)) ([Tensorflow](https://github.com/adap/flower/tree/main/examples/simulation-tensorflow))
|
202
206
|
- [Comprehensive Flower+XGBoost](https://github.com/adap/flower/tree/main/examples/xgboost-comprehensive)
|
203
207
|
- [Flower through Docker Compose and with Grafana dashboard](https://github.com/adap/flower/tree/main/examples/flower-via-docker-compose)
|
204
|
-
- [Flower with KaplanMeierFitter from the lifelines library](https://github.com/adap/flower/tree/main/examples/federated-
|
208
|
+
- [Flower with KaplanMeierFitter from the lifelines library](https://github.com/adap/flower/tree/main/examples/federated-kaplan-meier-fitter)
|
209
|
+
- [Sample Level Privacy with Opacus](https://github.com/adap/flower/tree/main/examples/opacus)
|
210
|
+
- [Sample Level Privacy with TensorFlow-Privacy](https://github.com/adap/flower/tree/main/examples/tensorflow-privacy)
|
211
|
+
- [Flower with a Tabular Dataset](https://github.com/adap/flower/tree/main/examples/fl-tabular)
|
205
212
|
|
206
213
|
## Community
|
207
214
|
|
208
215
|
Flower is built by a wonderful community of researchers and engineers. [Join Slack](https://flower.ai/join-slack) to meet them, [contributions](#contributing-to-flower) are welcome.
|
209
216
|
|
210
217
|
<a href="https://github.com/adap/flower/graphs/contributors">
|
211
|
-
<img src="https://contrib.rocks/image?repo=adap/flower" />
|
218
|
+
<img src="https://contrib.rocks/image?repo=adap/flower&columns=10" />
|
212
219
|
</a>
|
213
220
|
|
214
221
|
## Citation
|