You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

run_ner.sh 1.7 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/bash
  2. # Copyright 2020 Huawei Technologies Co., Ltd
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. # ============================================================================
  16. echo "=============================================================================================================="
  17. echo "Please run the scipt as: "
  18. echo "bash scripts/run_ner.sh"
  19. echo "for example: bash scripts/run_ner.sh"
  20. echo "assessment_method include: [F1, clue_benchmark]"
  21. echo "=============================================================================================================="
  22. mkdir -p ms_log
  23. CUR_DIR=`pwd`
  24. PROJECT_DIR=$(cd "$(dirname "$0")" || exit; pwd)
  25. export GLOG_log_dir=${CUR_DIR}/ms_log
  26. export GLOG_logtostderr=0
  27. python ${PROJECT_DIR}/../run_ner.py \
  28. --device_target="Ascend" \
  29. --do_train="true" \
  30. --do_eval="false" \
  31. --assessment_method="F1" \
  32. --use_crf="false" \
  33. --device_id=0 \
  34. --epoch_num=1 \
  35. --num_class=2 \
  36. --vocab_file_path="" \
  37. --label2id_file_path="" \
  38. --save_finetune_checkpoint_path="" \
  39. --load_pretrain_checkpoint_path="" \
  40. --load_finetune_checkpoint_path="" \
  41. --train_data_file_path="" \
  42. --eval_data_file_path="" \
  43. --schema_file_path="" > log.txt 2>&1 &