-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·73 lines (62 loc) · 2.25 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
VER='0.1'
DOCKER_IMAGE='rlf_kgat:'$(VER)
docker-build:
docker build -t $(DOCKER_IMAGE) -f docker/Dockerfile .
docker-run:
docker run --gpus all -it --rm --shm-size 100G \
-v $(PWD)/KernelGAT/:/workspace/ $(DOCKER_IMAGE) \
/bin/bash
download:
cd KernelGAT && wget https://thunlp.oss-cn-qingdao.aliyuncs.com/KernelGAT/FEVER/KernelGAT.zip && \
unzip "KernelGAT.zip" && rm -rf "KernelGAT.zip"
cd KernelGAT && wget https://thunlp.oss-cn-qingdao.aliyuncs.com/KernelGAT/FEVER/KernelGAT_roberta_large.zip && \
unzip "KernelGAT_roberta_large.zip" && rm -rf "KernelGAT_roberta_large.zip"
prepro:
cp -f new_files/BERT/* KernelGAT/kgat/
cp -f new_files/RoBERTa/* KernelGAT/KernelGAT_roberta_large/kgat/
cp KernelGAT/KernelGAT/data/* KernelGAT/data/
cp KernelGAT/KernelGAT/bert_base/* KernelGAT/bert_base/
kgat:
docker run --gpus all -it --rm --shm-size 100G \
-v $(PWD)/KernelGAT:/workspace $(DOCKER_IMAGE) \
python kgat/train.py \
--outdir checkpoint \
--train_path data/bert_train.json \
--valid_path data/bert_dev.json \
--bert_pretrain bert_base \
--postpretrain /workspace/KernelGAT/checkpoint/pretrain/model.best.pt \
--comp sr \
--nl_coef 0.25 \
--imb --beta 0.999999
test:
docker run --gpus all -it --rm --shm-size 100G \
-v $(PWD)/KernelGAT:/workspace $(DOCKER_IMAGE) \
python kgat/test.py \
--outdir kgat/output/ \
--test_path data/bert_eval.json \
--bert_pretrain bert_base \
--checkpoint checkpoint \
--name dev.json \
--comp sr \
--nl_coef 0.25 \
--imb --beta 0.999999
docker run --gpus all -it --rm --shm-size 100G \
-v $(PWD)/KernelGAT:/workspace $(DOCKER_IMAGE) \
python kgat/test.py \
--outdir kgat/output/ \
--test_path data/bert_test.json \
--bert_pretrain bert_base \
--checkpoint checkpoint \
--name test.json \
--comp sr \
--nl_coef 0.25 \
--imb --beta 0.999999
eval:
docker run --gpus all -it --rm --shm-size 100G \
-v $(PWD)/KernelGAT:/workspace $(DOCKER_IMAGE) \
python kgat/fever_score_test.py \
--outdir kgat/output/ \
--predicted_labels kgat/output/dev.json \
--predicted_evidence data/bert_eval.json \
--actual data/dev_eval.json \
--name eval