diff --git a/.gitignore b/.gitignore index b1dda6b70a36ceac5c642ec5930b891232e5ff5e..deb2e4becc9da6fc9ebd9d145db3510fa64911ee 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ **.egg-info 2021** 2022** -**/massif.out* \ No newline at end of file +**/massif.out* +*swp diff --git a/README.rst b/README.rst index 785ed1322791d22ea921c9ad5c01b77b0535a7d2..4ab4134262206037524f543a054ab82445b7307d 100644 --- a/README.rst +++ b/README.rst @@ -26,10 +26,14 @@ Setting up decentralizepy pip install --upgrade pip * On Mac M1, installing ``pyzmq`` fails with `pip`. Use `conda <https://conda.io>`_. -* Install decentralizepy for development. :: +* Install decentralizepy for development. (zsh) :: pip3 install --editable .\[dev\] +* Install decentralizepy for development. (bash) :: + + pip3 install --editable .[dev] + ---------------- Running the code ---------------- diff --git a/eval/run.sh b/eval/run.sh index 9d71d96167a2c303a0ccd4957e65508c68f4681b..06d63c9377bf167b3aacde4d1bf926ae5faa66c1 100755 --- a/eval/run.sh +++ b/eval/run.sh @@ -1,17 +1,31 @@ #!/bin/bash +script_path=$(realpath $(dirname $0)) -decpy_path=/mnt/nfs/kirsten/Gitlab/jac_decentralizepy/decentralizepy/eval +# Working directory, where config files are read from and logs are written. +decpy_path=/mnt/nfs/$(whoami)/decpy_workingdir cd $decpy_path -env_python=~/miniconda3/envs/decpy/bin/python3 -graph=/mnt/nfs/kirsten/Gitlab/tutorial/regular_16.txt -original_config=/mnt/nfs/kirsten/Gitlab/tutorial/config_celeba_sharing.ini -config_file=~/tmp/config_celeba_sharing.ini +# Python interpreter +env_python=python3 + +# File regular_16.txt is available in /tutorial +graph=$decpy_path/regular_16.txt + +# File config_celeba_sharing.ini is available in /tutorial +# In this config file, change addresses_filepath to correspond to your list of machines (example in /tutorial/ip.json) +original_config=$decpy_path/config_celeba_sharing.ini + +# Local config file +config_file=/tmp/$(basename $original_config) + +# Python script to be executed +eval_file=$script_path/testingPeerSampler.py + +# General parameters procs_per_machine=8 machines=2 iterations=5 test_after=2 -eval_file=testingPeerSampler.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` @@ -19,6 +33,8 @@ echo M is $m log_dir=$(date '+%Y-%m-%dT%H:%M')/machine$m mkdir -p $log_dir +# Copy and manipulate the local config file cp $original_config $config_file # echo "alpha = 0.10" >> $config_file -$env_python $eval_file -ro 0 -tea $test_after -ld $log_dir -mid $m -ps $procs_per_machine -ms $machines -is $iterations -gf $graph -ta $test_after -cf $config_file -ll $log_level -ctr 0 -cte 0 -wsd $log_dir \ No newline at end of file + +$env_python $eval_file -ro 0 -tea $test_after -ld $log_dir -mid $m -ps $procs_per_machine -ms $machines -is $iterations -gf $graph -ta $test_after -cf $config_file -ll $log_level -wsd $log_dir