-
-
Notifications
You must be signed in to change notification settings - Fork 744
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from FedML-AI/master
Update the repo
- Loading branch information
Showing
402 changed files
with
13,306 additions
and
7,986 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
env: | ||
- ARCH=x86 | ||
dist: bionic | ||
os: | ||
- linux | ||
language: python | ||
sudo: false | ||
python: | ||
- "3.7.4" | ||
install: | ||
- "bash CI-install.sh" | ||
script: | ||
- "bash CI-script-framework.sh" | ||
- "bash CI-script-fedavg.sh" | ||
- "bash CI-script-fednas.sh" | ||
- "bash CI-script-fedavg-robust.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
# install pyflakes to do code error checking | ||
echo "pip3 install pyflakes --cache-dir $HOME/.pip-cache" | ||
pip3 install pyflakes --cache-dir $HOME/.pip-cache | ||
|
||
# Conda Installation | ||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh | ||
bash miniconda.sh -b -p $HOME/miniconda | ||
source "$HOME/miniconda/etc/profile.d/conda.sh" | ||
hash -r | ||
conda config --set always_yes yes --set changeps1 no | ||
conda update -q conda | ||
conda info -a | ||
|
||
echo "conda create -n fedml python=3.7.4" | ||
conda create -n fedml python=3.7.4 | ||
|
||
echo "conda activate fedml" | ||
conda activate fedml | ||
|
||
# Install PyTorch (please visit pytorch.org to check your version according to your physical machines | ||
conda install pytorch torchvision cudatoolkit=10.2 -c pytorch | ||
|
||
# Install MPI | ||
conda install -c anaconda mpi4py | ||
|
||
# Install Wandb | ||
pip install --upgrade wandb | ||
|
||
# Install other required package | ||
conda install scikit-learn | ||
conda install numpy | ||
conda install setproctitle | ||
conda install networkx | ||
|
||
cd ./fedml_mobile/server/executor | ||
pip install -r requirements.txt | ||
cd ./../../../ | ||
|
||
# install the dataset | ||
# 1. MNIST | ||
cd ./data/MNIST | ||
sh download_and_unzip.sh | ||
cd ../../ | ||
|
||
# 2. CIFAR10 | ||
cd ./data/cifar10 | ||
sh download_cifar10.sh | ||
cd ../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
# code checking | ||
pyflakes . | ||
|
||
# activate the fedml environment | ||
source "$HOME/miniconda/etc/profile.d/conda.sh" | ||
conda activate fedml | ||
|
||
wandb login ee0b5f53d949c84cee7decbe7a629e63fb2f8408 | ||
wandb off | ||
|
||
# 1. CIFAR10 FedAvg-Robust | ||
cd ./fedml_experiments/distributed/fedavg_robust | ||
sh run_fedavg_robust_distributed_pytorch.sh 10 10 1 8 resnet56 homo 100 20 64 0.001 cifar10 "./../../../data/cifar10" weak-dp 5.0 0.025 & | ||
|
||
sleep 120 | ||
killall mpirun | ||
cd ./../../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
# code checking | ||
pyflakes . | ||
|
||
# activate the fedml environment | ||
source "$HOME/miniconda/etc/profile.d/conda.sh" | ||
conda activate fedml | ||
|
||
wandb login ee0b5f53d949c84cee7decbe7a629e63fb2f8408 | ||
wandb off | ||
|
||
# 1. MNIST standalone FedAvg | ||
cd ./fedml_experiments/standalone/fedavg | ||
sh run_fedavg_standalone_pytorch.sh 2 10 10 mnist ./../../../data/mnist lr hetero 2 2 0.03 | ||
cd ./../../../ | ||
|
||
|
||
|
||
# 2. MNIST distributed FedAvg | ||
cd ./fedml_experiments/distributed/fedavg | ||
sh run_fedavg_distributed_pytorch.sh 4 4 1 4 lr hetero 2 2 2 0.03 mnist "./../../../data/mnist" & | ||
|
||
sleep 60 | ||
killall mpirun | ||
cd ./../../../ | ||
|
||
# 3. MNIST mobile FedAvg | ||
cd ./fedml_mobile/server/executor/ | ||
python3 app.py & | ||
bg_pid_server=$! | ||
echo "pid="$bg_pid_server | ||
|
||
sleep 30 | ||
python3 ./mobile_client_simulator.py --client_uuid '0' & | ||
bg_pid_client0=$! | ||
echo $bg_pid_client0 | ||
|
||
python3 ./mobile_client_simulator.py --client_uuid '1' & | ||
bg_pid_client1=$! | ||
echo $bg_pid_client1 | ||
|
||
sleep 80 | ||
kill $bg_pid_server | ||
kill $bg_pid_client0 | ||
kill $bg_pid_client1 | ||
|
||
cd ./../../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
# code checking | ||
pyflakes . | ||
|
||
# activate the fedml environment | ||
source "$HOME/miniconda/etc/profile.d/conda.sh" | ||
conda activate fedml | ||
|
||
wandb login ee0b5f53d949c84cee7decbe7a629e63fb2f8408 | ||
wandb off | ||
|
||
# 1. search | ||
cd ./fedml_experiments/distributed/fednas/ | ||
sh run_fednas_search.sh 1 4 darts homo 50 5 2 & | ||
|
||
sleep 60 | ||
killall mpirun | ||
cd ./../../../ | ||
|
||
# 2. train | ||
cd ./fedml_experiments/distributed/fednas/ | ||
sh run_fednas_train.sh 1 4 darts homo 500 15 2 & | ||
|
||
sleep 60 | ||
killall mpirun | ||
cd ./../../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
# code checking | ||
pyflakes . | ||
|
||
# activate the fedml environment | ||
source "$HOME/miniconda/etc/profile.d/conda.sh" | ||
conda activate fedml | ||
|
||
wandb login ee0b5f53d949c84cee7decbe7a629e63fb2f8408 | ||
wandb off | ||
|
||
# 1. distributed base framework | ||
cd ./fedml_experiments/distributed/base | ||
sh run_base_distributed_pytorch.sh & | ||
|
||
sleep 15 | ||
killall mpirun | ||
cd ./../../../ | ||
|
||
# 2. decentralized base framework | ||
cd ./fedml_experiments/distributed/decentralized_demo | ||
sh run_decentralized_demo_distributed_pytorch.sh & | ||
|
||
sleep 15 | ||
killall mpirun | ||
cd ./../../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Installation | ||
|
||
Please follow CI-install.sh for step-by-step installation. | ||
|
||
|
Oops, something went wrong.