-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathattack_timing.py
24 lines (22 loc) · 998 Bytes
/
attack_timing.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from federated_learning.utils import replace_0_with_2
from federated_learning.utils import replace_5_with_3
from federated_learning.utils import replace_1_with_9
from federated_learning.utils import replace_4_with_6
from federated_learning.utils import replace_1_with_3
from federated_learning.utils import replace_6_with_0
from federated_learning.worker_selection import BeforeBreakpoint
from federated_learning.worker_selection import AfterBreakpoint
from server import run_exp
if __name__ == '__main__':
START_EXP_IDX = 900
NUM_EXP = 1
NUM_POISONED_WORKERS = 25
REPLACEMENT_METHOD = replace_1_with_9
KWARGS = {
"BeforeBreakPoint_EPOCH" : 75,
"BeforeBreakpoint_NUM_WORKERS_PER_ROUND" : 5,
"AfterBreakPoint_EPOCH" : 75,
"AfterBreakpoint_NUM_WORKERS_PER_ROUND" : 5,
}
for experiment_id in range(START_EXP_IDX, START_EXP_IDX + NUM_EXP):
run_exp(REPLACEMENT_METHOD, NUM_POISONED_WORKERS, KWARGS, AfterBreakpoint(), experiment_id)