Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cluster_command - github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 75105b312d97ef53e31da49e6b223e6222228cb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
set -x
set -u
killall vw
set -e
WORKERS=$1
PASSES=$2
RATE=$3
DATA=$4
TEST=$5
GM=$6
BASEPORT=39521
SENDARGS=""
# An example cluster command.  This just runs on one machine.
export FLAGS="--global_multiplier $GM --adaptive --delayed_global -l $RATE --power_t 0.5 --predictto localhost:39520 --daemon"
./vw ----delayed_global -l $RATE --power_t 0.5 --initial_t 1 --multisource $WORKERS --port 39520 -f /tmp/master.reg > /tmp/master.output 2>&1 
for i in `seq $WORKERS`
do
./vw $FLAGS --port $((BASEPORT+i)) -f /tmp/worker${i}.reg > /tmp/worker${i}.output 2>&1 
SENDARGS="$SENDARGS --sendto localhost:$((BASEPORT+i))"
done
./vw --hash all --cache_file /tmp/`basename $DATA`.cache -d $DATA $SENDARGS --passes $PASSES > /tmp/sender.output 2>&1

sync

export FLAGS="--global_multiplier $GM --predictto localhost:39520 --daemon"
SENDARGS=""
./vw -l 0 --multisource $WORKERS --port 39520 -i /tmp/master.reg >> /tmp/master.output 2>&1 
for i in `seq $WORKERS`
do
./vw -l 0 $FLAGS --port $((BASEPORT+i)) -i /tmp/worker${i}.reg >> /tmp/worker${i}.output 2>&1 
SENDARGS="$SENDARGS --sendto localhost:$((BASEPORT+i))"
done
./vw  --hash all --cache_file /tmp/`basename $TEST`.cache  -d $TEST $SENDARGS -p /tmp/`basename $TEST`.preds >> /tmp/sender.output 2>&1

cd /tmp
grep Constant master.output| cut -d 'C' -f 2 | cut -d ':' -f 4 > constant_master; for a in `seq 1 8`; do grep Constant worker${a}.output| cut -d 'C' -f 2 | cut -d ':' -f 4 > constant_${a}; done