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
Show file tree
Hide file tree
Changes from all commits
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
39 changes: 39 additions & 0 deletions examples/app-pytorch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,42 @@ Or, to try the custom server function example, run:
```bash
flower-server-app server_custom:app --insecure
```

## More customized commands for WPES paper experiments
```bash
HOKEUN_FLWR_NUM_ROUNDS=7 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 2'
```

To disable noise, assign 0 to `HOKEUN_FLWR_NOISE_ENABLED`:
```bash
HOKEUN_FLWR_NUM_ROUNDS=5 HOKEUN_FLWR_NOISE_ENABLED=0 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.1 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 3'
```

Example command with Gaussian noise:
```bash
HOKEUN_FLWR_NUM_ROUNDS=5 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.1 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 3'
```

## Using shell script

IMPORTANT! You must run `poetry shell` before running the shell script. For example:

```bash
poetry shell
./run_experiments.sh &
exit
```

After starting the script background using `%`, you can first `exit` to exit from poetry and check if the script still runs.

## Killing experiments script running in the background

Check out this page: [Killing a shell script running in background](https://unix.stackexchange.com/questions/174028/killing-a-shell-script-running-in-background).

Find the process ID of the script like this:

```
ps -aux | grep run_experiments*
```

Then, kill the process.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
(ClientAppActor pid=663694) INFO : Starting training... [repeated 3x across cluster]
INFO : aggregate_fit: received 3 results and 0 failures
INFO : Hokeun! aggregate_fit: self.inplace
INFO : Hokeun! aggregate_inplace: beginning
INFO : Hokeun! aggregate_inplace: noise_enabled: False
INFO : Hokeun! aggregate_inplace: gauss_noise_sigma: 0.0
INFO : Hokeun! aggregate_inplace: len(ndarrays): 10
INFO : Hokeun! aggregate_inplace: len(ndarrays): 10
INFO : configure_evaluate: no clients selected, skipping evaluation
INFO :
INFO : Hokeun! [SUMMARY]
INFO : Run finished 5 round(s) in 96.12s
INFO : History (metrics, distributed, fit):
INFO : {'train_accuracy': [(1, 0.2626266666666667),
INFO : (2, 0.37656),
INFO : (3, 0.43427333333333334),
INFO : (4, 0.48339333333333334),
INFO : (5, 0.5209533333333334)],
INFO : 'train_loss': [(1, 3111.288763999939),
INFO : (2, 2636.2783563137054),
INFO : (3, 2432.4359317620597),
INFO : (4, 2231.099242488543),
INFO : (5, 2077.1603814164796)],
INFO : 'val_accuracy': [(1, 0.2648),
INFO : (2, 0.37516666666666665),
INFO : (3, 0.43006666666666665),
INFO : (4, 0.47583333333333333),
INFO : (5, 0.5156666666666667)],
INFO : 'val_loss': [(1, 19890.59807151556),
INFO : (2, 16862.849978710212),
INFO : (3, 15588.389818498554),
INFO : (4, 14355.181868209038),
INFO : (5, 13461.744302448738)]}


-----------------------------------------------------------------------------------------


(ClientAppActor pid=669727) INFO : Starting training... [repeated 3x across cluster]
INFO : aggregate_fit: received 3 results and 0 failures
INFO : Hokeun! aggregate_fit: self.inplace
INFO : Hokeun! aggregate_inplace: beginning
INFO : Hokeun! aggregate_inplace: noise_enabled: True
INFO : Hokeun! aggregate_inplace: gauss_noise_sigma: 0.5
INFO : Hokeun! noise_factor: 0.804646
INFO : Hokeun! aggregate_inplace: len(ndarrays): 10
INFO : Hokeun! noise_factor: 0.861944
INFO : Hokeun! aggregate_inplace: len(ndarrays): 10
INFO : configure_evaluate: no clients selected, skipping evaluation
INFO :
INFO : Hokeun! [SUMMARY]
INFO : Run finished 5 round(s) in 86.11s
INFO : History (metrics, distributed, fit):
INFO : {'train_accuracy': [(1, 0.29391333333333336),
INFO : (2, 0.3678533333333333),
INFO : (3, 0.41861333333333334),
INFO : (4, 0.46557333333333334),
INFO : (5, 0.5064866666666666)],
INFO : 'train_loss': [(1, 3056.173280954361),
INFO : (2, 2692.5717417399087),
INFO : (3, 2502.7321223417916),
INFO : (4, 2305.85709019502),
INFO : (5, 2136.2207515239716)],
INFO : 'val_accuracy': [(1, 0.29850000000000004),
INFO : (2, 0.3683),
INFO : (3, 0.4161666666666667),
INFO : (4, 0.4692),
INFO : (5, 0.5051333333333333)],
INFO : 'val_loss': [(1, 19525.03346863389),
INFO : (2, 17186.626746791106),
INFO : (3, 15998.408485740423),
INFO : (4, 14755.69704998719),
INFO : (5, 13744.3956398579)]}


-----------------------------------------------------------------------------------------


(ClientAppActor pid=675422) INFO : Starting training... [repeated 3x across cluster]
INFO : aggregate_fit: received 3 results and 0 failures
INFO : Hokeun! aggregate_fit: self.inplace
INFO : Hokeun! aggregate_inplace: beginning
INFO : Hokeun! aggregate_inplace: noise_enabled: True
INFO : Hokeun! aggregate_inplace: gauss_noise_sigma: 0.1
INFO : Hokeun! noise_factor: 1.056394
INFO : Hokeun! aggregate_inplace: len(ndarrays): 10
INFO : Hokeun! noise_factor: 0.949573
INFO : Hokeun! aggregate_inplace: len(ndarrays): 10
INFO : configure_evaluate: no clients selected, skipping evaluation
INFO :
INFO : Hokeun! [SUMMARY]
INFO : Run finished 5 round(s) in 85.11s
INFO : History (metrics, distributed, fit):
INFO : {'train_accuracy': [(1, 0.26737333333333335),
INFO : (2, 0.37349333333333334),
INFO : (3, 0.43994666666666665),
INFO : (4, 0.48291333333333336),
INFO : (5, 0.5240666666666667)],
INFO : 'train_loss': [(1, 3134.8707090616226),
INFO : (2, 2709.2759661277137),
INFO : (3, 2392.55160488685),
INFO : (4, 2242.929047127565),
INFO : (5, 2076.5026405652366)],
INFO : 'val_accuracy': [(1, 0.27416666666666667),
INFO : (2, 0.37496666666666667),
INFO : (3, 0.44176666666666664),
INFO : (4, 0.4823),
INFO : (5, 0.5159666666666667)],
INFO : 'val_loss': [(1, 19931.76632917424),
INFO : (2, 17240.421862681706),
INFO : (3, 15239.038378457848),
INFO : (4, 14358.611958074382),
INFO : (5, 13401.850687815033)]}


136 changes: 136 additions & 0 deletions examples/app-pytorch/experimental_results/summarize_results.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
#!/usr/bin/env python3

import argparse
import os

from enum import Enum
import re

class SummaryState(Enum):
NONE = 1
TRAIN_ACCURACY = 2
TRAIN_LOSS = 3
VAL_ACCURACY = 4
VAL_LOSS = 5

class Summary:
def __init__(self):
self.file_name = ""
self.trial_count = 0
self.num_clients = 0
self.num_rounds = 0
self.noise_enabled = False
self.gauss_noise_sigma = 0.0
self.param_count = 0
self.mult_count = 0
self.train_accuracy = []
self.train_loss = []
self.val_accuracy = []
self.val_loss = []

def __str__(self):
return f"""----------------------
file_name: {self.file_name}
trial_count: {self.trial_count}
num_clients: {self.num_clients}
num_rounds: {self.num_rounds}
noise_enabled: {self.noise_enabled}
gauss_noise_sigma: {self.gauss_noise_sigma}
param_count: {self.param_count}
mult_count: {self.mult_count}
train_accuracy: {self.train_accuracy}

train_loss: {self.train_loss}

val_accuracy: {self.val_accuracy}

val_loss: {self.val_loss}
----------------------"""


def get_summary(file_path: str):
result_file = open(file_path, 'r')
result_lines = result_file.readlines()

state = SummaryState.NONE

summary = Summary()

summary.file_name = os.path.basename(file_path)
summary.trial_count = int(re.search("_(?P<count>[0-9]+)_TRIAL", summary.file_name).group("count"))

for line in result_lines:
if state == SummaryState.NONE:
if "'train_accuracy'" in line:
state = SummaryState.TRAIN_ACCURACY
if "'train_loss'" in line:
state = SummaryState.TRAIN_LOSS
if "'val_accuracy'" in line:
state = SummaryState.VAL_ACCURACY
if "'val_loss'" in line:
state = SummaryState.VAL_LOSS

if state == SummaryState.NONE:
tokens = line.split(":")
if "configure_fit: strategy sampled" in line:
summary.num_clients = int(re.search("sampled (?P<count>[0-9]+) clients", line).group("count"))
if "env_var_num_rounds:" in line:
summary.num_rounds = int(tokens[-1])
if "aggregate_inplace: noise_enabled:" in line:
summary.noise_enabled = tokens[-1] == "True"
if "aggregate_inplace: gauss_noise_sigma:" in line:
summary.gauss_noise_sigma = float(tokens[-1])
if "aggregate_inplace: hokeun_deep_count_float32(params):" in line:
summary.param_count = int(tokens[-1])
if "aggregate_inplace: mult_count:" in line:
summary.mult_count = int(tokens[-1])

# Get data
if state != SummaryState.NONE:
tuple_str = re.findall(r"\(.*?\)", line)
tuple_str = re.sub("[()]", "", tuple_str[0])
tuple = [x.strip() for x in tuple_str.split(",")]
tuple = [int(tuple[0]), float(tuple[1])]

if state == SummaryState.TRAIN_ACCURACY:
summary.train_accuracy.append(tuple)
if state == SummaryState.TRAIN_LOSS:
summary.train_loss.append(tuple)
if state == SummaryState.VAL_ACCURACY:
summary.val_accuracy.append(tuple)
if state == SummaryState.VAL_LOSS:
summary.val_loss.append(tuple)

if "]" in line:
state = SummaryState.NONE

return summary

# print("Hokeun! train_accuracy: ", summary.train_accuracy)
# print("Hokeun! train_loss: ", summary.train_loss)
# print("Hokeun! val_accuracy: ", summary.val_accuracy)
# print("Hokeun! val_loss: ", summary.val_loss)
# count += 1
# print("Line {}: {}".format(count, line.strip()))
# if count > 10:
# break


parser = argparse.ArgumentParser(description = "Summarize experimental results in directory.")

parser.add_argument("-d", "--dir",
required = True, dest ="target_dir",
action = "store",
help = "The directory including the experimental result files.")

args = parser.parse_args()

file_list = os.listdir(args.target_dir)
file_list.sort()
# print("Hokeun! " + str(file_list))

print("num_clients\tgauss_noise_sigma\ttrial_count\ttrain_accuracy\tval_accuracy")
for file in file_list:
summary = get_summary(os.path.join(args.target_dir, file))
# print(summary) # For debugging.
print(f"{summary.num_clients}\t{summary.gauss_noise_sigma}\t{summary.trial_count}\t{summary.train_accuracy[-1][1]}\t{summary.val_accuracy[-1][1]}")
2 changes: 1 addition & 1 deletion examples/app-pytorch/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ authors = ["The Flower Authors <[email protected]>"]
[tool.poetry.dependencies]
python = "^3.8"
# Mandatory dependencies
flwr = { version = "^1.8.0", extras = ["simulation"] }
flwr = { path = "../../", develop = true, extras = ["simulation"] }
torch = "2.2.1"
torchvision = "0.17.1"
34 changes: 34 additions & 0 deletions examples/app-pytorch/run_experiments_20_rounds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# Make sure to run poetry shell first!

date_time=$(date '+%Y_%m_%d_%H%M%S');

HOKEUN_FLWR_NUM_ROUNDS=20 HOKEUN_FLWR_NOISE_ENABLED=0 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.0 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 5' 2>&1 | tee "$date_time"_results_20_R_5_C_0_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=20 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=1.0 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 5' 2>&1 | tee "$date_time"_results_20_R_5_C_1.0_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=20 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.5 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 5' 2>&1 | tee "$date_time"_results_20_R_5_C_0.5_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=20 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.1 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 5' 2>&1 | tee "$date_time"_results_20_R_5_C_0.1_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=20 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.05 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 5' 2>&1 | tee "$date_time"_results_20_R_5_C_0.05_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=20 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.01 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 5' 2>&1 | tee "$date_time"_results_20_R_5_C_0.01_NOISE.txt





HOKEUN_FLWR_NUM_ROUNDS=20 HOKEUN_FLWR_NOISE_ENABLED=0 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.0 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 10' 2>&1 | tee "$date_time"_results_20_R_10_C_0_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=20 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=1.0 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 10' 2>&1 | tee "$date_time"_results_20_R_10_C_1.0_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=20 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.5 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 10' 2>&1 | tee "$date_time"_results_20_R_10_C_0.5_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=20 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.1 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 10' 2>&1 | tee "$date_time"_results_20_R_10_C_0.1_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=20 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.05 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 10' 2>&1 | tee "$date_time"_results_20_R_10_C_0.05_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=20 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.01 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 10' 2>&1 | tee "$date_time"_results_20_R_10_C_0.01_NOISE.txt

47 changes: 47 additions & 0 deletions examples/app-pytorch/run_experiments_50_rounds.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

# Make sure to run poetry shell first!

date_time=$(date '+%Y_%m_%d_%H%M%S');

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=0 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.0 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 5' 2>&1 | tee "$date_time"_results_50_R_5_C_0_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=1.0 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 5' 2>&1 | tee "$date_time"_results_50_R_5_C_1.0_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.5 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 5' 2>&1 | tee "$date_time"_results_50_R_5_C_0.5_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.1 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 5' 2>&1 | tee "$date_time"_results_50_R_5_C_0.1_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.05 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 5' 2>&1 | tee "$date_time"_results_50_R_5_C_0.05_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.01 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 5' 2>&1 | tee "$date_time"_results_50_R_5_C_0.01_NOISE.txt




HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=0 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.0 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 10' 2>&1 | tee "$date_time"_results_50_R_10_C_0_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=1.0 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 10' 2>&1 | tee "$date_time"_results_50_R_10_C_1.0_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.5 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 10' 2>&1 | tee "$date_time"_results_50_R_10_C_0.5_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.1 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 10' 2>&1 | tee "$date_time"_results_50_R_10_C_0.1_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.05 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 10' 2>&1 | tee "$date_time"_results_50_R_10_C_0.05_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.01 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 10' 2>&1 | tee "$date_time"_results_50_R_10_C_0.01_NOISE.txt




HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=0 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.0 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 20' 2>&1 | tee "$date_time"_results_50_R_20_C_0_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=1.0 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 20' 2>&1 | tee "$date_time"_results_50_R_20_C_1.0_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.5 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 20' 2>&1 | tee "$date_time"_results_50_R_20_C_0.5_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.1 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 20' 2>&1 | tee "$date_time"_results_50_R_20_C_0.1_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.05 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 20' 2>&1 | tee "$date_time"_results_50_R_20_C_0.05_NOISE.txt

HOKEUN_FLWR_NUM_ROUNDS=50 HOKEUN_FLWR_NOISE_ENABLED=1 HOKEUN_FLWR_GAUSS_NOISE_SIGMA=0.01 bash -c 'flower-simulation --server-app server:app --client-app client:app --num-supernodes 20' 2>&1 | tee "$date_time"_results_50_R_20_C_0.01_NOISE.txt
Loading