From afa392c1b3a16ea8f6c5fad8b7781a239e272890 Mon Sep 17 00:00:00 2001 From: kgresearch Date: Thu, 13 Feb 2020 14:46:22 +0800 Subject: [PATCH] modify predict.sh, train.sh --- PaddleKG/DuIE_Baseline/script/predict.sh | 5 +++-- PaddleKG/DuIE_Baseline/script/train.sh | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/PaddleKG/DuIE_Baseline/script/predict.sh b/PaddleKG/DuIE_Baseline/script/predict.sh index fd219920..9e74ea48 100755 --- a/PaddleKG/DuIE_Baseline/script/predict.sh +++ b/PaddleKG/DuIE_Baseline/script/predict.sh @@ -1,6 +1,7 @@ set -eux export TASK_DATA_PATH=./data/ +export DEV_FILE=dev.json export MODEL_PATH=./pretrained_model/ export CHECKPOINT=./checkpoints/step_60000/ export TEST_SAVE=./data/ @@ -17,8 +18,8 @@ CUDA_VISIBLE_DEVICES=7 python -u ./ernie/run_duie.py \ --num_labels 112 \ --label_map_config ${TASK_DATA_PATH}relation2label.json \ --spo_label_map_config ${TASK_DATA_PATH}label2relation.json \ - --test_set ${TASK_DATA_PATH}dev_demo.json \ - --test_save ${TEST_SAVE}predict_test.json \ + --test_set ${TASK_DATA_PATH}${DEV_FILE} \ + --test_save ${TEST_SAVE}predict_dev.json \ --vocab_path ${MODEL_PATH}vocab.txt \ --ernie_config_path ${MODEL_PATH}ernie_config.json \ --use_fp16 false \ diff --git a/PaddleKG/DuIE_Baseline/script/train.sh b/PaddleKG/DuIE_Baseline/script/train.sh index 5df26204..95e333c0 100755 --- a/PaddleKG/DuIE_Baseline/script/train.sh +++ b/PaddleKG/DuIE_Baseline/script/train.sh @@ -8,6 +8,8 @@ export SAVE_STEPS=5000 export SAVE_PATH=./ export TASK_DATA_PATH=./data/ export MODEL_PATH=./pretrained_model/ +export TRAIN_FILE=train.json +export DEV_FILE=dev.json export FLAGS_sync_nccl_allreduce=1 export PYTHONPATH=./ernie:${PYTHONPATH:-} @@ -23,8 +25,8 @@ CUDA_VISIBLE_DEVICES=7 python -u ./ernie/run_duie.py \ --chunk_scheme "IOB" \ --label_map_config ${TASK_DATA_PATH}relation2label.json \ --spo_label_map_config ${TASK_DATA_PATH}label2relation.json \ - --train_set ${TASK_DATA_PATH}train_demo.json \ - --dev_set ${TASK_DATA_PATH}dev_demo.json \ + --train_set ${TASK_DATA_PATH}${TRAIN_FILE} \ + --dev_set ${TASK_DATA_PATH}${DEV_FILE} \ --vocab_path ${MODEL_PATH}vocab.txt \ --ernie_config_path ${MODEL_PATH}ernie_config.json \ --checkpoints ${SAVE_PATH}checkpoints \ -- GitLab