From e839212956c12e742e13c3c0cab3d59af1cbe834 Mon Sep 17 00:00:00 2001 From: Jeffrey Wigger <jeffrey.wigger@epfl.ch> Date: Mon, 28 Mar 2022 10:51:55 +0200 Subject: [PATCH] gridsearch fix --- eval/run_grid.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eval/run_grid.sh b/eval/run_grid.sh index 1a9e9e4..54a6e0f 100755 --- a/eval/run_grid.sh +++ b/eval/run_grid.sh @@ -41,7 +41,7 @@ cd $decpy_path env_python=$python_bin/python3 graph=192_regular.edges config_file=~/tmp/config.ini -procs_per_machine=32 +procs_per_machine=16 machines=6 global_epochs=25 eval_file=testing.py @@ -59,7 +59,7 @@ lrs=( "0.001" "0.0001" "0.0001") # Batch sizes to test batchsize=("8" "16") # The number of communication rounds per global epoch to test -comm_rounds_per_global_epoch=("1" "10" "100") +comm_rounds_per_global_epoch=("1" "5" "10") procs=`expr $procs_per_machine \* $machines` echo procs: $procs # Celeba has 63741 samples @@ -83,7 +83,7 @@ do # calculating the number of batches each user/proc uses per communication step (The actual number may be a float, which we round down) batches_per_comm_round=$($env_python -c "from math import floor; x = floor($batches_per_epoch / $r); print(1 if x==0 else x)") # since the batches per communication round were rounded down we need to change the number of iterations to reflect that - new_iterations=$($env_python -c "from math import floor; x = floor($batches_per_epoch / $r); y = floor((($batches_per_epoch / $r) - x +1)*$iterations); print($iterations if x==0 else y)") + new_iterations=$($env_python -c "from math import floor; tmp = floor($batches_per_epoch / $r); x = 1 if tmp == 0 else tmp; y = floor((($batches_per_epoch / $r)/x)*$iterations); print($iterations if y<$iterations else y)") echo batches per communication round: $batches_per_comm_round echo corrected iterations: $new_iterations for lr in "${lrs[@]}" -- GitLab