You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This license applies to all files besides the `writing`and `code/examples/fedzero` subdirectory.
2
+
3
+
The MIT License (MIT)
4
+
5
+
Copyright (c) 2024-2025 Ovidiu Victor Tătar (Impelon)
6
+
7
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
+
9
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
+
11
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copy file name to clipboardExpand all lines: README.md
+20-13Lines changed: 20 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,41 @@
1
-
# Introduction
1
+
# About
2
+
3
+
This project aimed at designing and implementing a general framework for energy-aware federated learning, supporting both simulations and physical deployments.
4
+
The framework is evaluated through multiple case studies, that showcase the benefits of the architectural design and feature set. This includes a case study of running a previously proposed carbon-aware client selection algorithm ([FedZero](https://github.com/dos-group/fedzero)) with real-time energy measurements.
5
+
Skim through the [accompanying thesis](writing/thesis.pdf) for more details on the architecture, case studies and limitations of the approach.
6
+
7
+
8
+
## General Idea behind `fleaf`
9
+
10
+
- Each FL Client runs its training, but is able to speak to its (local) energy system via a socket API (TCP/Unix) providing a stateless HTTP (REST) service.
11
+
- Each Client reports back on its energy consumption, battery level, etc. (which it collected through the HTTP service).
12
+
- The FL Server / Coordinator archives the information received by the clients and may take (selection) decisions based on it.
13
+
- In principle, the HTTP service of each Client could run anywhere. In a real-world scenario it would probably run on the same system as the Client, or in the same local network.
14
+
- In our case, the energy systems are simulated through `flessim` but can also include real-time measurements of the physical hardware. A central thread simulates all microgrids via Vessim, and a separate API instance is created for each microgrid that runs in a separate thread.
15
+
16
+
## Components
2
17
3
18
`fleaf` is the name of the framework devised in this thesis project. There are 3 components:
4
19
5
-
-`fleafapi`
20
+
-[`fleafapi`](code/fleafapi)
6
21
7
22
`fleafapi` is a low-dependency collection of interfaces that describe which methods a service should support in order to be interoperable with `fleaf`.
The `fleaf` component provides an easy-to-use integration into the `flwr` framework.
12
27
This is done by
13
28
1. providing extensions to FL clients that allow them to interact with a service (cohering to the semantics of `fleafapi`) to make queries about their energy usage and carbon footprint.
14
29
2. providing a `Strategy` wrapper which collects and aggregates measurements from FL clients.
`flessim` is an implementation of a `fleafapi` HTTP service.
19
34
It provides details about the energy dynamics of a user-defined energy network through simulation using `vessim`.
20
35
21
36
`fleaf` and `flessim` are independent of each other, each only depending on `fleafapi`.
22
37
Yet, they complement each other, making it easy to prototype energy- and carbon-aware solutions to federated learning.
23
38
24
-
## General Idea behind `fleaf`
25
-
26
-
- Each FL Client runs its training, but is able to speak to its (local) energy system via a socket API (TCP/Unix) providing a stateless HTTP (REST) service.
27
-
- Each Client reports back on its energy consumption, battery level, etc. (which it collected through the HTTP service).
28
-
- The FL Server / Coordinator archives the information received by the clients and may take (selection) decisions based on it.
29
-
- In principle, the HTTP service of each Client could run anywhere. In a real-world scenario it would probably run on the same system as the Client, or in the same local network.
30
-
- In our case, the energy systems are simulated through `flessim` but can also include real-time measurements of the physical hardware. A central thread simulates all microgrids via Vessim, and a separate API instance is created for each microgrid that runs in a separate thread.
31
-
32
39
# Try it out
33
40
34
41
1. clone the repository via
@@ -54,4 +61,4 @@ Yet, they complement each other, making it easy to prototype energy- and carbon-
54
61
python3 -m examples.fleaf_simple
55
62
```
56
63
57
-
See [`examples/fedzero`](./examples/fedzero) for a more intricate example of how to use fleaf with an existing carbon-aware FL algorithm.
64
+
See [`code/examples/fedzero`](./code/examples/fedzero) for a more intricate example of how to use fleaf with an existing carbon-aware FL algorithm.
0 commit comments