Skip to content

Commit f354fe6

Browse files
authored
[ERNIE-M] Using gpu in CI case script and add more data for testing (PaddlePaddle#4958)
1 parent 703a7d9 commit f354fe6

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

model_zoo/ernie-m/README.md

+13-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,19 @@
2929

3030
```text
3131
.
32-
├── README.md # 文档
33-
├── run_classifier.py # 自然语言推断任务
32+
|-- README.md # 文档
33+
|-- deploy # 部署目录
34+
| |-- predictor # onnx离线部署
35+
| | |-- README.md
36+
| | |-- ernie_m_predictor.py
37+
| | |-- inference.py
38+
| | |-- requirements_cpu.txt
39+
| | `-- requirements_gpu.txt
40+
| `-- simple_serving # 基于PaddleNLP SimpleServing 服务化部署
41+
| |-- README.md
42+
| |-- client_seq_cls.py
43+
| `-- server_seq_cls.py
44+
`-- run_classifier.py # 分类任务微调脚本
3445
```
3546

3647
## 开始运行

scripts/regression/ci_case.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,7 @@ if [ ! -f 'test.py' ];then
969969
--do_train \
970970
--do_eval \
971971
--do_export \
972+
--device gpu \
972973
--task_type cross-lingual-transfer \
973974
--model_name_or_path __internal_testing__/ernie-m \
974975
--use_test_data True \
@@ -984,7 +985,7 @@ if [ ! -f 'test.py' ];then
984985
print_info $? ernie-m_clt
985986
# inference for cross-lingual-transfer
986987
python deploy/predictor/inference.py \
987-
--device cpu \
988+
--device gpu \
988989
--task_name seq_cls \
989990
--model_path output_clt/export/model >${log_path}/ernie-m_clt_infer >>${log_path}/ernie-m_clt_infer 2>&1
990991
print_info $? ernie-m_clt_infer
@@ -993,6 +994,7 @@ if [ ! -f 'test.py' ];then
993994
--do_train \
994995
--do_eval \
995996
--do_export \
997+
--device gpu \
996998
--task_type translate-train-all \
997999
--model_name_or_path __internal_testing__/ernie-m \
9981000
--use_test_data True \
@@ -1008,7 +1010,7 @@ if [ ! -f 'test.py' ];then
10081010
print_info $? ernie-m_tta
10091011
# inference for translate-train-all
10101012
python deploy/predictor/inference.py \
1011-
--device cpu \
1013+
--device gpu \
10121014
--task_name seq_cls \
10131015
--model_path output_tta/export/model >${log_path}/ernie-m_tta_infer >>${log_path}/ernie-m_tta_infer 2>&1
10141016
print_info $? ernie-m_tta_infer

tests/fixtures/tests_samples/xnli/xnli.jsonl

+15
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@
88
"hypothesis": "A member of my team will execute your orders with immense precision .",
99
"label": 2
1010
}
11+
{
12+
"premise": "Conceptually cream skimming has two basic dimensions - product and geography .",
13+
"hypothesis": "Product and geography are what make cream skimming work .",
14+
"label": 1
15+
}
16+
{
17+
"premise": "从 概念 上 看 , 奶油 收入 有 两 个 基本 方面 产品 和 地理 .",
18+
"hypothesis": "产品 和 地理 是 什么 使 奶油 抹 霜 工作 .",
19+
"label": 0
20+
}
21+
{
22+
"premise": "One of our number will carry out your instructions minutely .",
23+
"hypothesis": "A member of my team will execute your orders with immense precision .",
24+
"label": 2
25+
}
1126
{
1227
"premise": "Conceptually cream skimming has two basic dimensions - product and geography .",
1328
"hypothesis": "Product and geography are what make cream skimming work .",

0 commit comments

Comments
 (0)