Skip to content
Snippets Groups Projects
Commit b5c9f14d authored by Erick Lavoie's avatar Erick Lavoie
Browse files

Added scripts for intro

parent 5d8e4552
No related branches found
No related tags found
No related merge requests found
Showing
with 366 additions and 10 deletions
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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
#!/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
...@@ -18,7 +18,7 @@ setup/meta.py \ ...@@ -18,7 +18,7 @@ setup/meta.py \
--seed 1 | --seed 1 |
setup/dataset.py \ setup/dataset.py \
--name mnist \ --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 \ setup/nodes.py \
--nb-nodes 100 \ --nb-nodes 100 \
--local-classes 10 \ --local-classes 10 \
...@@ -30,6 +30,7 @@ simulate/algorithm/d_sgd.py \ ...@@ -30,6 +30,7 @@ simulate/algorithm/d_sgd.py \
--batch-size 128 \ --batch-size 128 \
--learning-momentum 0.0 \ --learning-momentum 0.0 \
--learning-rate 0.1 | --learning-rate 0.1 |
simulate/logger.py | simulate/logger.py \
--accuracy-logging-interval 10 |
simulate/run.py \ simulate/run.py \
--nb-epochs 100 --nb-epochs 100
...@@ -9,16 +9,18 @@ export PATH=$PATH:$TOOLS ...@@ -9,16 +9,18 @@ export PATH=$PATH:$TOOLS
# the path of all local python libraries are relative to this # the path of all local python libraries are relative to this
export PYTHONPATH=$TOOLS export PYTHONPATH=$TOOLS
for LR in 0.04 0.05; do
# Each command outputs the run directory, which is then used # Each command outputs the run directory, which is then used
# by the next command to add parameters and generate information # by the next command to add parameters and generate information
# used by the simulator. For a list of available options for each # used by the simulator. For a list of available options for each
# command, run 'export PYTHONPATH=.; <command> --help'. # command, run 'export PYTHONPATH=.; <command> --help'.
setup/meta.py \ setup/meta.py \
--results-directory $SCRIPT_DIR/all \ --results-directory $SCRIPT_DIR/test \
--seed 1 | --seed 1 |
setup/dataset.py \ setup/dataset.py \
--name mnist \ --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 \ setup/nodes.py \
--nb-nodes 100 \ --nb-nodes 100 \
--local-classes 10 \ --local-classes 10 \
...@@ -29,8 +31,10 @@ setup/model/linear.py | ...@@ -29,8 +31,10 @@ setup/model/linear.py |
simulate/algorithm/d_sgd.py \ simulate/algorithm/d_sgd.py \
--batch-size 128 \ --batch-size 128 \
--learning-momentum 0.0 \ --learning-momentum 0.0 \
--learning-rate 0.1 | --learning-rate $LR |
simulate/logger.py | simulate/logger.py \
--accuracy-logging-interval 5 \
--nb-processes 2 |
simulate/run.py \ simulate/run.py \
--nb-epochs 100 --nb-epochs 20;
done
...@@ -18,7 +18,8 @@ setup/meta.py \ ...@@ -18,7 +18,8 @@ setup/meta.py \
--seed 1 | --seed 1 |
setup/dataset.py \ setup/dataset.py \
--name mnist \ --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 \ setup/nodes.py \
--nb-nodes 100 \ --nb-nodes 100 \
--local-classes 1 \ --local-classes 1 \
...@@ -30,6 +31,8 @@ simulate/algorithm/d_sgd.py \ ...@@ -30,6 +31,8 @@ simulate/algorithm/d_sgd.py \
--batch-size 128 \ --batch-size 128 \
--learning-momentum 0.0 \ --learning-momentum 0.0 \
--learning-rate 0.1 | --learning-rate 0.1 |
simulate/logger.py | simulate/logger.py \
--accuracy-logging-interval 5 \
--nb-processes 2 |
simulate/run.py \ simulate/run.py \
--nb-epochs 100 --nb-epochs 100
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment