From e27f466e2e5719edc14b360614f563686af865f1 Mon Sep 17 00:00:00 2001 From: mattiasakesson Date: Wed, 11 Sep 2024 09:58:35 +0200 Subject: [PATCH] rounds->globalrounds --- examples/mnist-pytorch-DPSGD/README.rst | 2 +- examples/mnist-pytorch-DPSGD/client/train.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/mnist-pytorch-DPSGD/README.rst b/examples/mnist-pytorch-DPSGD/README.rst index bf1b125f8..4597b117a 100644 --- a/examples/mnist-pytorch-DPSGD/README.rst +++ b/examples/mnist-pytorch-DPSGD/README.rst @@ -16,7 +16,7 @@ Edit Differential Privacy budget -------------------------- - The **Differential Privacy budget** (`FINAL_EPSILON`, `DELTA`) is configured in the `compute` package at `client/train.py` (lines 35 and 39). - If `HARDLIMIT` (line 40) is set to `True`, the `FINAL_EPSILON` will not exceed its specified limit. -- If `HARDLIMIT` is set to `False`, the expected `FINAL_EPSILON` will be around its specified value given the server runs `ROUNDS` variable (line 36). +- If `HARDLIMIT` is set to `False`, the expected `FINAL_EPSILON` will be around its specified value given the server runs `GLOBAL_ROUNDS` variable (line 36). Creating the compute package and seed model ------------------------------------------- diff --git a/examples/mnist-pytorch-DPSGD/client/train.py b/examples/mnist-pytorch-DPSGD/client/train.py index b5d9402b6..2b8748391 100644 --- a/examples/mnist-pytorch-DPSGD/client/train.py +++ b/examples/mnist-pytorch-DPSGD/client/train.py @@ -33,9 +33,9 @@ def __getitem__(self, idx): MAX_GRAD_NORM = 1.2 FINAL_EPSILON = 8.0 -ROUNDS = 4 +GLOBAL_ROUNDS = 4 EPOCHS = 5 -EPSILON = FINAL_EPSILON/ROUNDS +EPSILON = FINAL_EPSILON/GLOBAL_ROUNDS DELTA = 1e-5 HARDLIMIT = False