Skip to content
Snippets Groups Projects
Commit 96f64538 authored by Rafael Pires's avatar Rafael Pires
Browse files

No need to tell which is the first machine.

Didn't work with non-contiguous machine numbers.
parent 88f71b02
No related branches found
No related tags found
No related merge requests found
......@@ -8,14 +8,21 @@ Setting up decentralizepy
* Fork the repository.
* Clone and enter your local repository.
* Check if you have ``python>=3.8``.
* (Optional) Create and activate a virtual environment.
* Check if you have ``python>=3.8``. ::
python --version
* (Optional) Create and activate a virtual environment. ::
python3 -m venv [venv-name]
source [venv-name]/bin/activate
* Update pip. ::
pip3 install --upgrade pip
pip install --upgrade pip
* On Mac M1, installing ``pyzmq`` fails with `pip`. Use ``conda``.
* On Mac M1, installing ``pyzmq`` fails with `pip`. Use `conda <https://conda.io>`_.
* Install decentralizepy for development. ::
pip3 install --editable .\[dev\]
......@@ -26,7 +33,7 @@ Running the code
* Choose and modify one of the config files in ``eval/{step,epoch}_configs``.
* Modify the dataset paths and ``addresses_filepath`` in the config file.
* In eval/run.sh, modify ``first_machine`` (used to calculate machine_id of all machines), ``original_config``, and other arguments as required.
* In eval/run.sh, modify arguments as required.
* Execute eval/run.sh on all the machines simultaneously. There is a synchronization barrier mechanism at the start so that all processes start training together.
Node
......
eval/run.sh 100644 → 100755
......@@ -3,10 +3,6 @@
decpy_path=~/Gitlab/decentralizepy/eval
cd $decpy_path
first_machine=128
m=`/sbin/ifconfig ens785 | grep 'inet ' | awk '{print $2}' | awk -v FS=. '{print $4}'`
m=`expr $m - $first_machine`
env_python=~/miniconda3/envs/decpy/bin/python3
graph=96_nodes_random1.edges
original_config=epoch_configs/config_celeba.ini
......@@ -18,6 +14,8 @@ test_after=2
eval_file=testing.py
log_level=INFO
m=`cat $(grep addresses_filepath $original_config | awk '{print $3}') | grep $(/sbin/ifconfig ens785 | grep 'inet ' | awk '{print $2}') | cut -d'"' -f2`
cp $original_config $config_file
echo "alpha = 0.75" >> $config_file
$env_python $eval_file -mid $m -ps $procs_per_machine -ms $machines -is $iterations -gf $graph -ta $test_after -cf $config_file -ll $log_level
......
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