提交 afa392c1 编写于 作者: K kgresearch

modify predict.sh, train.sh

上级 a6bd3558
set -eux set -eux
export TASK_DATA_PATH=./data/ export TASK_DATA_PATH=./data/
export DEV_FILE=dev.json
export MODEL_PATH=./pretrained_model/ export MODEL_PATH=./pretrained_model/
export CHECKPOINT=./checkpoints/step_60000/ export CHECKPOINT=./checkpoints/step_60000/
export TEST_SAVE=./data/ export TEST_SAVE=./data/
...@@ -17,8 +18,8 @@ CUDA_VISIBLE_DEVICES=7 python -u ./ernie/run_duie.py \ ...@@ -17,8 +18,8 @@ CUDA_VISIBLE_DEVICES=7 python -u ./ernie/run_duie.py \
--num_labels 112 \ --num_labels 112 \
--label_map_config ${TASK_DATA_PATH}relation2label.json \ --label_map_config ${TASK_DATA_PATH}relation2label.json \
--spo_label_map_config ${TASK_DATA_PATH}label2relation.json \ --spo_label_map_config ${TASK_DATA_PATH}label2relation.json \
--test_set ${TASK_DATA_PATH}dev_demo.json \ --test_set ${TASK_DATA_PATH}${DEV_FILE} \
--test_save ${TEST_SAVE}predict_test.json \ --test_save ${TEST_SAVE}predict_dev.json \
--vocab_path ${MODEL_PATH}vocab.txt \ --vocab_path ${MODEL_PATH}vocab.txt \
--ernie_config_path ${MODEL_PATH}ernie_config.json \ --ernie_config_path ${MODEL_PATH}ernie_config.json \
--use_fp16 false \ --use_fp16 false \
......
...@@ -8,6 +8,8 @@ export SAVE_STEPS=5000 ...@@ -8,6 +8,8 @@ export SAVE_STEPS=5000
export SAVE_PATH=./ export SAVE_PATH=./
export TASK_DATA_PATH=./data/ export TASK_DATA_PATH=./data/
export MODEL_PATH=./pretrained_model/ export MODEL_PATH=./pretrained_model/
export TRAIN_FILE=train.json
export DEV_FILE=dev.json
export FLAGS_sync_nccl_allreduce=1 export FLAGS_sync_nccl_allreduce=1
export PYTHONPATH=./ernie:${PYTHONPATH:-} export PYTHONPATH=./ernie:${PYTHONPATH:-}
...@@ -23,8 +25,8 @@ CUDA_VISIBLE_DEVICES=7 python -u ./ernie/run_duie.py \ ...@@ -23,8 +25,8 @@ CUDA_VISIBLE_DEVICES=7 python -u ./ernie/run_duie.py \
--chunk_scheme "IOB" \ --chunk_scheme "IOB" \
--label_map_config ${TASK_DATA_PATH}relation2label.json \ --label_map_config ${TASK_DATA_PATH}relation2label.json \
--spo_label_map_config ${TASK_DATA_PATH}label2relation.json \ --spo_label_map_config ${TASK_DATA_PATH}label2relation.json \
--train_set ${TASK_DATA_PATH}train_demo.json \ --train_set ${TASK_DATA_PATH}${TRAIN_FILE} \
--dev_set ${TASK_DATA_PATH}dev_demo.json \ --dev_set ${TASK_DATA_PATH}${DEV_FILE} \
--vocab_path ${MODEL_PATH}vocab.txt \ --vocab_path ${MODEL_PATH}vocab.txt \
--ernie_config_path ${MODEL_PATH}ernie_config.json \ --ernie_config_path ${MODEL_PATH}ernie_config.json \
--checkpoints ${SAVE_PATH}checkpoints \ --checkpoints ${SAVE_PATH}checkpoints \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册