-
Notifications
You must be signed in to change notification settings - Fork 4
/
predict_ami.sh
executable file
·163 lines (125 loc) · 10.4 KB
/
predict_ami.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
########################################
########### ORACLE PREDICTION ##########
########################################
#cluster2sent + t5base
allennlp predict ./ami_models/t5_models/ser_entrywise_conditioned_t5_base/model.tar.gz \
--include-package t5 --cuda-device 0 --predictor beamsearch --silent \
dataset_ami/entrywise_summarization/test.jsonl \
--output-file ./ami_models/t5_models/ser_entrywise_conditioned_t5_base/test_outputs.jsonl
#cluster2sent + t5small
allennlp predict ./ami_models/t5_models/ser_entrywise_conditioned_t5_small/model.tar.gz \
--include-package t5 --cuda-device 0 --predictor beamsearch --silent \
dataset_ami/entrywise_summarization/test.jsonl \
--output-file ./ami_models/t5_models/ser_entrywise_conditioned_t5_small/test_outputs.jsonl
#ext2sec + t5small
allennlp predict ./ami_models/t5_models/ser_sectionwise_conditioned_t5_small/model.tar.gz \
--include-package t5 --cuda-device 0 --predictor beamsearch --silent \
dataset_ami/sectionwise_allxmin_summarization/test.jsonl \
--output-file ./ami_models/t5_models/ser_sectionwise_conditioned_t5_small/test_outputs.jsonl
#ext2note + t5small
allennlp predict ./ami_models/t5_models/ser_allxmins_fullsummary_t5_small/model.tar.gz \
--include-package t5 --cuda-device 0 --predictor beamsearch --silent \
dataset_ami/allxmin_summarization/test.jsonl \
--output-file ./ami_models/t5_models/ser_allxmins_fullsummary_t5_small/test_outputs.jsonl
#cov2note + pg
allennlp predict ./ami_models/pg_models/ser_fullconversation_fullsummary/model.tar.gz \
--include-package pointergen --cuda-device 0 --predictor beamsearch_constrained --silent \
dataset_ami/full_summarization/test.jsonl \
--output-file ./ami_models/pg_models/ser_fullconversation_fullsummary/test_outputs.jsonl
#ex2note + pg
allennlp predict ./ami_models/pg_models/ser_allxmins_fullsummary/model.tar.gz \
--include-package pointergen --cuda-device 0 --predictor beamsearch_constrained --silent \
dataset_ami/allxmin_summarization/test.jsonl \
--output-file ./ami_models/pg_models/ser_allxmins_fullsummary/test_outputs.jsonl
#ext2sec + pg
allennlp predict ./ami_models/pg_models/ser_sectionwise_allxmins_sectionsummary/model.tar.gz \
--include-package pointergen --cuda-device 0 --predictor beamsearch --silent \
dataset_ami/sectionwise_allxmin_summarization/test.jsonl \
--output-file ./ami_models/pg_models/ser_sectionwise_allxmins_sectionsummary/test_outputs.jsonl
#cluster2sent + pg
allennlp predict ./ami_models/pg_models/ser_entrywise_summarization/model.tar.gz \
--include-package pointergen --cuda-device 0 --predictor beamsearch --silent \
dataset_ami/entrywise_summarization/test.jsonl \
--output-file ./ami_models/pg_models/ser_entrywise_summarization/test_outputs.jsonl
##############################################
##### EXTRACTING NOTEWORTHY UTTERANCES #######
##############################################
#hlstm multilabel
allennlp predict ./ami_models/xmin_prediction/ami_hlstm_multilabel/model.tar.gz \
--include-package sequential_sentence_tagger --cuda-device 0 --predictor simple_multilabel_classifier --silent \
dataset_ami/sectionwise_xmin_multilabel_classification/val.jsonl \
--output-file ./ami_models/xmin_prediction/ami_hlstm_multilabel/val_outputs.jsonl
allennlp predict ./ami_models/xmin_prediction/ami_hlstm_multilabel/model.tar.gz \
--include-package sequential_sentence_tagger --cuda-device 0 --predictor simple_multilabel_classifier --silent \
dataset_ami/sectionwise_xmin_multilabel_classification/test.jsonl \
--output-file ./ami_models/xmin_prediction/ami_hlstm_multilabel/test_outputs.jsonl
#hlstm binary
allennlp predict ./ami_models/xmin_prediction/ami_hlstm_binary/model.tar.gz \
--include-package sequential_sentence_tagger --cuda-device 0 --predictor simple_unilabel_classifier --silent \
dataset_ami/allxmin_binary_classification/val.jsonl \
--output-file ./ami_models/xmin_prediction/ami_hlstm_binary/val_outputs.jsonl
allennlp predict ./ami_models/xmin_prediction/ami_hlstm_binary/model.tar.gz \
--include-package sequential_sentence_tagger --cuda-device 0 --predictor simple_unilabel_classifier --silent \
dataset_ami/allxmin_binary_classification/test.jsonl \
--output-file ./ami_models/xmin_prediction/ami_hlstm_binary/test_outputs.jsonl
###############################
######### CLUSTERING #########
###############################
python make_predicted_xmin_datasets.py -dataset ami -ser_dir ami_models/xmin_prediction/ami_hlstm_multilabel/ -mode multilabel
python make_predicted_xmin_datasets.py -dataset ami -ser_dir ami_models/xmin_prediction/ami_hlstm_binary/ -mode unilabel
####################################################################################################
################# GENERATION WITH PREDICTED NOTEWORTHY UTTERANCES ##################################
####################################################################################################
#cluster2sent + t5base
allennlp predict ./ami_models/t5_models/ser_entrywise_conditioned_t5_base/model.tar.gz \
--include-package t5 --cuda-device 0 --predictor beamsearch --silent \
./ami_models/xmin_prediction/ami_hlstm_multilabel/predicted_entrywise_gapped.jsonl \
--output-file ./ami_models/t5_models/ser_entrywise_conditioned_t5_base/test_outputs_on_hlstm.jsonl
#cluster2sent + t5small
allennlp predict ./ami_models/t5_models/ser_entrywise_conditioned_t5_small/model.tar.gz \
--include-package t5 --cuda-device 0 --predictor beamsearch --silent \
./ami_models/xmin_prediction/ami_hlstm_multilabel/predicted_entrywise_gapped.jsonl \
--output-file ./ami_models/t5_models/ser_entrywise_conditioned_t5_small/test_outputs_on_hlstm.jsonl
#ext2sec + t5small
allennlp predict ./ami_models/t5_models/ser_sectionwise_conditioned_t5_small/model.tar.gz \
--include-package t5 --cuda-device 0 --predictor beamsearch --silent \
./ami_models/xmin_prediction/ami_hlstm_multilabel/predicted_sectionwise_allxmin.jsonl \
--output-file ./ami_models/t5_models/ser_sectionwise_conditioned_t5_small/test_outputs_on_hlstm.jsonl
#ext2note + t5small
allennlp predict ./ami_models/t5_models/ser_allxmins_fullsummary_t5_small/model.tar.gz \
--include-package t5 --cuda-device 0 --predictor beamsearch --silent \
./ami_models/xmin_prediction/ami_hlstm_binary/predicted_allxmin_test.jsonl \
--output-file ./ami_models/t5_models/ser_allxmins_fullsummary_t5_small/test_outputs_on_hlstm.jsonl
#ex2note + pg
allennlp predict ./ami_models/pg_models/ser_allxmins_fullsummary/model.tar.gz \
--include-package pointergen --cuda-device 0 --predictor beamsearch_constrained --silent \
./ami_models/xmin_prediction/ami_hlstm_binary/predicted_allxmin_test.jsonl \
--output-file ./ami_models/pg_models/ser_allxmins_fullsummary/test_outputs_on_hlstm.jsonl
#ext2sec + pg
allennlp predict ./ami_models/pg_models/ser_sectionwise_allxmins_sectionsummary/model.tar.gz \
--include-package pointergen --cuda-device 0 --predictor beamsearch --silent \
./ami_models/xmin_prediction/ami_hlstm_multilabel/predicted_sectionwise_allxmin.jsonl \
--output-file ./ami_models/pg_models/ser_sectionwise_allxmins_sectionsummary/test_outputs_on_hlstm.jsonl
#cluster2sent + pg
allennlp predict ./ami_models/pg_models/ser_entrywise_summarization/model.tar.gz \
--include-package pointergen --cuda-device 0 --predictor beamsearch --silent \
./ami_models/xmin_prediction/ami_hlstm_multilabel/predicted_entrywise_gapped.jsonl \
--output-file ./ami_models/pg_models/ser_entrywise_summarization/test_outputs_on_hlstm.jsonl
#####################################################################################
############################ ROUGE CALCULATION ##################################
#####################################################################################
python calculate_rouge.py -dataset ami -split test -algo cluster2sent -save_results -rouge_impl pyrouge -eval_file ./ami_models/t5_models/ser_entrywise_conditioned_t5_base/test_outputs.jsonl
python calculate_rouge.py -dataset ami -split test -algo cluster2sent -save_results -rouge_impl pyrouge -eval_file ./ami_models/t5_models/ser_entrywise_conditioned_t5_small/test_outputs.jsonl
python calculate_rouge.py -dataset ami -split test -algo ext2sec -save_results -rouge_impl pyrouge -eval_file ./ami_models/t5_models/ser_sectionwise_conditioned_t5_small/test_outputs.jsonl
python calculate_rouge.py -dataset ami -split test -algo ext2note -save_results -rouge_impl pyrouge -eval_file ./ami_models/t5_models/ser_allxmins_fullsummary_t5_small/test_outputs.jsonl
python calculate_rouge.py -dataset ami -split test -algo conv2note -save_results -rouge_impl pyrouge -eval_file ./ami_models/pg_models/ser_fullconversation_fullsummary/test_outputs.jsonl
python calculate_rouge.py -dataset ami -split test -algo ext2note -save_results -rouge_impl pyrouge -eval_file ./ami_models/pg_models/ser_allxmins_fullsummary/test_outputs.jsonl
python calculate_rouge.py -dataset ami -split test -algo ext2sec -save_results -rouge_impl pyrouge -eval_file ./ami_models/pg_models/ser_sectionwise_allxmins_sectionsummary/test_outputs.jsonl
python calculate_rouge.py -dataset ami -split test -algo cluster2sent -save_results -rouge_impl pyrouge -eval_file ./ami_models/pg_models/ser_entrywise_summarization/test_outputs.jsonl
python calculate_rouge.py -dataset ami -split test -algo cluster2sent -save_results -rouge_impl pyrouge -eval_file ./ami_models/t5_models/ser_entrywise_conditioned_t5_base/test_outputs_on_hlstm.jsonl
python calculate_rouge.py -dataset ami -split test -algo cluster2sent -save_results -rouge_impl pyrouge -eval_file ./ami_models/t5_models/ser_entrywise_conditioned_t5_small/test_outputs_on_hlstm.jsonl
python calculate_rouge.py -dataset ami -split test -algo ext2sec -save_results -rouge_impl pyrouge -eval_file ./ami_models/t5_models/ser_sectionwise_conditioned_t5_small/test_outputs_on_hlstm.jsonl
python calculate_rouge.py -dataset ami -split test -algo ext2note -save_results -rouge_impl pyrouge -eval_file ./ami_models/t5_models/ser_allxmins_fullsummary_t5_small/test_outputs_on_hlstm.jsonl
python calculate_rouge.py -dataset ami -split test -algo ext2note -save_results -rouge_impl pyrouge -eval_file ./ami_models/pg_models/ser_allxmins_fullsummary/test_outputs_on_hlstm.jsonl
python calculate_rouge.py -dataset ami -split test -algo ext2sec -save_results -rouge_impl pyrouge -eval_file ./ami_models/pg_models/ser_sectionwise_allxmins_sectionsummary/test_outputs_on_hlstm.jsonl
python calculate_rouge.py -dataset ami -split test -algo cluster2sent -save_results -rouge_impl pyrouge -eval_file ./ami_models/pg_models/ser_entrywise_summarization/test_outputs_on_hlstm.jsonl