-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
93 lines (70 loc) · 1.94 KB
/
Makefile
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
CONFIG ?= config/example.json
DEVICE ?= cpu
MODELDIR ?= models/newsroom-P75/model-dirs/best_val_reward-7950
TESTSET ?= data/test-data/broadcast.jsonl
HC_OUTPUT ?= data/hc-outputs/hc.L11.google.jsonl
# TRAINING
.PHONY: train
train:
python bin/train.py --verbose --config $(CONFIG) --device $(DEVICE)
# EVALUATING SCRL MODELS (predict + evaluate)
.PHONY: eval-google
eval-google:
python bin/evaluate.py \
--model-dir $(MODELDIR) \
--device $(DEVICE) \
--dataset data/test-data/google.jsonl
.PHONY: eval-duc2004
eval-duc2004:
python bin/evaluate.py \
--model-dir $(MODELDIR) \
--device $(DEVICE) \
--dataset data/test-data/duc2004.jsonl \
--max-chars 75
.PHONY: eval-gigaword
eval-gigaword:
python bin/evaluate.py \
--model-dir $(MODELDIR) \
--device $(DEVICE) \
--dataset data/test-data/gigaword.jsonl \
--pretokenized
.PHONY: eval-broadcast
eval-broadcast:
python bin/evaluate.py \
--model-dir $(MODELDIR) \
--device $(DEVICE) \
--dataset data/test-data/broadcast.jsonl \
--pretokenized
.PHONY: eval-bnc
eval-bnc:
python bin/evaluate.py \
--model-dir $(MODELDIR) \
--device $(DEVICE) \
--dataset data/test-data/bnc.jsonl \
--pretokenized
# EVALUATE HILL CLIMBING SEARCH
.PHONY: hc-eval-google
hc-eval-google:
python bin/evaluate_hc_output.py \
--dataset data/test-data/google.jsonl \
--outputs $(HC_OUTPUT)
.PHONY: hc-eval-duc2004
hc-eval-duc2004:
python bin/evaluate_hc_output.py \
--dataset data/test-data/duc2004.jsonl \
--outputs $(HC_OUTPUT)
.PHONY: hc-eval-gigaword
hc-eval-gigaword:
python bin/evaluate_hc_output.py \
--dataset data/test-data/gigaword.jsonl \
--outputs $(HC_OUTPUT)
.PHONY: hc-eval-broadcast
hc-eval-broadcast:
python bin/evaluate_hc_output.py \
--dataset data/test-data/broadcast.jsonl \
--outputs $(HC_OUTPUT)
.PHONY: hc-eval-bnc
hc-eval-bnc:
python bin/evaluate_hc_output.py \
--dataset data/test-data/bnc.jsonl \
--outputs $(HC_OUTPUT)