Skip to content

Commit eaa142f

Browse files
committed
make project public
1 parent 8fa2381 commit eaa142f

2 files changed

Lines changed: 31 additions & 13 deletions

File tree

LICENSE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
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.

code/README.md renamed to README.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff 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
217

318
`fleaf` is the name of the framework devised in this thesis project. There are 3 components:
419

5-
- `fleafapi`
20+
- [`fleafapi`](code/fleafapi)
621

722
`fleafapi` is a low-dependency collection of interfaces that describe which methods a service should support in order to be interoperable with `fleaf`.
823

9-
- `fleaf`: _Federated Learning Energy-Aware Framework_
24+
- [`fleaf`](code/fleaf): _Federated Learning Energy-Aware Framework_
1025

1126
The `fleaf` component provides an easy-to-use integration into the `flwr` framework.
1227
This is done by
1328
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.
1429
2. providing a `Strategy` wrapper which collects and aggregates measurements from FL clients.
1530

16-
- `flessim`: _`fleafapi` + `vessim`_
31+
- [`flessim`](code/flessim): _`fleafapi` + `vessim`_
1732

1833
`flessim` is an implementation of a `fleafapi` HTTP service.
1934
It provides details about the energy dynamics of a user-defined energy network through simulation using `vessim`.
2035

2136
`fleaf` and `flessim` are independent of each other, each only depending on `fleafapi`.
2237
Yet, they complement each other, making it easy to prototype energy- and carbon-aware solutions to federated learning.
2338

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-
3239
# Try it out
3340

3441
1. clone the repository via
@@ -54,4 +61,4 @@ Yet, they complement each other, making it easy to prototype energy- and carbon-
5461
python3 -m examples.fleaf_simple
5562
```
5663
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

Comments
 (0)