-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfl_config.py
More file actions
20 lines (18 loc) · 1.22 KB
/
fl_config.py
File metadata and controls
20 lines (18 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
TIMESTEP_IN_MIN = 1
MAX_ROUND_IN_MIN = 60
STOPPING_CRITERIA = None # number of rounds without improved accuracy
BATCH_SIZE = 10
# These are the client's capabilities as assumed before letting a client participate once.
# Here we assume low-end, energy-inefficient GPUs (50 examples per second at 300W), with the
# idea to minimize the risk of emissions because of overconfidence in the client's energy efficiency.
# (examples / second) * (second / minute) * (batch / examples) = batch / minute
ASSUMED_BATCHES_PER_MINUTE = 50 * 60 / BATCH_SIZE
# watt * (second / examples) * (examples / batch) = wattsecond / batch
ASSUMED_JOULES_PER_BATCH = (300 / 50) * BATCH_SIZE
assumed_batches_available = 10
ASSUMED_SAMPLES_AVAILABLE = assumed_batches_available * BATCH_SIZE
# This is the excess renewables assumed to be available at a certain power domain before
# letting one of its clients participate once. Only a low amount of renewable power
# is assumed (enough for 10 batches per timestep = assumed epoch size), in order to not overcommit.
# batch * (joules / batch) * minute * (minute / second) / 1000 = joules / second / 1000 = kilowatt
ASSUMED_EXCESS_RENEWABLES = assumed_batches_available * ASSUMED_JOULES_PER_BATCH * (TIMESTEP_IN_MIN / 60) / 1000