Skip to content

Commit

Permalink
Merge pull request huggingface#20 from stevezheng23/dev/zheng/quac
Browse files Browse the repository at this point in the history
add quac codalab submission pipeline (cont.)
  • Loading branch information
stevezheng23 authored Nov 1, 2019
2 parents 813b965 + 8e8a4f5 commit 2b1c8dc
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions examples/run_quac.codalab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,20 @@ alias python=python3
git clone -b dev/zheng/quac --single-branch https://github.com/stevezheng23/transformers.git

cd transformers
cp examples/run_quac.py ./
cp examples/util_quac.py ./
cp examples/util_quac_evaluate.py ./

mkdir data
mkdir data/quac
cp ../${INPUTFILE} data/quac/dev-v0.2.json

mkdir output
mkdir output/quac
wget -P output/quac https://storage.googleapis.com/mrc_data/quac/roberta-large-quac-20191101.zip
unzip output/quac/roberta-large-quac-20191101.zip -d output/quac/
rm output/quac/roberta-large-quac-20191101.zip
wget -P output/quac https://storage.googleapis.com/mrc_data/quac/roberta-large-quac-20191101.0.zip
unzip output/quac/roberta-large-quac-20191101.0.zip -d output/quac/
mv output/quac/roberta-large-quac-20191101.0 output/quac/roberta-large-quac
rm output/quac/roberta-large-quac-20191101.0.zip

CUDA_VISIBLE_DEVICES=0 python run_quac.py \
--model_type=roberta \
Expand All @@ -48,7 +52,7 @@ CUDA_VISIBLE_DEVICES=0 python run_quac.py \
--max_query_length=64 \
--max_answer_length=30 \
--doc_stride=128 \
--output_dir=output/quac/roberta-large-quac-20191101 \
--output_dir=output/quac/roberta-large-quac \
--per_gpu_eval_batch_size=12 \
--per_gpu_train_batch_size=12 \
--seed=1000 \
Expand All @@ -59,7 +63,7 @@ CUDA_VISIBLE_DEVICES=0 python run_quac.py \

python utils_quac_evaluate.py \
--val_file=data/quac/dev-v0.2.json \
--model_output=output/quac/roberta-large-quac-20191101/predictions_.json \
--model_output=output/quac/roberta-large-quac/predictions_.json \
--o=output/quac/pred.json

cp output/quac/pred.json ../${OUTPUTFILE}
Expand Down

0 comments on commit 2b1c8dc

Please sign in to comment.