forked from Krith-man/FedGreed
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_experiments.sh
More file actions
executable file
·34 lines (28 loc) · 1.24 KB
/
Copy pathrun_experiments.sh
File metadata and controls
executable file
·34 lines (28 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
DATASETS="CIFAR10 FMNIST MNIST"
STRATEGIES="FedGreed Krum Multi-Krum Median Trimmed-Mean Mean"
MALICIOUS_USERS="8 5 3"
for m in $MALICIOUS_USERS
do
for d in $DATASETS
do
for s in $STRATEGIES
do
echo "Handling no attack under strategy: $s for dataset: $d with $m malicious users"
YAML_FILE="configs/config_no_attack.yaml"
yq -i -y ".server.strategy = \"$s\" | .model.name = \"$d\"" "$YAML_FILE"
export config_file_name="config_no_attack"
poetry run simulation
echo "Handling Label-FLipping attack under strategy: $s for dataset: $d with $m malicious users"
YAML_FILE="configs/config_data_attack.yaml"
yq -i -y ".server.strategy = \"$s\" | .attack.num_malicious_clients = $m | .model.name = \"$d\"" "$YAML_FILE"
export config_file_name="config_data_attack"
poetry run simulation
echo "Handling Gaussian Noise attack under strategy: $s for dataset: $d with $m malicious users"
YAML_FILE="configs/config_model_attack.yaml"
yq -i -y ".server.strategy = \"$s\" | .attack.num_malicious_clients = $m | .model.name = \"$d\" | .attack.type = \"Gaussian Noise\"" "$YAML_FILE"
export config_file_name="config_model_attack"
poetry run simulation
done
done
done