forked from qbetterk/DAML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_rest.sh
executable file
·112 lines (85 loc) · 3.9 KB
/
run_rest.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/bin/bash
set -xeu
# for k in 7; do
# for idx in 1 2 3 4 5; do
# echo "asdf${idx}_a${k}sdf" #| grep 3 #> log.txt
# done
# done
# s=150
# cuda=5
# ss=3
# # for restaurant domain
# # barely test
# for idx in 9 #1 2 3 4 5 6 7 8 9
# do
# # barely test
# # python model.py -mode test \
# # -model tsdf-camrest \
# # -cfg data="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500.json" \
# # db="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500-DB.json" \
# # entity="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500-OTGY.json" \
# # vocab_path="./vocab/vocab-fixed${idx}_r_w_b_${s}m_${s}rslot.pkl" \
# # model_path="./models/fixed${idx}_r_w_b${ss}.pkl" \
# # result_path="./results/fixed${idx}_r_w_b${ss}-r.csv" \
# # cuda_device=${cuda}
# # # adaptation
# # cp ./models/fixed${idx}_r_w_b${ss}.pkl ./models/fixed${idx}_r_w_b${ss}_adpr.pkl
# # python model.py -mode adjust \
# # -model tsdf-camrest \
# # -cfg data="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500.json" \
# # db="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500-DB.json" \
# # entity="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500-OTGY.json" \
# # vocab_path="./vocab/vocab-fixed${idx}_r_w_b_${s}m_${s}rslot.pkl" \
# # model_path="./models/fixed${idx}_r_w_b${ss}_adpr.pkl" \
# # result_path="./results/fixed${idx}_r_w_b${ss}_adpr-r.csv" \
# # cuda_device=${cuda}
# # test again
# python model.py -mode test \
# -model tsdf-camrest \
# -cfg data="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500.json" \
# db="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500-DB.json" \
# entity="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500-OTGY.json" \
# vocab_path="./vocab/vocab-fixed${idx}_r_w_b_${s}m_${s}rslot.pkl" \
# model_path="./models/fixed${idx}_r_w_b${ss}_adpr.pkl" \
# result_path="./results/fixed${idx}_r_w_b${ss}_adpr-r.csv" \
# cuda_device=${cuda}
# done
# # # # # # #for the transfer learning
s=2
cuda=0
ss=$s
for idx in 1 2 3 4 5 6 7 8 9
do
# barely test
# python model.py -mode test \
# -model tsdf-camrest \
# -cfg data="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500.json" \
# db="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500-DB.json" \
# entity="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500-OTGY.json" \
# vocab_path="./vocab/vocab-fixed${idx}_r_w_b_${s}m_${s}rslot.pkl" \
# model_path="./models/fixed${idx}_r_w_b${ss}.pkl" \
# result_path="./results/fixed${idx}_r_w_b${ss}-r.csv" \
# cuda_device=${cuda}
# # adaptation
cp ../sequicity_orig/models/fixed${idx}_r_w_b${ss}.pkl ./models/orig_fixed${idx}_r_w_b${ss}_adpr.pkl
python model.py -mode adjust \
-model tsdf-camrest \
-cfg data="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500.json" \
db="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500-DB.json" \
entity="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500-OTGY.json" \
vocab_path="./vocab/vocab-fixed${idx}_r_w_b_${s}m_${s}rslot.pkl" \
model_path="./models/orig_fixed${idx}_r_w_b${ss}_adpr.pkl" \
result_path="./results/orig_fixed${idx}_r_w_b${ss}_adpr-r.csv" \
cuda_device=${cuda} \
split=110
# test again
python model.py -mode test \
-model tsdf-camrest \
-cfg data="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500.json" \
db="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500-DB.json" \
entity="../SimDial/1500_data_fixed_${idx}/restaurant-MixSpec-1500-OTGY.json" \
vocab_path="./vocab/vocab-fixed${idx}_r_w_b_${s}m_${s}rslot.pkl" \
model_path="./models/orig_fixed${idx}_r_w_b${ss}_adpr.pkl" \
result_path="./results/orig_fixed${idx}_r_w_b${ss}_adpr-r.csv" \
cuda_device=${cuda}
done