Simple implementation of blockchain-based federated learning.
Note: This only works on python 3.9
How to run the code:
- Install
Ganache
orHardhat Network
- Install
solc
for Ethereum:
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
- Run the local Eth Network, i.e., either
Ganache
orHardhat Network
. - You may want to use virtual environment on python.
- Install python dependencies:
pip install -r requirements.txt
- Run the python code:
python federated.py