Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WPES Paper Experiments #1

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
77e977f
Create wpes dir
Jun 12, 2024
5642765
Update client and server python files using https://flower.ai/docs/fr…
hokeun Jun 12, 2024
850d39a
Merge branch 'adap:main' into wpes
hokeun Jun 13, 2024
e7f0bbf
Set up development environment by using local flower code.
hokeun Jun 13, 2024
8b414fb
Add additional log to indicate that we are using local copy of flower
hokeun Jun 13, 2024
5552228
Add logging in fedavg.py
hokeun Jun 13, 2024
9518cfb
Add an option to turn off inplace
hokeun Jun 13, 2024
14b1f0b
Add argument passing using env variable for num_rounds with instructi…
hokeun Jun 14, 2024
d530a9b
Start coding for adding noise in model aggregation.
hokeun Jun 14, 2024
a5406f7
Add Gaussian noise feature
hokeun Jun 14, 2024
258e9b1
Add preliminary experimental results
hokeun Jun 14, 2024
1a2fedd
Add shell script for running batch experiments
hokeun Jun 14, 2024
3b7ba2c
Update experiment running script with more configurations
hokeun Jun 17, 2024
235357c
Add experimental results on 2024 06 14
hokeun Jun 17, 2024
b9f9215
Try to measure the depth of the ndarray - params[0][0][0][0][0] is a …
hokeun Jun 18, 2024
200f652
Add deep multiplication function for multi-dimensional ndarrays with …
hokeun Jun 18, 2024
9abd7e8
Add a function for counting the number of float32 numbers in multi-di…
hokeun Jun 18, 2024
bf350ed
Add a function for deep compare on float32 multi-dimensional arrays
hokeun Jun 18, 2024
c1d05bd
Make the printing of diffs optional
hokeun Jun 18, 2024
753b058
Remove unnecessary logs
hokeun Jun 18, 2024
f1488d9
Update README.md
hokeun Jun 18, 2024
dcd6d37
Update README.md
hokeun Jun 18, 2024
c055c3b
Add experimental results with 20 rounds for 5 and 10 clients
hokeun Jun 19, 2024
e61c476
Add a new script for running 50 rounds
hokeun Jun 19, 2024
c2aef78
Update README.md
hokeun Jun 19, 2024
75db8ed
Update README.md
hokeun Jun 19, 2024
15ca700
Add script and results for experiments without noise for 5 times
hokeun Jun 20, 2024
2640d1f
Add a Python script for summarizing experimental results
hokeun Jun 20, 2024
1fc8ebe
Add experimental results with 0. noise
hokeun Jun 21, 2024
7c8980e
Collect data into separate lists
hokeun Jun 22, 2024
f0a0bd6
Add script and results for noise 0.01
hokeun Jun 22, 2024
3cf102c
Add results and script for experiments with 0.05 sigma noise
hokeun Jun 22, 2024
21b9d01
Add experimental results with noise of 0.2 and 0.02
hokeun Jun 29, 2024
618e098
Move old experiments without TRIAL number to old
hokeun Jun 29, 2024
2e7b310
Update summarize results script to print out summaries
hokeun Jun 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary logs
hokeun committed Jun 18, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 753b0588327e8d493055b049ba1c2ff8fbaed082
18 changes: 9 additions & 9 deletions src/py/flwr/server/strategy/aggregate.py
Original file line number Diff line number Diff line change
@@ -157,15 +157,15 @@ def aggregate_inplace(results: List[Tuple[ClientProxy, FitRes]], noise_enabled:

hokeun_params = copy.deepcopy(params)
for i, (_, fit_res) in enumerate(results[1:]):
noise_factor = 1.0
if noise_enabled:
noise_factor += random.gauss(0, gauss_noise_sigma)
log(INFO, "Hokeun! noise_factor: %f", noise_factor)
# noise_factor = 1.0
# if noise_enabled:
# noise_factor += random.gauss(0, gauss_noise_sigma)
# log(INFO, "Hokeun! noise_factor: %f", noise_factor)

ndarrays = parameters_to_ndarrays(fit_res.parameters)
log(INFO, "Hokeun! aggregate_inplace: len(ndarrays): %i", len(ndarrays))
log(INFO, "Hokeun! aggregate_inplace: len(params): %i", len(params))
log(INFO, "Hokeun! aggregate_inplace: len(hokeun_params): %i", len(hokeun_params))
# log(INFO, "Hokeun! aggregate_inplace: len(ndarrays): %i", len(ndarrays))
# log(INFO, "Hokeun! aggregate_inplace: len(params): %i", len(params))
# log(INFO, "Hokeun! aggregate_inplace: len(hokeun_params): %i", len(hokeun_params))

hokeun_perform_recursive_deep_multiplication(scaling_factors[i + 1], hokeun_params, ndarrays, noise_enabled, gauss_noise_sigma)

@@ -221,7 +221,7 @@ def aggregate_inplace(results: List[Tuple[ClientProxy, FitRes]], noise_enabled:
# log(INFO, "Hokeun! type(hokeun_params[0][0][0][0][0]): %r", str(hokeun_params[0][0][0][0][0]))
# log(INFO, "Hokeun! type(params[0][0][0][0][0]): %r", str(params[0][0][0][0][0]))

log(INFO, "Hokeun! are hokeun_params and params the same in string?: %r", str(hokeun_params) == str(params))
# log(INFO, "Hokeun! are hokeun_params and params the same in string?: %r", str(hokeun_params) == str(params))
# log(INFO, "Hokeun! are hokeun_params and params the same numerically?: %r", hokeun_params == params)

log(INFO, "Hokeun! aggregate_inplace: hokeun_deep_count_float32(hokeun_params): %i", hokeun_deep_count_float32(hokeun_params))
@@ -233,7 +233,7 @@ def aggregate_inplace(results: List[Tuple[ClientProxy, FitRes]], noise_enabled:

log(INFO, "Hokeun! aggregate_inplace: Final results: hokeun_deep_count_float32(hokeun_params): %i", hokeun_deep_count_float32(hokeun_params))
log(INFO, "Hokeun! aggregate_inplace: Final results: hokeun_deep_count_float32(params): %i", hokeun_deep_count_float32(params))
log(INFO, "Hokeun! aggregate_inplace: Final results: calling hokeun_deep_diff_float32() ...")
# log(INFO, "Hokeun! aggregate_inplace: Final results: calling hokeun_deep_diff_float32() ...")

print_diff = False
log(INFO, "Hokeun! aggregate_inplace: Final results: hokeun_deep_diff_float32(hokeun_params, params): %i",