“b0f83eda34d19e8c6f5baf0b313540743fc91bc4”上不存在“python/paddle/base/framework.py”
task.sh 2.9 KB
Newer Older
T
tianxin 已提交
1 2 3 4 5
#!/bin/bash

R_DIR=`dirname $0`; MYDIR=`cd $R_DIR;pwd`
export FLAGS_eager_delete_tensor_gb=0.0
export FLAGS_sync_nccl_allreduce=1
C
chenxuyi 已提交
6
export PYTHONPATH=./ernie:${PYTHONPATH:-}
T
tianxin 已提交
7 8 9 10 11 12 13 14 15 16 17 18 19

if [[ -f ./model_conf ]];then
    source ./model_conf
else
    export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
fi

mkdir -p log/

for i in {1..5};do

  timestamp=`date "+%Y-%m-%d-%H-%M-%S"`

C
chenxuyi 已提交
20
  python -u ./ernie/run_classifier.py                                                      \
T
tianxin 已提交
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
       --for_cn False                                                              \
       --ernie_config_path script/en_glue/ernie_large/ernie_config.json            \
       --validation_steps 1000000000000                                            \
       --use_cuda true                                                             \
       --use_fast_executor ${e_executor:-"true"}                                   \
       --tokenizer ${TOKENIZER:-"FullTokenizer"}                                   \
       --use_fp16 ${USE_FP16:-"false"}                                             \
       --do_train true                                                             \
       --do_val true                                                               \
       --do_test true                                                              \
       --batch_size 32                                                             \
       --init_pretraining_params ${MODEL_PATH}/params                              \
       --verbose true                                                              \
       --train_set ${TASK_DATA_PATH}/QQP/train.tsv                                 \
       --dev_set   ${TASK_DATA_PATH}/QQP/dev.tsv                                   \
       --test_set  ${TASK_DATA_PATH}/QQP/test.tsv                                  \
       --vocab_path script/en_glue/ernie_large/vocab.txt                           \
       --checkpoints ./checkpoints                                                 \
       --save_steps 30000                                                          \
       --weight_decay  0.0                                                         \
       --warmup_proportion 0.1                                                     \
       --epoch 3                                                                   \
       --max_seq_len 128                                                           \
       --learning_rate 5e-5                                                        \
       --skip_steps 500                                                            \
       --num_iteration_per_drop_scope 1                                            \
       --num_labels 2                                                              \
       --metric 'acc_and_f1'                                                       \
       --test_save output/test_out.$i.$timestamp.tsv                               \
       --random_seed 1 2>&1 | tee  log/job.$i.$timestamp.log                       \

done