From b62fa54fa85d384e784126c010ab41133a2c9878 Mon Sep 17 00:00:00 2001 From: "Daniel J. Beutel" Date: Tue, 16 Jul 2024 23:22:14 +0200 Subject: [PATCH] Apply suggestions from code review --- src/py/flwr/cli/new/templates/app/code/server.hf.py.tpl | 1 - src/py/flwr/cli/new/templates/app/code/server.jax.py.tpl | 1 - src/py/flwr/cli/new/templates/app/code/server.mlx.py.tpl | 1 - src/py/flwr/cli/new/templates/app/code/server.numpy.py.tpl | 1 - src/py/flwr/cli/new/templates/app/code/server.pytorch.py.tpl | 1 - src/py/flwr/cli/new/templates/app/code/server.sklearn.py.tpl | 1 - src/py/flwr/cli/new/templates/app/code/server.tensorflow.py.tpl | 1 - 7 files changed, 7 deletions(-) diff --git a/src/py/flwr/cli/new/templates/app/code/server.hf.py.tpl b/src/py/flwr/cli/new/templates/app/code/server.hf.py.tpl index 10ac8101a290..43fce9e481c6 100644 --- a/src/py/flwr/cli/new/templates/app/code/server.hf.py.tpl +++ b/src/py/flwr/cli/new/templates/app/code/server.hf.py.tpl @@ -6,7 +6,6 @@ from flwr.server import ServerApp, ServerAppComponents, ServerConfig def server_fn(context: Context): - # Read from config num_rounds = int(context.run_config["num-server-rounds"]) diff --git a/src/py/flwr/cli/new/templates/app/code/server.jax.py.tpl b/src/py/flwr/cli/new/templates/app/code/server.jax.py.tpl index f00ab25d955b..4eb7149de999 100644 --- a/src/py/flwr/cli/new/templates/app/code/server.jax.py.tpl +++ b/src/py/flwr/cli/new/templates/app/code/server.jax.py.tpl @@ -6,7 +6,6 @@ from flwr.server import ServerApp, ServerAppComponents, ServerConfig def server_fn(context: Context): - # Read from config num_rounds = int(context.run_config["num-server-rounds"]) diff --git a/src/py/flwr/cli/new/templates/app/code/server.mlx.py.tpl b/src/py/flwr/cli/new/templates/app/code/server.mlx.py.tpl index 20e51bac7f73..72aed878553d 100644 --- a/src/py/flwr/cli/new/templates/app/code/server.mlx.py.tpl +++ b/src/py/flwr/cli/new/templates/app/code/server.mlx.py.tpl @@ -6,7 +6,6 @@ from flwr.server.strategy import FedAvg def server_fn(context: Context): - # Read from config num_rounds = int(context.run_config["num-server-rounds"]) diff --git a/src/py/flwr/cli/new/templates/app/code/server.numpy.py.tpl b/src/py/flwr/cli/new/templates/app/code/server.numpy.py.tpl index 696a8e612f22..d324b4f24fed 100644 --- a/src/py/flwr/cli/new/templates/app/code/server.numpy.py.tpl +++ b/src/py/flwr/cli/new/templates/app/code/server.numpy.py.tpl @@ -6,7 +6,6 @@ from flwr.server.strategy import FedAvg def server_fn(context: Context): - # Read from config num_rounds = int(context.run_config["num-server-rounds"]) diff --git a/src/py/flwr/cli/new/templates/app/code/server.pytorch.py.tpl b/src/py/flwr/cli/new/templates/app/code/server.pytorch.py.tpl index bb6ea4bdd617..7ac9508f8a25 100644 --- a/src/py/flwr/cli/new/templates/app/code/server.pytorch.py.tpl +++ b/src/py/flwr/cli/new/templates/app/code/server.pytorch.py.tpl @@ -12,7 +12,6 @@ ndarrays = get_weights(Net()) parameters = ndarrays_to_parameters(ndarrays) def server_fn(context: Context): - # Read from config num_rounds = int(context.run_config["num-server-rounds"]) diff --git a/src/py/flwr/cli/new/templates/app/code/server.sklearn.py.tpl b/src/py/flwr/cli/new/templates/app/code/server.sklearn.py.tpl index 0b39fab4a54d..d8837798d5a6 100644 --- a/src/py/flwr/cli/new/templates/app/code/server.sklearn.py.tpl +++ b/src/py/flwr/cli/new/templates/app/code/server.sklearn.py.tpl @@ -6,7 +6,6 @@ from flwr.server.strategy import FedAvg def server_fn(context: Context): - # Read from config num_rounds = int(context.run_config["num-server-rounds"]) diff --git a/src/py/flwr/cli/new/templates/app/code/server.tensorflow.py.tpl b/src/py/flwr/cli/new/templates/app/code/server.tensorflow.py.tpl index 797467f57f10..7ecdcc6c8fa6 100644 --- a/src/py/flwr/cli/new/templates/app/code/server.tensorflow.py.tpl +++ b/src/py/flwr/cli/new/templates/app/code/server.tensorflow.py.tpl @@ -12,7 +12,6 @@ config = ServerConfig(num_rounds=3) parameters = ndarrays_to_parameters(load_model().get_weights()) def server_fn(context: Context): - # Read from config num_rounds = int(context.run_config["num-server-rounds"])