flwr-nightly 1.10.0.dev20240707__py3-none-any.whl → 1.10.0.dev20240722__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of flwr-nightly might be problematic. Click here for more details.

Files changed (92) hide show
  1. flwr/cli/build.py +16 -2
  2. flwr/cli/config_utils.py +36 -14
  3. flwr/cli/install.py +17 -1
  4. flwr/cli/new/new.py +31 -20
  5. flwr/cli/new/templates/app/code/client.hf.py.tpl +11 -3
  6. flwr/cli/new/templates/app/code/client.jax.py.tpl +2 -1
  7. flwr/cli/new/templates/app/code/client.mlx.py.tpl +15 -10
  8. flwr/cli/new/templates/app/code/client.numpy.py.tpl +2 -1
  9. flwr/cli/new/templates/app/code/client.pytorch.py.tpl +12 -3
  10. flwr/cli/new/templates/app/code/client.sklearn.py.tpl +6 -3
  11. flwr/cli/new/templates/app/code/client.tensorflow.py.tpl +13 -3
  12. flwr/cli/new/templates/app/code/flwr_tune/app.py.tpl +2 -2
  13. flwr/cli/new/templates/app/code/flwr_tune/server.py.tpl +1 -1
  14. flwr/cli/new/templates/app/code/server.hf.py.tpl +16 -11
  15. flwr/cli/new/templates/app/code/server.jax.py.tpl +15 -8
  16. flwr/cli/new/templates/app/code/server.mlx.py.tpl +11 -7
  17. flwr/cli/new/templates/app/code/server.numpy.py.tpl +15 -8
  18. flwr/cli/new/templates/app/code/server.pytorch.py.tpl +15 -13
  19. flwr/cli/new/templates/app/code/server.sklearn.py.tpl +16 -10
  20. flwr/cli/new/templates/app/code/server.tensorflow.py.tpl +16 -13
  21. flwr/cli/new/templates/app/code/task.hf.py.tpl +2 -2
  22. flwr/cli/new/templates/app/code/task.mlx.py.tpl +2 -2
  23. flwr/cli/new/templates/app/code/task.pytorch.py.tpl +1 -1
  24. flwr/cli/new/templates/app/pyproject.flowertune.toml.tpl +9 -12
  25. flwr/cli/new/templates/app/pyproject.hf.toml.tpl +17 -16
  26. flwr/cli/new/templates/app/pyproject.jax.toml.tpl +17 -11
  27. flwr/cli/new/templates/app/pyproject.mlx.toml.tpl +17 -12
  28. flwr/cli/new/templates/app/pyproject.numpy.toml.tpl +12 -12
  29. flwr/cli/new/templates/app/pyproject.pytorch.toml.tpl +13 -12
  30. flwr/cli/new/templates/app/pyproject.sklearn.toml.tpl +12 -12
  31. flwr/cli/new/templates/app/pyproject.tensorflow.toml.tpl +15 -12
  32. flwr/cli/run/run.py +128 -53
  33. flwr/client/app.py +56 -24
  34. flwr/client/client_app.py +28 -8
  35. flwr/client/grpc_adapter_client/connection.py +3 -2
  36. flwr/client/grpc_client/connection.py +3 -2
  37. flwr/client/grpc_rere_client/connection.py +17 -6
  38. flwr/client/message_handler/message_handler.py +1 -1
  39. flwr/client/node_state.py +59 -12
  40. flwr/client/node_state_tests.py +4 -3
  41. flwr/client/rest_client/connection.py +19 -8
  42. flwr/client/supernode/app.py +55 -24
  43. flwr/client/typing.py +2 -2
  44. flwr/common/config.py +87 -2
  45. flwr/common/constant.py +3 -0
  46. flwr/common/context.py +24 -9
  47. flwr/common/logger.py +25 -0
  48. flwr/common/serde.py +45 -0
  49. flwr/common/telemetry.py +17 -0
  50. flwr/common/typing.py +5 -0
  51. flwr/proto/common_pb2.py +36 -0
  52. flwr/proto/common_pb2.pyi +121 -0
  53. flwr/proto/common_pb2_grpc.py +4 -0
  54. flwr/proto/common_pb2_grpc.pyi +4 -0
  55. flwr/proto/driver_pb2.py +24 -19
  56. flwr/proto/driver_pb2.pyi +21 -1
  57. flwr/proto/exec_pb2.py +16 -11
  58. flwr/proto/exec_pb2.pyi +22 -1
  59. flwr/proto/run_pb2.py +12 -7
  60. flwr/proto/run_pb2.pyi +22 -1
  61. flwr/proto/task_pb2.py +7 -8
  62. flwr/server/__init__.py +2 -0
  63. flwr/server/compat/legacy_context.py +5 -4
  64. flwr/server/driver/grpc_driver.py +82 -140
  65. flwr/server/run_serverapp.py +40 -15
  66. flwr/server/server_app.py +56 -10
  67. flwr/server/serverapp_components.py +52 -0
  68. flwr/server/superlink/driver/driver_servicer.py +18 -3
  69. flwr/server/superlink/fleet/message_handler/message_handler.py +13 -2
  70. flwr/server/superlink/fleet/vce/backend/backend.py +4 -4
  71. flwr/server/superlink/fleet/vce/backend/raybackend.py +10 -10
  72. flwr/server/superlink/fleet/vce/vce_api.py +149 -117
  73. flwr/server/superlink/state/in_memory_state.py +11 -3
  74. flwr/server/superlink/state/sqlite_state.py +23 -8
  75. flwr/server/superlink/state/state.py +7 -2
  76. flwr/server/typing.py +2 -0
  77. flwr/server/workflow/secure_aggregation/secaggplus_workflow.py +18 -2
  78. flwr/simulation/app.py +4 -3
  79. flwr/simulation/ray_transport/ray_actor.py +15 -19
  80. flwr/simulation/ray_transport/ray_client_proxy.py +22 -9
  81. flwr/simulation/run_simulation.py +237 -66
  82. flwr/superexec/app.py +14 -7
  83. flwr/superexec/deployment.py +110 -33
  84. flwr/superexec/exec_grpc.py +5 -1
  85. flwr/superexec/exec_servicer.py +4 -1
  86. flwr/superexec/executor.py +18 -0
  87. flwr/superexec/simulation.py +151 -0
  88. {flwr_nightly-1.10.0.dev20240707.dist-info → flwr_nightly-1.10.0.dev20240722.dist-info}/METADATA +3 -2
  89. {flwr_nightly-1.10.0.dev20240707.dist-info → flwr_nightly-1.10.0.dev20240722.dist-info}/RECORD +92 -86
  90. {flwr_nightly-1.10.0.dev20240707.dist-info → flwr_nightly-1.10.0.dev20240722.dist-info}/LICENSE +0 -0
  91. {flwr_nightly-1.10.0.dev20240707.dist-info → flwr_nightly-1.10.0.dev20240722.dist-info}/WHEEL +0 -0
  92. {flwr_nightly-1.10.0.dev20240707.dist-info → flwr_nightly-1.10.0.dev20240722.dist-info}/entry_points.txt +0 -0
@@ -1,12 +1,19 @@
1
1
  """$project_name: A Flower / NumPy app."""
2
2
 
3
- import flwr as fl
3
+ from flwr.common import Context
4
+ from flwr.server import ServerApp, ServerAppComponents, ServerConfig
5
+ from flwr.server.strategy import FedAvg
4
6
 
5
- # Configure the strategy
6
- strategy = fl.server.strategy.FedAvg()
7
7
 
8
- # Flower ServerApp
9
- app = fl.server.ServerApp(
10
- config=fl.server.ServerConfig(num_rounds=1),
11
- strategy=strategy,
12
- )
8
+ def server_fn(context: Context):
9
+ # Read from config
10
+ num_rounds = int(context.run_config["num-server-rounds"])
11
+
12
+ # Define strategy
13
+ strategy = FedAvg()
14
+ config = ServerConfig(num_rounds=num_rounds)
15
+
16
+ return ServerAppComponents(strategy=strategy, config=config)
17
+
18
+ # Create ServerApp
19
+ app = ServerApp(server_fn=server_fn)
@@ -1,7 +1,7 @@
1
1
  """$project_name: A Flower / PyTorch app."""
2
2
 
3
- from flwr.common import ndarrays_to_parameters
4
- from flwr.server import ServerApp, ServerConfig
3
+ from flwr.common import Context, ndarrays_to_parameters
4
+ from flwr.server import ServerApp, ServerAppComponents, ServerConfig
5
5
  from flwr.server.strategy import FedAvg
6
6
 
7
7
  from $import_name.task import Net, get_weights
@@ -11,18 +11,20 @@ from $import_name.task import Net, get_weights
11
11
  ndarrays = get_weights(Net())
12
12
  parameters = ndarrays_to_parameters(ndarrays)
13
13
 
14
+ def server_fn(context: Context):
15
+ # Read from config
16
+ num_rounds = int(context.run_config["num-server-rounds"])
14
17
 
15
- # Define strategy
16
- strategy = FedAvg(
17
- fraction_fit=1.0,
18
- fraction_evaluate=1.0,
19
- min_available_clients=2,
20
- initial_parameters=parameters,
21
- )
18
+ # Define strategy
19
+ strategy = FedAvg(
20
+ fraction_fit=1.0,
21
+ fraction_evaluate=1.0,
22
+ min_available_clients=2,
23
+ initial_parameters=parameters,
24
+ )
25
+ config = ServerConfig(num_rounds=num_rounds)
22
26
 
27
+ return ServerAppComponents(strategy=strategy, config=config)
23
28
 
24
29
  # Create ServerApp
25
- app = ServerApp(
26
- config=ServerConfig(num_rounds=3),
27
- strategy=strategy,
28
- )
30
+ app = ServerApp(server_fn=server_fn)
@@ -1,17 +1,23 @@
1
1
  """$project_name: A Flower / Scikit-Learn app."""
2
2
 
3
- from flwr.server import ServerApp, ServerConfig
3
+ from flwr.common import Context
4
+ from flwr.server import ServerApp, ServerAppComponents, ServerConfig
4
5
  from flwr.server.strategy import FedAvg
5
6
 
6
7
 
7
- strategy = FedAvg(
8
- fraction_fit=1.0,
9
- fraction_evaluate=1.0,
10
- min_available_clients=2,
11
- )
8
+ def server_fn(context: Context):
9
+ # Read from config
10
+ num_rounds = int(context.run_config["num-server-rounds"])
11
+
12
+ # Define strategy
13
+ strategy = FedAvg(
14
+ fraction_fit=1.0,
15
+ fraction_evaluate=1.0,
16
+ min_available_clients=2,
17
+ )
18
+ config = ServerConfig(num_rounds=num_rounds)
19
+
20
+ return ServerAppComponents(strategy=strategy, config=config)
12
21
 
13
22
  # Create ServerApp
14
- app = ServerApp(
15
- config=ServerConfig(num_rounds=3),
16
- strategy=strategy,
17
- )
23
+ app = ServerApp(server_fn=server_fn)
@@ -1,7 +1,7 @@
1
1
  """$project_name: A Flower / TensorFlow app."""
2
2
 
3
- from flwr.common import ndarrays_to_parameters
4
- from flwr.server import ServerApp, ServerConfig
3
+ from flwr.common import Context, ndarrays_to_parameters
4
+ from flwr.server import ServerApp, ServerAppComponents, ServerConfig
5
5
  from flwr.server.strategy import FedAvg
6
6
 
7
7
  from $import_name.task import load_model
@@ -11,17 +11,20 @@ config = ServerConfig(num_rounds=3)
11
11
 
12
12
  parameters = ndarrays_to_parameters(load_model().get_weights())
13
13
 
14
- # Define strategy
15
- strategy = FedAvg(
16
- fraction_fit=1.0,
17
- fraction_evaluate=1.0,
18
- min_available_clients=2,
19
- initial_parameters=parameters,
20
- )
14
+ def server_fn(context: Context):
15
+ # Read from config
16
+ num_rounds = int(context.run_config["num-server-rounds"])
21
17
 
18
+ # Define strategy
19
+ strategy = strategy = FedAvg(
20
+ fraction_fit=1.0,
21
+ fraction_evaluate=1.0,
22
+ min_available_clients=2,
23
+ initial_parameters=parameters,
24
+ )
25
+ config = ServerConfig(num_rounds=num_rounds)
26
+
27
+ return ServerAppComponents(strategy=strategy, config=config)
22
28
 
23
29
  # Create ServerApp
24
- app = ServerApp(
25
- config=config,
26
- strategy=strategy,
27
- )
30
+ app = ServerApp(server_fn=server_fn)
@@ -16,9 +16,9 @@ DEVICE = torch.device("cpu")
16
16
  CHECKPOINT = "distilbert-base-uncased" # transformer model checkpoint
17
17
 
18
18
 
19
- def load_data(partition_id, num_clients):
19
+ def load_data(partition_id: int, num_partitions: int):
20
20
  """Load IMDB data (training and eval)"""
21
- fds = FederatedDataset(dataset="imdb", partitioners={"train": num_clients})
21
+ fds = FederatedDataset(dataset="imdb", partitioners={"train": num_partitions})
22
22
  partition = fds.load_partition(partition_id)
23
23
  # Divide data: 80% train, 20% test
24
24
  partition_train_test = partition.train_test_split(test_size=0.2, seed=42)
@@ -43,8 +43,8 @@ def batch_iterate(batch_size, X, y):
43
43
  yield X[ids], y[ids]
44
44
 
45
45
 
46
- def load_data(partition_id, num_clients):
47
- fds = FederatedDataset(dataset="mnist", partitioners={"train": num_clients})
46
+ def load_data(partition_id: int, num_partitions: int):
47
+ fds = FederatedDataset(dataset="mnist", partitioners={"train": num_partitions})
48
48
  partition = fds.load_partition(partition_id)
49
49
  partition_splits = partition.train_test_split(test_size=0.2, seed=42)
50
50
 
@@ -34,7 +34,7 @@ class Net(nn.Module):
34
34
  return self.fc3(x)
35
35
 
36
36
 
37
- def load_data(partition_id, num_partitions):
37
+ def load_data(partition_id: int, num_partitions: int):
38
38
  """Load partition CIFAR10 data."""
39
39
  fds = FederatedDataset(dataset="cifar10", partitioners={"train": num_partitions})
40
40
  partition = fds.load_partition(partition_id)
@@ -6,10 +6,7 @@ build-backend = "hatchling.build"
6
6
  name = "$package_name"
7
7
  version = "1.0.0"
8
8
  description = ""
9
- authors = [
10
- { name = "The Flower Authors", email = "hello@flower.ai" },
11
- ]
12
- license = { text = "Apache License (2.0)" }
9
+ license = "Apache-2.0"
13
10
  dependencies = [
14
11
  "flwr[simulation]>=1.9.0,<2.0",
15
12
  "flwr-datasets>=0.1.0,<1.0.0",
@@ -25,18 +22,18 @@ dependencies = [
25
22
  [tool.hatch.build.targets.wheel]
26
23
  packages = ["."]
27
24
 
28
- [flower]
25
+ [tool.flwr.app]
29
26
  publisher = "$username"
30
27
 
31
- [flower.components]
28
+ [tool.flwr.app.components]
32
29
  serverapp = "$import_name.app:server"
33
30
  clientapp = "$import_name.app:client"
34
31
 
35
- [flower.engine]
36
- name = "simulation"
32
+ [tool.flwr.app.config]
33
+ num-server-rounds = "3"
37
34
 
38
- [flower.engine.simulation.supernode]
39
- num = $num_clients
35
+ [tool.flwr.federations]
36
+ default = "localhost"
40
37
 
41
- [flower.engine.simulation]
42
- backend_config = { client_resources = { num_cpus = 8, num_gpus = 1.0 } }
38
+ [tool.flwr.federations.localhost]
39
+ options.num-supernodes = 10
@@ -6,32 +6,33 @@ build-backend = "hatchling.build"
6
6
  name = "$package_name"
7
7
  version = "1.0.0"
8
8
  description = ""
9
- authors = [
10
- { name = "The Flower Authors", email = "hello@flower.ai" },
11
- ]
12
- license = { text = "Apache License (2.0)" }
9
+ license = "Apache-2.0"
13
10
  dependencies = [
14
11
  "flwr[simulation]>=1.9.0,<2.0",
15
12
  "flwr-datasets>=0.0.2,<1.0.0",
16
13
  "torch==2.2.1",
17
- "transformers>=4.30.0,<5.0"
18
- "evaluate>=0.4.0,<1.0"
19
- "datasets>=2.0.0, <3.0"
20
- "scikit-learn>=1.3.1, <2.0"
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",
21
18
  ]
22
19
 
23
20
  [tool.hatch.build.targets.wheel]
24
21
  packages = ["."]
25
22
 
26
- [flower]
23
+ [tool.flwr.app]
27
24
  publisher = "$username"
28
25
 
29
- [flower.components]
30
- serverapp = "$import_name.server:app"
31
- clientapp = "$import_name.client:app"
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
+ local-epochs = "1"
32
33
 
33
- [flower.engine]
34
- name = "simulation"
34
+ [tool.flwr.federations]
35
+ default = "localhost"
35
36
 
36
- [flower.engine.simulation.supernode]
37
- num = 2
37
+ [tool.flwr.federations.localhost]
38
+ options.num-supernodes = 10
@@ -6,23 +6,29 @@ build-backend = "hatchling.build"
6
6
  name = "$package_name"
7
7
  version = "1.0.0"
8
8
  description = ""
9
- authors = [
10
- { name = "The Flower Authors", email = "hello@flower.ai" },
11
- ]
12
- license = {text = "Apache License (2.0)"}
9
+ license = "Apache-2.0"
13
10
  dependencies = [
14
11
  "flwr[simulation]>=1.9.0,<2.0",
15
- "jax==0.4.26",
16
- "jaxlib==0.4.26",
17
- "scikit-learn==1.4.2",
12
+ "jax==0.4.13",
13
+ "jaxlib==0.4.13",
14
+ "scikit-learn==1.3.2",
18
15
  ]
19
16
 
20
17
  [tool.hatch.build.targets.wheel]
21
18
  packages = ["."]
22
19
 
23
- [flower]
20
+ [tool.flwr.app]
24
21
  publisher = "$username"
25
22
 
26
- [flower.components]
27
- serverapp = "$import_name.server:app"
28
- clientapp = "$import_name.client:app"
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
+
30
+ [tool.flwr.federations]
31
+ default = "localhost"
32
+
33
+ [tool.flwr.federations.localhost]
34
+ options.num-supernodes = 10
@@ -6,10 +6,7 @@ build-backend = "hatchling.build"
6
6
  name = "$package_name"
7
7
  version = "1.0.0"
8
8
  description = ""
9
- authors = [
10
- { name = "The Flower Authors", email = "hello@flower.ai" },
11
- ]
12
- license = { text = "Apache License (2.0)" }
9
+ license = "Apache-2.0"
13
10
  dependencies = [
14
11
  "flwr[simulation]>=1.9.0,<2.0",
15
12
  "flwr-datasets[vision]>=0.0.2,<1.0.0",
@@ -20,15 +17,23 @@ dependencies = [
20
17
  [tool.hatch.build.targets.wheel]
21
18
  packages = ["."]
22
19
 
23
- [flower]
20
+ [tool.flwr.app]
24
21
  publisher = "$username"
25
22
 
26
- [flower.components]
27
- serverapp = "$import_name.server:app"
28
- clientapp = "$import_name.client:app"
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
+ local-epochs = "1"
30
+ num-layers = "2"
31
+ hidden-dim = "32"
32
+ batch-size = "256"
33
+ lr = "0.1"
29
34
 
30
- [flower.engine]
31
- name = "simulation"
35
+ [tool.flwr.federations]
36
+ default = "localhost"
32
37
 
33
- [flower.engine.simulation.supernode]
34
- num = 2
38
+ [tool.flwr.federations.localhost]
39
+ options.num-supernodes = 10
@@ -6,10 +6,7 @@ build-backend = "hatchling.build"
6
6
  name = "$package_name"
7
7
  version = "1.0.0"
8
8
  description = ""
9
- authors = [
10
- { name = "The Flower Authors", email = "hello@flower.ai" },
11
- ]
12
- license = { text = "Apache License (2.0)" }
9
+ license = "Apache-2.0"
13
10
  dependencies = [
14
11
  "flwr[simulation]>=1.9.0,<2.0",
15
12
  "numpy>=1.21.0",
@@ -18,15 +15,18 @@ dependencies = [
18
15
  [tool.hatch.build.targets.wheel]
19
16
  packages = ["."]
20
17
 
21
- [flower]
18
+ [tool.flwr.app]
22
19
  publisher = "$username"
23
20
 
24
- [flower.components]
25
- serverapp = "$import_name.server:app"
26
- clientapp = "$import_name.client:app"
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
27
 
28
- [flower.engine]
29
- name = "simulation"
28
+ [tool.flwr.federations]
29
+ default = "localhost"
30
30
 
31
- [flower.engine.simulation.supernode]
32
- num = 2
31
+ [tool.flwr.federations.localhost]
32
+ options.num-supernodes = 10
@@ -6,10 +6,7 @@ build-backend = "hatchling.build"
6
6
  name = "$package_name"
7
7
  version = "1.0.0"
8
8
  description = ""
9
- authors = [
10
- { name = "The Flower Authors", email = "hello@flower.ai" },
11
- ]
12
- license = { text = "Apache License (2.0)" }
9
+ license = "Apache-2.0"
13
10
  dependencies = [
14
11
  "flwr[simulation]>=1.9.0,<2.0",
15
12
  "flwr-datasets[vision]>=0.0.2,<1.0.0",
@@ -20,15 +17,19 @@ dependencies = [
20
17
  [tool.hatch.build.targets.wheel]
21
18
  packages = ["."]
22
19
 
23
- [flower]
20
+ [tool.flwr.app]
24
21
  publisher = "$username"
25
22
 
26
- [flower.components]
27
- serverapp = "$import_name.server:app"
28
- clientapp = "$import_name.client:app"
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
+ local-epochs = "1"
29
30
 
30
- [flower.engine]
31
- name = "simulation"
31
+ [tool.flwr.federations]
32
+ default = "localhost"
32
33
 
33
- [flower.engine.simulation.supernode]
34
- num = 2
34
+ [tool.flwr.federations.localhost]
35
+ options.num-supernodes = 10
@@ -6,10 +6,7 @@ build-backend = "hatchling.build"
6
6
  name = "$package_name"
7
7
  version = "1.0.0"
8
8
  description = ""
9
- authors = [
10
- { name = "The Flower Authors", email = "hello@flower.ai" },
11
- ]
12
- license = { text = "Apache License (2.0)" }
9
+ license = "Apache-2.0"
13
10
  dependencies = [
14
11
  "flwr[simulation]>=1.9.0,<2.0",
15
12
  "flwr-datasets[vision]>=0.0.2,<1.0.0",
@@ -19,15 +16,18 @@ dependencies = [
19
16
  [tool.hatch.build.targets.wheel]
20
17
  packages = ["."]
21
18
 
22
- [flower]
19
+ [tool.flwr.app]
23
20
  publisher = "$username"
24
21
 
25
- [flower.components]
26
- serverapp = "$import_name.server:app"
27
- clientapp = "$import_name.client:app"
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
28
 
29
- [flower.engine]
30
- name = "simulation"
29
+ [tool.flwr.federations]
30
+ default = "localhost"
31
31
 
32
- [flower.engine.simulation.supernode]
33
- num = 2
32
+ [tool.flwr.federations.localhost]
33
+ options.num-supernodes = 10
@@ -6,10 +6,7 @@ build-backend = "hatchling.build"
6
6
  name = "$package_name"
7
7
  version = "1.0.0"
8
8
  description = ""
9
- authors = [
10
- { name = "The Flower Authors", email = "hello@flower.ai" },
11
- ]
12
- license = { text = "Apache License (2.0)" }
9
+ license = "Apache-2.0"
13
10
  dependencies = [
14
11
  "flwr[simulation]>=1.9.0,<2.0",
15
12
  "flwr-datasets[vision]>=0.0.2,<1.0.0",
@@ -19,15 +16,21 @@ dependencies = [
19
16
  [tool.hatch.build.targets.wheel]
20
17
  packages = ["."]
21
18
 
22
- [flower]
19
+ [tool.flwr.app]
23
20
  publisher = "$username"
24
21
 
25
- [flower.components]
26
- serverapp = "$import_name.server:app"
27
- clientapp = "$import_name.client:app"
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 = "" # Empty string means False
28
31
 
29
- [flower.engine]
30
- name = "simulation"
32
+ [tool.flwr.federations]
33
+ default = "localhost"
31
34
 
32
- [flower.engine.simulation.supernode]
33
- num = 2
35
+ [tool.flwr.federations.localhost]
36
+ options.num-supernodes = 10