-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_adapt.sh
executable file
·47 lines (38 loc) · 1.13 KB
/
run_adapt.sh
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
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env sh
# e.g ./run_adapt.sh blstm config non-spot no-overwrite greedy ALGO PRETRAIN_SETTING PRETRAIN_SUFFIX ca en hk us wa
# cross-region: af hk in ph sg
# mixed-region: be ph
# val are ca sc sa
MODEL_NAME=$1
CONFIG_NAME=$2
SPOT=$3
OVERWRITE=$4
DECODE_MODE=$5
ALGO=$6
PRETRAIN_SETTING=$7
PRETRAIN_SUFFIX=$8
DECODE_BATCH_SIZE=32
shift 8
EVAL_ACCENTS=$@
for pretrain_step in $(seq 20000 20000 200000) # for metabz5, multi
do
for accent in $EVAL_ACCENTS
do
CONFIG="config/$MODEL_NAME/adapt/$CONFIG_NAME.yaml"
hrun_prefix="hrun -X s09 -G -d -c 6 -m 6 -t 3-0 -n \"$MODEL_NAME/$CONFIG_NAME $ALGO-transfer($PRETRAIN_SUFFIX) at step $pretrain_step ($DECODE_MODE-decode)\""
cmd="./adapt_full_exp.sh $MODEL_NAME $CONFIG $OVERWRITE $DECODE_MODE $ALGO $PRETRAIN_SETTING $PRETRAIN_SUFFIX $pretrain_step $accent"
if [[ $SPOT == "spot" ]];then
hrun_prefix="$hrun_prefix -s"
fi
name=$(hostname)
if [[ $name == "login.speech" ]];then
echo "On battleship login"
echo "$hrun_prefix $cmd"
eval "$hrun_prefix $cmd"
else
echo "On $name"
echo "$cmd"
eval "$cmd"
fi
done
done