flwr-nightly 1.8.0.dev20240314__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.dev20240314.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.dev20240314.dist-info/RECORD +0 -211
- flwr_nightly-1.8.0.dev20240314.dist-info/entry_points.txt +0 -9
- {flwr_nightly-1.8.0.dev20240314.dist-info → flwr_nightly-1.15.0.dev20250114.dist-info}/LICENSE +0 -0
- {flwr_nightly-1.8.0.dev20240314.dist-info → flwr_nightly-1.15.0.dev20250114.dist-info}/WHEEL +0 -0
@@ -0,0 +1,138 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["hatchling"]
|
3
|
+
build-backend = "hatchling.build"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "$package_name"
|
7
|
+
version = "1.0.0"
|
8
|
+
description = ""
|
9
|
+
license = "Apache-2.0"
|
10
|
+
dependencies = [
|
11
|
+
"flwr[simulation]>=1.14.0",
|
12
|
+
"flwr-datasets[vision]>=0.3.0",
|
13
|
+
"torch==2.2.1",
|
14
|
+
"torchvision==0.17.1",
|
15
|
+
]
|
16
|
+
|
17
|
+
[tool.hatch.metadata]
|
18
|
+
allow-direct-references = true
|
19
|
+
|
20
|
+
[project.optional-dependencies]
|
21
|
+
dev = [
|
22
|
+
"isort==5.13.2",
|
23
|
+
"black==24.2.0",
|
24
|
+
"docformatter==1.7.5",
|
25
|
+
"mypy==1.8.0",
|
26
|
+
"pylint==3.2.6",
|
27
|
+
"flake8==5.0.4",
|
28
|
+
"pytest==6.2.4",
|
29
|
+
"pytest-watch==4.2.0",
|
30
|
+
"ruff==0.1.9",
|
31
|
+
"types-requests==2.31.0.20240125",
|
32
|
+
]
|
33
|
+
|
34
|
+
[tool.isort]
|
35
|
+
profile = "black"
|
36
|
+
known_first_party = ["flwr"]
|
37
|
+
|
38
|
+
[tool.black]
|
39
|
+
line-length = 88
|
40
|
+
target-version = ["py38", "py39", "py310", "py311"]
|
41
|
+
|
42
|
+
[tool.pytest.ini_options]
|
43
|
+
minversion = "6.2"
|
44
|
+
addopts = "-qq"
|
45
|
+
testpaths = [
|
46
|
+
"flwr_baselines",
|
47
|
+
]
|
48
|
+
|
49
|
+
[tool.mypy]
|
50
|
+
ignore_missing_imports = true
|
51
|
+
strict = false
|
52
|
+
plugins = "numpy.typing.mypy_plugin"
|
53
|
+
|
54
|
+
[tool.pylint."MESSAGES CONTROL"]
|
55
|
+
disable = "duplicate-code,too-few-public-methods,useless-import-alias"
|
56
|
+
good-names = "i,j,k,_,x,y,X,Y,K,N"
|
57
|
+
max-args = 10
|
58
|
+
max-attributes = 15
|
59
|
+
max-locals = 36
|
60
|
+
max-branches = 20
|
61
|
+
max-statements = 55
|
62
|
+
|
63
|
+
[tool.pylint.typecheck]
|
64
|
+
generated-members = "numpy.*, torch.*, tensorflow.*"
|
65
|
+
|
66
|
+
[[tool.mypy.overrides]]
|
67
|
+
module = [
|
68
|
+
"importlib.metadata.*",
|
69
|
+
"importlib_metadata.*",
|
70
|
+
]
|
71
|
+
follow_imports = "skip"
|
72
|
+
follow_imports_for_stubs = true
|
73
|
+
disallow_untyped_calls = false
|
74
|
+
|
75
|
+
[[tool.mypy.overrides]]
|
76
|
+
module = "torch.*"
|
77
|
+
follow_imports = "skip"
|
78
|
+
follow_imports_for_stubs = true
|
79
|
+
|
80
|
+
[tool.docformatter]
|
81
|
+
wrap-summaries = 88
|
82
|
+
wrap-descriptions = 88
|
83
|
+
|
84
|
+
[tool.ruff]
|
85
|
+
target-version = "py38"
|
86
|
+
line-length = 88
|
87
|
+
select = ["D", "E", "F", "W", "B", "ISC", "C4"]
|
88
|
+
fixable = ["D", "E", "F", "W", "B", "ISC", "C4"]
|
89
|
+
ignore = ["B024", "B027"]
|
90
|
+
exclude = [
|
91
|
+
".bzr",
|
92
|
+
".direnv",
|
93
|
+
".eggs",
|
94
|
+
".git",
|
95
|
+
".hg",
|
96
|
+
".mypy_cache",
|
97
|
+
".nox",
|
98
|
+
".pants.d",
|
99
|
+
".pytype",
|
100
|
+
".ruff_cache",
|
101
|
+
".svn",
|
102
|
+
".tox",
|
103
|
+
".venv",
|
104
|
+
"__pypackages__",
|
105
|
+
"_build",
|
106
|
+
"buck-out",
|
107
|
+
"build",
|
108
|
+
"dist",
|
109
|
+
"node_modules",
|
110
|
+
"venv",
|
111
|
+
"proto",
|
112
|
+
]
|
113
|
+
|
114
|
+
[tool.ruff.pydocstyle]
|
115
|
+
convention = "numpy"
|
116
|
+
|
117
|
+
[tool.hatch.build.targets.wheel]
|
118
|
+
packages = ["."]
|
119
|
+
|
120
|
+
[tool.flwr.app]
|
121
|
+
publisher = "$username"
|
122
|
+
|
123
|
+
[tool.flwr.app.components]
|
124
|
+
serverapp = "$import_name.server_app:app"
|
125
|
+
clientapp = "$import_name.client_app:app"
|
126
|
+
|
127
|
+
[tool.flwr.app.config]
|
128
|
+
num-server-rounds = 3
|
129
|
+
fraction-fit = 0.5
|
130
|
+
local-epochs = 1
|
131
|
+
|
132
|
+
[tool.flwr.federations]
|
133
|
+
default = "local-simulation"
|
134
|
+
|
135
|
+
[tool.flwr.federations.local-simulation]
|
136
|
+
options.num-supernodes = 10
|
137
|
+
options.backend.client-resources.num-cpus = 2
|
138
|
+
options.backend.client-resources.num-gpus = 0.0
|
@@ -0,0 +1,68 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["hatchling"]
|
3
|
+
build-backend = "hatchling.build"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "$package_name"
|
7
|
+
version = "1.0.0"
|
8
|
+
description = ""
|
9
|
+
license = "Apache-2.0"
|
10
|
+
dependencies = [
|
11
|
+
"flwr[simulation]>=1.14.0",
|
12
|
+
"flwr-datasets>=0.3.0",
|
13
|
+
"torch==2.3.1",
|
14
|
+
"trl==0.8.1",
|
15
|
+
"bitsandbytes==0.45.0",
|
16
|
+
"scipy==1.13.0",
|
17
|
+
"peft==0.6.2",
|
18
|
+
"transformers==4.47.0",
|
19
|
+
"sentencepiece==0.2.0",
|
20
|
+
"omegaconf==2.3.0",
|
21
|
+
"hf_transfer==0.1.8",
|
22
|
+
]
|
23
|
+
|
24
|
+
[tool.hatch.build.targets.wheel]
|
25
|
+
packages = ["."]
|
26
|
+
|
27
|
+
[tool.flwr.app]
|
28
|
+
publisher = "$username"
|
29
|
+
|
30
|
+
[tool.flwr.app.components]
|
31
|
+
serverapp = "$import_name.server_app:app"
|
32
|
+
clientapp = "$import_name.client_app:app"
|
33
|
+
|
34
|
+
[tool.flwr.app.config]
|
35
|
+
model.name = "mistralai/Mistral-7B-v0.3"
|
36
|
+
model.quantization = 4
|
37
|
+
model.gradient-checkpointing = true
|
38
|
+
model.lora.peft-lora-r = 32
|
39
|
+
model.lora.peft-lora-alpha = 64
|
40
|
+
train.save-every-round = 5
|
41
|
+
train.learning-rate-max = 5e-5
|
42
|
+
train.learning-rate-min = 1e-6
|
43
|
+
train.seq-length = 512
|
44
|
+
train.training-arguments.output-dir = ""
|
45
|
+
train.training-arguments.learning-rate = ""
|
46
|
+
train.training-arguments.per-device-train-batch-size = 16
|
47
|
+
train.training-arguments.gradient-accumulation-steps = 1
|
48
|
+
train.training-arguments.logging-steps = 10
|
49
|
+
train.training-arguments.num-train-epochs = 3
|
50
|
+
train.training-arguments.max-steps = 10
|
51
|
+
train.training-arguments.save-steps = 1000
|
52
|
+
train.training-arguments.save-total-limit = 10
|
53
|
+
train.training-arguments.gradient-checkpointing = true
|
54
|
+
train.training-arguments.lr-scheduler-type = "constant"
|
55
|
+
strategy.fraction-fit = $fraction_fit
|
56
|
+
strategy.fraction-evaluate = 0.0
|
57
|
+
num-server-rounds = 200
|
58
|
+
|
59
|
+
[tool.flwr.app.config.static]
|
60
|
+
dataset.name = "$dataset_name"
|
61
|
+
|
62
|
+
[tool.flwr.federations]
|
63
|
+
default = "local-simulation"
|
64
|
+
|
65
|
+
[tool.flwr.federations.local-simulation]
|
66
|
+
options.num-supernodes = $num_clients
|
67
|
+
options.backend.client-resources.num-cpus = 6
|
68
|
+
options.backend.client-resources.num-gpus = 1.0
|
@@ -0,0 +1,46 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["hatchling"]
|
3
|
+
build-backend = "hatchling.build"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "$package_name"
|
7
|
+
version = "1.0.0"
|
8
|
+
description = ""
|
9
|
+
license = "Apache-2.0"
|
10
|
+
dependencies = [
|
11
|
+
"flwr[simulation]>=1.14.0",
|
12
|
+
"flwr-datasets>=0.3.0",
|
13
|
+
"torch==2.2.1",
|
14
|
+
"transformers>=4.30.0,<5.0",
|
15
|
+
"evaluate>=0.4.0,<1.0",
|
16
|
+
"datasets>=2.0.0, <3.0",
|
17
|
+
"scikit-learn>=1.3.1, <2.0",
|
18
|
+
]
|
19
|
+
|
20
|
+
[tool.hatch.build.targets.wheel]
|
21
|
+
packages = ["."]
|
22
|
+
|
23
|
+
[tool.flwr.app]
|
24
|
+
publisher = "$username"
|
25
|
+
|
26
|
+
[tool.flwr.app.components]
|
27
|
+
serverapp = "$import_name.server_app:app"
|
28
|
+
clientapp = "$import_name.client_app:app"
|
29
|
+
|
30
|
+
[tool.flwr.app.config]
|
31
|
+
num-server-rounds = 3
|
32
|
+
fraction-fit = 0.5
|
33
|
+
local-epochs = 1
|
34
|
+
model-name = "prajjwal1/bert-tiny" # Set a larger model if you have access to more GPU resources
|
35
|
+
num-labels = 2
|
36
|
+
|
37
|
+
[tool.flwr.federations]
|
38
|
+
default = "localhost"
|
39
|
+
|
40
|
+
[tool.flwr.federations.localhost]
|
41
|
+
options.num-supernodes = 10
|
42
|
+
|
43
|
+
[tool.flwr.federations.localhost-gpu]
|
44
|
+
options.num-supernodes = 10
|
45
|
+
options.backend.client-resources.num-cpus = 4 # each ClientApp assumes to use 4CPUs
|
46
|
+
options.backend.client-resources.num-gpus = 0.25 # at most 4 ClientApps will run in a given GPU
|
@@ -0,0 +1,35 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["hatchling"]
|
3
|
+
build-backend = "hatchling.build"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "$package_name"
|
7
|
+
version = "1.0.0"
|
8
|
+
description = ""
|
9
|
+
license = "Apache-2.0"
|
10
|
+
dependencies = [
|
11
|
+
"flwr[simulation]>=1.14.0",
|
12
|
+
"jax==0.4.30",
|
13
|
+
"jaxlib==0.4.30",
|
14
|
+
"scikit-learn==1.3.2",
|
15
|
+
]
|
16
|
+
|
17
|
+
[tool.hatch.build.targets.wheel]
|
18
|
+
packages = ["."]
|
19
|
+
|
20
|
+
[tool.flwr.app]
|
21
|
+
publisher = "$username"
|
22
|
+
|
23
|
+
[tool.flwr.app.components]
|
24
|
+
serverapp = "$import_name.server_app:app"
|
25
|
+
clientapp = "$import_name.client_app:app"
|
26
|
+
|
27
|
+
[tool.flwr.app.config]
|
28
|
+
num-server-rounds = 3
|
29
|
+
input-dim = 3
|
30
|
+
|
31
|
+
[tool.flwr.federations]
|
32
|
+
default = "local-simulation"
|
33
|
+
|
34
|
+
[tool.flwr.federations.local-simulation]
|
35
|
+
options.num-supernodes = 10
|
@@ -0,0 +1,39 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["hatchling"]
|
3
|
+
build-backend = "hatchling.build"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "$package_name"
|
7
|
+
version = "1.0.0"
|
8
|
+
description = ""
|
9
|
+
license = "Apache-2.0"
|
10
|
+
dependencies = [
|
11
|
+
"flwr[simulation]>=1.14.0",
|
12
|
+
"flwr-datasets[vision]>=0.3.0",
|
13
|
+
"mlx==0.21.1",
|
14
|
+
]
|
15
|
+
|
16
|
+
[tool.hatch.build.targets.wheel]
|
17
|
+
packages = ["."]
|
18
|
+
|
19
|
+
[tool.flwr.app]
|
20
|
+
publisher = "$username"
|
21
|
+
|
22
|
+
[tool.flwr.app.components]
|
23
|
+
serverapp = "$import_name.server_app:app"
|
24
|
+
clientapp = "$import_name.client_app:app"
|
25
|
+
|
26
|
+
[tool.flwr.app.config]
|
27
|
+
num-server-rounds = 3
|
28
|
+
local-epochs = 1
|
29
|
+
num-layers = 2
|
30
|
+
input-dim = 784 # 28*28
|
31
|
+
hidden-dim = 32
|
32
|
+
batch-size = 256
|
33
|
+
lr = 0.1
|
34
|
+
|
35
|
+
[tool.flwr.federations]
|
36
|
+
default = "local-simulation"
|
37
|
+
|
38
|
+
[tool.flwr.federations.local-simulation]
|
39
|
+
options.num-supernodes = 10
|
@@ -1,19 +1,32 @@
|
|
1
1
|
[build-system]
|
2
|
-
requires = ["
|
3
|
-
build-backend = "
|
2
|
+
requires = ["hatchling"]
|
3
|
+
build-backend = "hatchling.build"
|
4
4
|
|
5
|
-
[
|
6
|
-
name = "$
|
5
|
+
[project]
|
6
|
+
name = "$package_name"
|
7
7
|
version = "1.0.0"
|
8
8
|
description = ""
|
9
9
|
license = "Apache-2.0"
|
10
|
-
|
11
|
-
"
|
10
|
+
dependencies = [
|
11
|
+
"flwr[simulation]>=1.14.0",
|
12
|
+
"numpy>=1.21.0",
|
12
13
|
]
|
13
|
-
readme = "README.md"
|
14
14
|
|
15
|
-
[tool.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
[tool.hatch.build.targets.wheel]
|
16
|
+
packages = ["."]
|
17
|
+
|
18
|
+
[tool.flwr.app]
|
19
|
+
publisher = "$username"
|
20
|
+
|
21
|
+
[tool.flwr.app.components]
|
22
|
+
serverapp = "$import_name.server_app:app"
|
23
|
+
clientapp = "$import_name.client_app:app"
|
24
|
+
|
25
|
+
[tool.flwr.app.config]
|
26
|
+
num-server-rounds = 3
|
27
|
+
|
28
|
+
[tool.flwr.federations]
|
29
|
+
default = "local-simulation"
|
30
|
+
|
31
|
+
[tool.flwr.federations.local-simulation]
|
32
|
+
options.num-supernodes = 10
|
@@ -1,21 +1,36 @@
|
|
1
1
|
[build-system]
|
2
|
-
requires = ["
|
3
|
-
build-backend = "
|
2
|
+
requires = ["hatchling"]
|
3
|
+
build-backend = "hatchling.build"
|
4
4
|
|
5
|
-
[
|
6
|
-
name = "$
|
5
|
+
[project]
|
6
|
+
name = "$package_name"
|
7
7
|
version = "1.0.0"
|
8
8
|
description = ""
|
9
9
|
license = "Apache-2.0"
|
10
|
-
|
11
|
-
"
|
10
|
+
dependencies = [
|
11
|
+
"flwr[simulation]>=1.14.0",
|
12
|
+
"flwr-datasets[vision]>=0.3.0",
|
13
|
+
"torch==2.5.1",
|
14
|
+
"torchvision==0.20.1",
|
12
15
|
]
|
13
|
-
readme = "README.md"
|
14
16
|
|
15
|
-
[tool.
|
16
|
-
|
17
|
-
|
18
|
-
flwr
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
[tool.hatch.build.targets.wheel]
|
18
|
+
packages = ["."]
|
19
|
+
|
20
|
+
[tool.flwr.app]
|
21
|
+
publisher = "$username"
|
22
|
+
|
23
|
+
[tool.flwr.app.components]
|
24
|
+
serverapp = "$import_name.server_app:app"
|
25
|
+
clientapp = "$import_name.client_app:app"
|
26
|
+
|
27
|
+
[tool.flwr.app.config]
|
28
|
+
num-server-rounds = 3
|
29
|
+
fraction-fit = 0.5
|
30
|
+
local-epochs = 1
|
31
|
+
|
32
|
+
[tool.flwr.federations]
|
33
|
+
default = "local-simulation"
|
34
|
+
|
35
|
+
[tool.flwr.federations.local-simulation]
|
36
|
+
options.num-supernodes = 10
|
@@ -0,0 +1,35 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["hatchling"]
|
3
|
+
build-backend = "hatchling.build"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "$package_name"
|
7
|
+
version = "1.0.0"
|
8
|
+
description = ""
|
9
|
+
license = "Apache-2.0"
|
10
|
+
dependencies = [
|
11
|
+
"flwr[simulation]>=1.14.0",
|
12
|
+
"flwr-datasets[vision]>=0.3.0",
|
13
|
+
"scikit-learn>=1.1.1",
|
14
|
+
]
|
15
|
+
|
16
|
+
[tool.hatch.build.targets.wheel]
|
17
|
+
packages = ["."]
|
18
|
+
|
19
|
+
[tool.flwr.app]
|
20
|
+
publisher = "$username"
|
21
|
+
|
22
|
+
[tool.flwr.app.components]
|
23
|
+
serverapp = "$import_name.server_app:app"
|
24
|
+
clientapp = "$import_name.client_app:app"
|
25
|
+
|
26
|
+
[tool.flwr.app.config]
|
27
|
+
num-server-rounds = 3
|
28
|
+
penalty = "l2"
|
29
|
+
local-epochs = 1
|
30
|
+
|
31
|
+
[tool.flwr.federations]
|
32
|
+
default = "local-simulation"
|
33
|
+
|
34
|
+
[tool.flwr.federations.local-simulation]
|
35
|
+
options.num-supernodes = 10
|
@@ -1,21 +1,36 @@
|
|
1
1
|
[build-system]
|
2
|
-
requires = ["
|
3
|
-
build-backend = "
|
2
|
+
requires = ["hatchling"]
|
3
|
+
build-backend = "hatchling.build"
|
4
4
|
|
5
|
-
[
|
6
|
-
name = "$
|
5
|
+
[project]
|
6
|
+
name = "$package_name"
|
7
7
|
version = "1.0.0"
|
8
8
|
description = ""
|
9
9
|
license = "Apache-2.0"
|
10
|
-
|
11
|
-
"
|
10
|
+
dependencies = [
|
11
|
+
"flwr[simulation]>=1.14.0",
|
12
|
+
"flwr-datasets[vision]>=0.3.0",
|
13
|
+
"tensorflow>=2.11.1,<2.18.0",
|
12
14
|
]
|
13
|
-
readme = "README.md"
|
14
15
|
|
15
|
-
[tool.
|
16
|
-
|
17
|
-
|
18
|
-
flwr
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
[tool.hatch.build.targets.wheel]
|
17
|
+
packages = ["."]
|
18
|
+
|
19
|
+
[tool.flwr.app]
|
20
|
+
publisher = "$username"
|
21
|
+
|
22
|
+
[tool.flwr.app.components]
|
23
|
+
serverapp = "$import_name.server_app:app"
|
24
|
+
clientapp = "$import_name.client_app:app"
|
25
|
+
|
26
|
+
[tool.flwr.app.config]
|
27
|
+
num-server-rounds = 3
|
28
|
+
local-epochs = 1
|
29
|
+
batch-size = 32
|
30
|
+
verbose = false
|
31
|
+
|
32
|
+
[tool.flwr.federations]
|
33
|
+
default = "local-simulation"
|
34
|
+
|
35
|
+
[tool.flwr.federations.local-simulation]
|
36
|
+
options.num-supernodes = 10
|