-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathcorefqa_tpu.sh
60 lines (50 loc) · 1.48 KB
/
corefqa_tpu.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
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
# author: xiaoy li
# description:
# clean code and add comments
REPO_PATH=/home/xiaoyli1110/xiaoya/Coref-tf
export PYTHONPATH="$PYTHONPATH:$REPO_PATH"
export TPU_NAME=tensorflow-tpu
export TPU_ZONE=europe-west4-a
export GCP_PROJECT=xiaoyli-20-04-274510
output_dir=gs://europe_mention_proposal/output_bertlarge
bert_dir=gs://europe_pretrain_mlm/uncased_L-2_H-128_A-2
data_dir=gs://europe_corefqa_data/final_overlap_64_2
python3 ${REPO_PATH}/run/run_corefqa.py \
--output_dir=${output_dir} \
--bert_config_file=${bert_dir}/bert_config_nodropout.json \
--init_checkpoint=${bert_dir}/bert_model.ckpt \
--vocab_file=${bert_dir}/vocab.txt \
--logfile_path=${output_dir}/train.log \
--num_epochs=20 \
--keep_checkpoint_max=50 \
--save_checkpoints_steps=500 \
--train_file=${data_dir}/train.64.english.tfrecord \
--dev_file=${data_dir}/dev.64.english.tfrecord \
--test_file=${data_dir}/test.64.english.tfrecord \
--do_train=True \
--do_eval=False \
--do_predict=False \
--learning_rate=1e-5 \
--dropout_rate=0.0 \
--mention_threshold=0.5 \
--hidden_size=128 \
--num_docs=5604 \
--window_size=64 \
--num_window=2 \
--max_num_mention=20 \
--start_end_share=False \
--max_span_width=20 \
--max_candidate_mentions=50 \
--top_span_ratio=0.2 \
--max_top_antecedents=30 \
--max_query_len=150 \
--max_context_len=150 \
--sec_qa_mention_score=False \
--use_tpu=True \
--tpu_name=$TPU_NAME \
--tpu_zone=$TPU_ZONE \
--gcp_project=$GCP_PROJECT \
--num_tpu_cores=1 \
--seed=2333