forked from facebookresearch/flores
-
Notifications
You must be signed in to change notification settings - Fork 0
/
train_fp16_cn0.1_custom_seed_range_lmvr_neonly.sh
executable file
·64 lines (46 loc) · 1.74 KB
/
train_fp16_cn0.1_custom_seed_range_lmvr_neonly.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# This script runs the seed experiments using a custom BPE size
# Meant to be run from inside Makefile, can be run in master branch
# provided that the different size BPE data sets exist.
BASE_SLUG=$1
BPE_SIZE=$2
FROM_SEED=$3
if [ -z $FROM_SEED ]
then
FROM_SEED=10
fi
TO_SEED=$4
if [ -z $TO_SEED ]
then
TO_SEED=19
fi
CUDA_DEVICE=$5
TRAIN_SCRIPT="./train_fp16_cn0.1_customseed_lmvr.sh "
EVAL_SCRIPT="./evaluate_lmvr.sh"
for SEED in $(seq $FROM_SEED $TO_SEED);
do
SLUG="${BASE_SLUG}-seed${SEED}"
# 0. create log & checkpoint folder
LOG_FOLDER=$(bash ./create_log_folder.sh $SLUG)
CHECKPOINT_FOLDER=$(bash ./create_checkpoint_folder.sh $SLUG)
echo $LOG_FOLDER
echo $CHECKPOINT_FOLDER
# 1. Train NE - EN
bash $TRAIN_SCRIPT "ne" "en" $SEED $BPE_SIZE $CUDA_DEVICE $LOG_FOLDER $CHECKPOINT_FOLDER
# 2. Train EN - NE
bash $TRAIN_SCRIPT "en" "ne" $SEED $BPE_SIZE $CUDA_DEVICE $LOG_FOLDER $CHECKPOINT_FOLDER
# 3. Train SI - EN
#bash $TRAIN_SCRIPT "si" "en" $SEED $BPE_SIZE $CUDA_DEVICE $LOG_FOLDER $CHECKPOINT_FOLDER
# 4. Train EN - SI
#bash $TRAIN_SCRIPT "en" "si" $SEED $BPE_SIZE $CUDA_DEVICE $LOG_FOLDER $CHECKPOINT_FOLDER
# 5. create results folder
RESULTS_FOLDER=$(bash ./create_results_folder.sh $SLUG)
echo $RESULTS_FOLDER
# 6. Evaluate NE - EN
bash $EVAL_SCRIPT "ne" "en" $BPE_SIZE $CUDA_DEVICE $RESULTS_FOLDER $CHECKPOINT_FOLDER
# 7. Evaluate EN - NE
bash $EVAL_SCRIPT "en" "ne" $BPE_SIZE $CUDA_DEVICE $RESULTS_FOLDER $CHECKPOINT_FOLDER
# 8. Evaluate SI - EN
#bash $EVAL_SCRIPT "si" "en" $BPE_SIZE $CUDA_DEVICE $RESULTS_FOLDER $CHECKPOINT_FOLDER
# 9. Evaluate EN - SI
#bash $EVAL_SCRIPT "en" "si" $BPE_SIZE $CUDA_DEVICE $RESULTS_FOLDER $CHECKPOINT_FOLDER
done