diff --git a/examples/opacus/README.md b/examples/opacus/README.md index 2d5d04a56a15..c1161698d71f 100644 --- a/examples/opacus/README.md +++ b/examples/opacus/README.md @@ -35,9 +35,6 @@ opacus └── README.md ``` -> \[!NOTE\] -> Please note that, at the current state, users cannot set `NodeConfig` for simulated `ClientApp`s. For this reason, the hyperparameter `noise_multiplier` is set in the `client_fn` method based on a condition check on `partition_id`. This will be modified in a future version of Flower to allow users to set `NodeConfig` for simulated `ClientApp`s. - ### Install dependencies and project Install the dependencies defined in `pyproject.toml` as well as the `opacus` package. @@ -60,5 +57,8 @@ flwr run . You can also override some of the settings for your `ClientApp` and `ServerApp` defined in `pyproject.toml`. For example: ```bash -flwr run . --run-config "num-server-rounds=5" +flwr run . --run-config "max-grad-norm=1.0 num-server-rounds=5" ``` + +> \[!NOTE\] +> Please note that, at the current state, users cannot set `NodeConfig` for simulated `ClientApp`s. For this reason, the hyperparameter `noise_multiplier` is set in the `client_fn` method based on a condition check on `partition_id`. This will be modified in a future version of Flower to allow users to set `NodeConfig` for simulated `ClientApp`s. diff --git a/examples/opacus/opacus-fl/client_app.py b/examples/opacus/opacus-fl/client_app.py index 6c1850ebc6e5..ef93b54be03c 100644 --- a/examples/opacus/opacus-fl/client_app.py +++ b/examples/opacus/opacus-fl/client_app.py @@ -8,7 +8,6 @@ from .task import train, test, Net, load_data, get_weights, set_weights from flwr.common import Context - warnings.filterwarnings("ignore", category=UserWarning) diff --git a/examples/opacus/opacus-fl/task.py b/examples/opacus/opacus-fl/task.py index 1d068dbfe45a..dd26f8e323ec 100644 --- a/examples/opacus/opacus-fl/task.py +++ b/examples/opacus/opacus-fl/task.py @@ -15,8 +15,6 @@ class Net(nn.Module): - """Model (simple CNN adapted from 'PyTorch: A 60 Minute Blitz')""" - def __init__(self): super(Net, self).__init__() self.conv1 = nn.Conv2d(3, 6, 5)