From 5e33a72a3f1f0c3ef815b0d3ac9f9d64e0e3b7c3 Mon Sep 17 00:00:00 2001
From: Erick Lavoie <erick.lavoie@epfl.ch>
Date: Wed, 25 Aug 2021 17:17:10 +0200
Subject: [PATCH] Added experiment files for simulator v2

---
 results-v2/mnist/1-node-iid/experiments.sh   | 34 ++++++++++++++++++
 results-v2/mnist/ring/iid/experiments.sh     | 36 ++++++++++++++++++++
 results-v2/mnist/ring/non-iid/experiments.sh | 35 +++++++++++++++++++
 3 files changed, 105 insertions(+)
 create mode 100755 results-v2/mnist/1-node-iid/experiments.sh
 create mode 100755 results-v2/mnist/ring/iid/experiments.sh
 create mode 100755 results-v2/mnist/ring/non-iid/experiments.sh

diff --git a/results-v2/mnist/1-node-iid/experiments.sh b/results-v2/mnist/1-node-iid/experiments.sh
new file mode 100755
index 0000000..2e7dd1c
--- /dev/null
+++ b/results-v2/mnist/1-node-iid/experiments.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+# Path to current script
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
+TOOLS=$SCRIPT_DIR/../../$(cat $SCRIPT_DIR/../../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'.
+setup/meta.py \
+  --results-directory $SCRIPT_DIR/all \
+  --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 |
+setup/nodes.py \
+  --nb-nodes 1 \
+  --local-classes 10 \
+  --nodes-per-class 1 1 1 1 1 1 1 1 1 1 |
+setup/topology/ring.py |
+setup/model/linear.py |
+simulate/algorithm/d_sgd.py \
+  --batch-size 12800 \
+  --learning-momentum 0.0 \
+  --learning-rate 0.1 |
+simulate/logger.py |
+simulate/run.py \
+  --nb-epochs 100
diff --git a/results-v2/mnist/ring/iid/experiments.sh b/results-v2/mnist/ring/iid/experiments.sh
new file mode 100755
index 0000000..93b1047
--- /dev/null
+++ b/results-v2/mnist/ring/iid/experiments.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+# Path to current script
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
+TOOLS=$SCRIPT_DIR/../../../$(cat $SCRIPT_DIR/../../../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'.
+setup/meta.py \
+  --results-directory $SCRIPT_DIR/all \
+  --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 |
+setup/nodes.py \
+  --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 |
+simulate/run.py \
+  --nb-epochs 100
+
diff --git a/results-v2/mnist/ring/non-iid/experiments.sh b/results-v2/mnist/ring/non-iid/experiments.sh
new file mode 100755
index 0000000..205028c
--- /dev/null
+++ b/results-v2/mnist/ring/non-iid/experiments.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+# Path to current script
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
+TOOLS=$SCRIPT_DIR/../../../$(cat $SCRIPT_DIR/../../../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'.
+setup/meta.py \
+  --results-directory $SCRIPT_DIR/all \
+  --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 |
+setup/nodes.py \
+  --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 |
+simulate/run.py \
+  --nb-epochs 100
-- 
GitLab