From 2fd6931a7664edc336f98c35ef9cf599acb19a12 Mon Sep 17 00:00:00 2001 From: Kornraphop K Date: Sun, 11 Nov 2018 20:15:29 -0500 Subject: [PATCH 1/2] fixed typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cd8d04a24099..ba7c7d70fd10 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ python run_squad.py \ --init_checkpoint $BERT_PYTORCH_DIR/pytorch_model.bin \ --do_train \ --do_predict \ - --do_lower_case + --do_lower_case \ --train_file $SQUAD_DIR/train-v1.1.json \ --predict_file $SQUAD_DIR/dev-v1.1.json \ --train_batch_size 12 \ From d050e27b39be307a7c610d92ce31cfc57b816ba6 Mon Sep 17 00:00:00 2001 From: Kornraphop K Date: Mon, 12 Nov 2018 00:00:20 -0500 Subject: [PATCH 2/2] shell scrip for SQuAd test --- .gitignore | 5 ++++- run_squad.sh | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 run_squad.sh diff --git a/.gitignore b/.gitignore index 56a5f0d38ab3..7e160a1c77fd 100644 --- a/.gitignore +++ b/.gitignore @@ -119,4 +119,7 @@ dmypy.json .vscode # TF code -tensorflow_code \ No newline at end of file +tensorflow_code + +# MacOS temp files +.DS_Store \ No newline at end of file diff --git a/run_squad.sh b/run_squad.sh new file mode 100644 index 000000000000..cd0d1872959b --- /dev/null +++ b/run_squad.sh @@ -0,0 +1,19 @@ +export BERT_BASE_DIR=./bert/uncased_L-12_H-768_A-12 +export BERT_PYTORCH_DIR=./bert_pytorch +export SQUAD_DIR=./squad + +python run_squad.py \ + --vocab_file $BERT_BASE_DIR/vocab.txt \ + --bert_config_file $BERT_BASE_DIR/bert_config.json \ + --init_checkpoint $BERT_PYTORCH_DIR/pytorch_model.bin \ + --do_train \ + --do_predict \ + --do_lower_case \ + --train_file $SQUAD_DIR/train-v1.1.json \ + --predict_file $SQUAD_DIR/dev-v1.1.json \ + --train_batch_size 12 \ + --learning_rate 3e-5 \ + --num_train_epochs 2.0 \ + --max_seq_length 384 \ + --doc_stride 128 \ + --output_dir ../debug_squad/ \ No newline at end of file