Written as part of a PhD research rotation in Winter 2021 as a part of the Autonomous Systems Lab under Professor Marco Pavone
Paper Link: https://drive.google.com/file/d/1GvfAKxxFkInUe_8MVJKWhXGdy0RAgIo9/view?usp=sharing
fedadmm_*.py
: Code to run a personalized federated learningADMM_*.py
: Helper repos that run various versions of ADMMutils.py
: Helper scripts (mostlylatexify()
for nice figure generation)tests\
repolqr_*.py
: Test code to see how an LQR controller behaves given different configurations. Replaced by the functionsimulate()
infedadmm_*.py
test_*.py
: Various test scripts I wrote over the course of the quarter to test different Python modules or configurations_*.m
: More test scripts, except in MATLAB
generate_figures
repo: The scripts used to generate the paper's figuresdata
repo: Where all data fromfedadmm_*.py
scripts are storedfigures
repo: Where all figures fromfedadmm_*.py
scripts are storedfigures_final
repo: Where the paper's figures are stored
Note that the data
and figures
folders are empty right now. To access the actual data and figures I amassed over my quarter,
an interested reader can revert back to the tagged commit final_writeup
to download all the files.
Unfortunately, installation instructions for this repo are kinda a pain. Sorry! The main reason is that CVXPY's SCS
solver implementation doesn't work for matrices larger than 2x2 (as of 3/22/2021) unless you have it installed with blas+lapack
,
but you can only install that if you have numpy
with the mkl
extension installed.
I used Python 3.7 in an Anaconda virtual environment, if that helps.
Install the following packages (in roughly the following order) from this link (or any alternative link that kindly provides binaries of these libraries for your given Python version: https://www.lfd.uci.edu/~gohlke/pythonlibs/)
- numpy+mkl
- scipy
- scs
- cvxopt
- ecos
- osqp
- cvxpy
- matplotlib
- slycot (you don't need it for this library, but it's super common for other controls packages and this is the only way I've gotten it to work on Windows. Life hacks!)
The default script I used for the paper is fedadmm.py
, and the default ADMM script that I used was ADMM_slack.py
The installation was the hard part. Now you should be able to just run python fedadmm.py
with your Conda environment active.