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_squad.sh 1.7 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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_squad.sh"
  19. echo "for example: bash scripts/run_squad.sh"
  20. echo "assessment_method include: [Accuracy]"
  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_squad.py \
  28. --device_target="Ascend" \
  29. --do_train="true" \
  30. --do_eval="false" \
  31. --device_id=0 \
  32. --epoch_num=1 \
  33. --num_class=2 \
  34. --vocab_file_path="" \
  35. --eval_json_path="" \
  36. --save_finetune_checkpoint_path="" \
  37. --load_pretrain_checkpoint_path="" \
  38. --load_finetune_checkpoint_path="" \
  39. --train_data_file_path="" \
  40. --eval_data_file_path="" \
  41. --schema_file_path="" > log.txt 2>&1 &