diff --git a/results-v2/intro-mnist-2-shards-eq-classes-fc.sh b/results-v2/intro-mnist-2-shards-eq-classes-fc.sh new file mode 100755 index 0000000000000000000000000000000000000000..dc3fa5fed48e36a818561911ca9fc9b0d56b2d7e --- /dev/null +++ b/results-v2/intro-mnist-2-shards-eq-classes-fc.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# Path to current script +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +TOOLS=$SCRIPT_DIR/$(cat toolspath); cd $TOOLS + +# Add current working directory to executable namespace +export PATH=$PATH:$TOOLS +# Setup root directory for resolution of imports: +# the path of all local python libraries are relative to this +export PYTHONPATH=$TOOLS + +# Each command outputs the run directory, which is then used +# by the next command to add parameters and generate information +# used by the simulator. For a list of available options for each +# command, run 'export PYTHONPATH=.; <command> --help'. +for SEED in 1 2 3; do +setup/meta.py \ + --results-directory $SCRIPT_DIR/tmp \ + --seed $SEED | +setup/dataset.py \ + --name mnist \ + --train-examples-per-class 4500 4500 4500 4500 4500 4500 4500 4500 4500 4500 | +setup/nodes/google-fl.py \ + --name 2-shards-eq-classes \ + --nb-nodes 100 \ + --local-shards 2 \ + --shard-size 225 | +setup/topology/fully-connected.py | +setup/model/linear.py | +simulate/algorithm/d_sgd.py \ + --batch-size 128 \ + --learning-momentum 0.0 \ + --learning-rate 0.1 | +simulate/logger.py \ + --nb-processes 8 | +simulate/run.py \ + --nb-epochs 100; +done diff --git a/results-v2/intro-mnist-2-shards-eq-classes-grid.sh b/results-v2/intro-mnist-2-shards-eq-classes-grid.sh new file mode 100755 index 0000000000000000000000000000000000000000..dae95c67007ec0a8bd7d27124892ac08b454b515 --- /dev/null +++ b/results-v2/intro-mnist-2-shards-eq-classes-grid.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Path to current script +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +TOOLS=$SCRIPT_DIR/$(cat toolspath); cd $TOOLS + +# Add current working directory to executable namespace +export PATH=$PATH:$TOOLS +# Setup root directory for resolution of imports: +# the path of all local python libraries are relative to this +export PYTHONPATH=$TOOLS + +# Each command outputs the run directory, which is then used +# by the next command to add parameters and generate information +# used by the simulator. For a list of available options for each +# command, run 'export PYTHONPATH=.; <command> --help'. +for SEED in 1 2 3; do +setup/meta.py \ + --results-directory $SCRIPT_DIR/tmp \ + --seed $SEED | +setup/dataset.py \ + --name mnist \ + --train-examples-per-class 4500 4500 4500 4500 4500 4500 4500 4500 4500 4500 | +setup/nodes/google-fl.py \ + --name 2-shards-eq-classes \ + --nb-nodes 100 \ + --local-shards 2 \ + --shard-size 225 | +setup/topology/grid.py \ + --metric random | +setup/model/linear.py | +simulate/algorithm/d_sgd.py \ + --batch-size 128 \ + --learning-momentum 0.0 \ + --learning-rate 0.1 | +simulate/logger.py \ + --nb-processes 8 | +simulate/run.py \ + --nb-epochs 100; +done diff --git a/results-v2/intro-mnist-2-shards-eq-classes-ring.sh b/results-v2/intro-mnist-2-shards-eq-classes-ring.sh new file mode 100755 index 0000000000000000000000000000000000000000..60e80565e3124a7c1f1f2c23f01eabedf4f9252a --- /dev/null +++ b/results-v2/intro-mnist-2-shards-eq-classes-ring.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Path to current script +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +TOOLS=$SCRIPT_DIR/$(cat toolspath); cd $TOOLS + +# Add current working directory to executable namespace +export PATH=$PATH:$TOOLS +# Setup root directory for resolution of imports: +# the path of all local python libraries are relative to this +export PYTHONPATH=$TOOLS + +# Each command outputs the run directory, which is then used +# by the next command to add parameters and generate information +# used by the simulator. For a list of available options for each +# command, run 'export PYTHONPATH=.; <command> --help'. +for SEED in 1 2 3; do +setup/meta.py \ + --results-directory $SCRIPT_DIR/tmp \ + --seed $SEED | +setup/dataset.py \ + --name mnist \ + --train-examples-per-class 4500 4500 4500 4500 4500 4500 4500 4500 4500 4500 | +setup/nodes/google-fl.py \ + --name 2-shards-eq-classes \ + --nb-nodes 100 \ + --local-shards 2 \ + --shard-size 225 | +setup/topology/ring.py \ + --metric random | +setup/model/linear.py | +simulate/algorithm/d_sgd.py \ + --batch-size 128 \ + --learning-momentum 0.0 \ + --learning-rate 0.1 | +simulate/logger.py \ + --nb-processes 8 | +simulate/run.py \ + --nb-epochs 100; +done diff --git a/results-v2/intro-mnist-iid-eq-classes-fc.sh b/results-v2/intro-mnist-iid-eq-classes-fc.sh new file mode 100755 index 0000000000000000000000000000000000000000..4ed9f6bd6d29d3f905f9a284886eec502bfa0a7c --- /dev/null +++ b/results-v2/intro-mnist-iid-eq-classes-fc.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# Path to current script +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +TOOLS=$SCRIPT_DIR/$(cat toolspath); cd $TOOLS + +# Add current working directory to executable namespace +export PATH=$PATH:$TOOLS +# Setup root directory for resolution of imports: +# the path of all local python libraries are relative to this +export PYTHONPATH=$TOOLS + +# Each command outputs the run directory, which is then used +# by the next command to add parameters and generate information +# used by the simulator. For a list of available options for each +# command, run 'export PYTHONPATH=.; <command> --help'. +for SEED in 1 2 3; do +setup/meta.py \ + --results-directory $SCRIPT_DIR/tmp \ + --seed $SEED | +setup/dataset.py \ + --name mnist \ + --train-examples-per-class 4500 4500 4500 4500 4500 4500 4500 4500 4500 4500 | +setup/nodes.py \ + --name iid-eq-classes \ + --nb-nodes 100 \ + --local-classes 10 \ + --nodes-per-class 100 100 100 100 100 100 100 100 100 100 | +setup/topology/fully-connected.py | +setup/model/linear.py | +simulate/algorithm/d_sgd.py \ + --batch-size 128 \ + --learning-momentum 0.0 \ + --learning-rate 0.1 | +simulate/logger.py \ + --nb-processes 8 | +simulate/run.py \ + --nb-epochs 100; +done diff --git a/results-v2/intro-mnist-iid-eq-classes-grid.sh b/results-v2/intro-mnist-iid-eq-classes-grid.sh new file mode 100755 index 0000000000000000000000000000000000000000..b7ac1f8b703cba9ca43885449a41833016192ee1 --- /dev/null +++ b/results-v2/intro-mnist-iid-eq-classes-grid.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Path to current script +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +TOOLS=$SCRIPT_DIR/$(cat toolspath); cd $TOOLS + +# Add current working directory to executable namespace +export PATH=$PATH:$TOOLS +# Setup root directory for resolution of imports: +# the path of all local python libraries are relative to this +export PYTHONPATH=$TOOLS + +# Each command outputs the run directory, which is then used +# by the next command to add parameters and generate information +# used by the simulator. For a list of available options for each +# command, run 'export PYTHONPATH=.; <command> --help'. +for SEED in 1 2 3; do +setup/meta.py \ + --results-directory $SCRIPT_DIR/tmp \ + --seed $SEED | +setup/dataset.py \ + --name mnist \ + --train-examples-per-class 4500 4500 4500 4500 4500 4500 4500 4500 4500 4500 | +setup/nodes.py \ + --name iid-eq-classes \ + --nb-nodes 100 \ + --local-classes 10 \ + --nodes-per-class 100 100 100 100 100 100 100 100 100 100 | +setup/topology/grid.py \ + --metric random | +setup/model/linear.py | +simulate/algorithm/d_sgd.py \ + --batch-size 128 \ + --learning-momentum 0.0 \ + --learning-rate 0.1 | +simulate/logger.py \ + --nb-processes 8 | +simulate/run.py \ + --nb-epochs 100; +done diff --git a/results-v2/intro-mnist-iid-eq-classes-ring.sh b/results-v2/intro-mnist-iid-eq-classes-ring.sh new file mode 100755 index 0000000000000000000000000000000000000000..5c1ff974100cce1e4513c6bdccdb4cab02029280 --- /dev/null +++ b/results-v2/intro-mnist-iid-eq-classes-ring.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Path to current script +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +TOOLS=$SCRIPT_DIR/$(cat toolspath); cd $TOOLS + +# Add current working directory to executable namespace +export PATH=$PATH:$TOOLS +# Setup root directory for resolution of imports: +# the path of all local python libraries are relative to this +export PYTHONPATH=$TOOLS + +# Each command outputs the run directory, which is then used +# by the next command to add parameters and generate information +# used by the simulator. For a list of available options for each +# command, run 'export PYTHONPATH=.; <command> --help'. +for SEED in 1 2 3; do +setup/meta.py \ + --results-directory $SCRIPT_DIR/tmp \ + --seed $SEED | +setup/dataset.py \ + --name mnist \ + --train-examples-per-class 4500 4500 4500 4500 4500 4500 4500 4500 4500 4500 | +setup/nodes.py \ + --name iid-eq-classes \ + --nb-nodes 100 \ + --local-classes 10 \ + --nodes-per-class 100 100 100 100 100 100 100 100 100 100 | +setup/topology/ring.py \ + --metric random | +setup/model/linear.py | +simulate/algorithm/d_sgd.py \ + --batch-size 128 \ + --learning-momentum 0.0 \ + --learning-rate 0.1 | +simulate/logger.py \ + --nb-processes 8 | +simulate/run.py \ + --nb-epochs 100; +done diff --git a/results-v2/intro-mnist-max-local-skew-fc.sh b/results-v2/intro-mnist-max-local-skew-fc.sh new file mode 100755 index 0000000000000000000000000000000000000000..12af7bbdfa71858bea02fa5a87f65b441aacf7bb --- /dev/null +++ b/results-v2/intro-mnist-max-local-skew-fc.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# Path to current script +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +TOOLS=$SCRIPT_DIR/$(cat toolspath); cd $TOOLS + +# Add current working directory to executable namespace +export PATH=$PATH:$TOOLS +# Setup root directory for resolution of imports: +# the path of all local python libraries are relative to this +export PYTHONPATH=$TOOLS + +# Each command outputs the run directory, which is then used +# by the next command to add parameters and generate information +# used by the simulator. For a list of available options for each +# command, run 'export PYTHONPATH=.; <command> --help'. +for SEED in 1 2 3; do +setup/meta.py \ + --results-directory $SCRIPT_DIR/tmp \ + --seed $SEED | +setup/dataset.py \ + --name mnist \ + --train-examples-per-class 4500 4500 4500 4500 4500 4500 4500 4500 4500 4500 | +setup/nodes.py \ + --name max-local-skew \ + --nb-nodes 100 \ + --local-classes 1 \ + --nodes-per-class 10 10 10 10 10 10 10 10 10 10 | +setup/topology/fully-connected.py | +setup/model/linear.py | +simulate/algorithm/d_sgd.py \ + --batch-size 128 \ + --learning-momentum 0.0 \ + --learning-rate 0.1 | +simulate/logger.py \ + --nb-processes 8 | +simulate/run.py \ + --nb-epochs 100; +done diff --git a/results-v2/intro-mnist-max-local-skew-grid.sh b/results-v2/intro-mnist-max-local-skew-grid.sh new file mode 100755 index 0000000000000000000000000000000000000000..7846d946601ed45fe5bb70a335ebd6079a4f9c77 --- /dev/null +++ b/results-v2/intro-mnist-max-local-skew-grid.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Path to current script +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +TOOLS=$SCRIPT_DIR/$(cat toolspath); cd $TOOLS + +# Add current working directory to executable namespace +export PATH=$PATH:$TOOLS +# Setup root directory for resolution of imports: +# the path of all local python libraries are relative to this +export PYTHONPATH=$TOOLS + +# Each command outputs the run directory, which is then used +# by the next command to add parameters and generate information +# used by the simulator. For a list of available options for each +# command, run 'export PYTHONPATH=.; <command> --help'. +for SEED in 1 2 3; do +setup/meta.py \ + --results-directory $SCRIPT_DIR/tmp \ + --seed $SEED | +setup/dataset.py \ + --name mnist \ + --train-examples-per-class 4500 4500 4500 4500 4500 4500 4500 4500 4500 4500 | +setup/nodes.py \ + --name max-local-skew \ + --nb-nodes 100 \ + --local-classes 1 \ + --nodes-per-class 10 10 10 10 10 10 10 10 10 10 | +setup/topology/grid.py \ + --metric random | +setup/model/linear.py | +simulate/algorithm/d_sgd.py \ + --batch-size 128 \ + --learning-momentum 0.0 \ + --learning-rate 0.1 | +simulate/logger.py \ + --nb-processes 8 | +simulate/run.py \ + --nb-epochs 100; +done diff --git a/results-v2/intro-mnist-max-local-skew-ring.sh b/results-v2/intro-mnist-max-local-skew-ring.sh new file mode 100755 index 0000000000000000000000000000000000000000..35eeb1464912008a126e468843963a228cc8076d --- /dev/null +++ b/results-v2/intro-mnist-max-local-skew-ring.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Path to current script +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +TOOLS=$SCRIPT_DIR/$(cat toolspath); cd $TOOLS + +# Add current working directory to executable namespace +export PATH=$PATH:$TOOLS +# Setup root directory for resolution of imports: +# the path of all local python libraries are relative to this +export PYTHONPATH=$TOOLS + +# Each command outputs the run directory, which is then used +# by the next command to add parameters and generate information +# used by the simulator. For a list of available options for each +# command, run 'export PYTHONPATH=.; <command> --help'. +for SEED in 1 2 3; do +setup/meta.py \ + --results-directory $SCRIPT_DIR/tmp \ + --seed $SEED | +setup/dataset.py \ + --name mnist \ + --train-examples-per-class 4500 4500 4500 4500 4500 4500 4500 4500 4500 4500 | +setup/nodes.py \ + --name max-local-skew \ + --nb-nodes 100 \ + --local-classes 1 \ + --nodes-per-class 10 10 10 10 10 10 10 10 10 10 | +setup/topology/ring.py \ + --metric random | +setup/model/linear.py | +simulate/algorithm/d_sgd.py \ + --batch-size 128 \ + --learning-momentum 0.0 \ + --learning-rate 0.1 | +simulate/logger.py \ + --nb-processes 8 | +simulate/run.py \ + --nb-epochs 100; +done diff --git a/results-v2/mnist/grid/iid/experiments.sh b/results-v2/mnist/grid/iid/experiments.sh index 875acd3e4052cced41982f082e6bbc7373b2344c..16464bafadb54e7cba664281ae18fdbbaafe5f10 100755 --- a/results-v2/mnist/grid/iid/experiments.sh +++ b/results-v2/mnist/grid/iid/experiments.sh @@ -18,7 +18,7 @@ setup/meta.py \ --seed 1 | setup/dataset.py \ --name mnist \ - --global-train-ratios 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 | + --train-examples-per-class 4500 4500 4500 4500 4500 4500 4500 4500 4500 4500 | setup/nodes.py \ --nb-nodes 100 \ --local-classes 10 \ @@ -30,6 +30,7 @@ simulate/algorithm/d_sgd.py \ --batch-size 128 \ --learning-momentum 0.0 \ --learning-rate 0.1 | -simulate/logger.py | +simulate/logger.py \ + --accuracy-logging-interval 10 | simulate/run.py \ --nb-epochs 100 diff --git a/results-v2/mnist/ring/iid/experiments.sh b/results-v2/mnist/ring/iid/experiments.sh index 93b1047fb0ef4359db44bccc9b4a064cc060f39b..e24b85cbb38043500c0e09e5837d42ceb4de79f6 100755 --- a/results-v2/mnist/ring/iid/experiments.sh +++ b/results-v2/mnist/ring/iid/experiments.sh @@ -9,16 +9,18 @@ export PATH=$PATH:$TOOLS # the path of all local python libraries are relative to this export PYTHONPATH=$TOOLS +for LR in 0.04 0.05; do # Each command outputs the run directory, which is then used # by the next command to add parameters and generate information # used by the simulator. For a list of available options for each # command, run 'export PYTHONPATH=.; <command> --help'. setup/meta.py \ - --results-directory $SCRIPT_DIR/all \ + --results-directory $SCRIPT_DIR/test \ --seed 1 | setup/dataset.py \ --name mnist \ - --global-train-ratios 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 | + --train-examples-per-class 4500 4500 4500 4500 4500 4500 4500 4500 4500 4500 | + #--global-train-ratios 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 | setup/nodes.py \ --nb-nodes 100 \ --local-classes 10 \ @@ -29,8 +31,10 @@ setup/model/linear.py | simulate/algorithm/d_sgd.py \ --batch-size 128 \ --learning-momentum 0.0 \ - --learning-rate 0.1 | -simulate/logger.py | + --learning-rate $LR | +simulate/logger.py \ + --accuracy-logging-interval 5 \ + --nb-processes 2 | simulate/run.py \ - --nb-epochs 100 - + --nb-epochs 20; +done diff --git a/results-v2/mnist/ring/non-iid/experiments.sh b/results-v2/mnist/ring/non-iid/experiments.sh index 205028c4c6cd8c898507d021892537d73ba99f57..6c24f1d81a349f5ef21c06cae62aeab4541fe75f 100755 --- a/results-v2/mnist/ring/non-iid/experiments.sh +++ b/results-v2/mnist/ring/non-iid/experiments.sh @@ -18,7 +18,8 @@ setup/meta.py \ --seed 1 | setup/dataset.py \ --name mnist \ - --global-train-ratios 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 | + --train-examples-per-class 4500 4500 4500 4500 4500 4500 4500 4500 4500 4500 | + #--global-train-ratios 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 0.802568 | setup/nodes.py \ --nb-nodes 100 \ --local-classes 1 \ @@ -30,6 +31,8 @@ simulate/algorithm/d_sgd.py \ --batch-size 128 \ --learning-momentum 0.0 \ --learning-rate 0.1 | -simulate/logger.py | +simulate/logger.py \ + --accuracy-logging-interval 5 \ + --nb-processes 2 | simulate/run.py \ --nb-epochs 100