PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
12.17k stars 2.95k forks source link

[Bug]: paddlenlp server启动Segmentation fault #6784

Open matiomlei opened 1 year ago

matiomlei commented 1 year ago

软件环境

- paddlepaddle:
- paddlepaddle-gpu: 2.5.1.post102 2.5.0.post102 2.4.2
- paddlenlp: 2.5.2
- cuda 10.2
- cudnn 7.6.5

重复问题

错误描述

gpu环境使用命令运行paddlenlp server server:app --workers 1 --host 0.0.0.0 --port 8189
报Segmentation fault。

使用paddlepaddle-2.4.2,cpu版本没有问题。

gpu环境执行示例
>>> from pprint import pprint
>>> from paddlenlp import Taskflow

>>> schema = ['时间', '选手', '赛事名称'] # Define the schema for entity extraction
>>> ie = Taskflow('information_extraction', schema=schema)
>>> pprint(ie("2月8日上午北京冬奥会自由式滑雪女子大跳台决赛中中国选手谷爱凌以188.25分获得金牌!")) # Better print results using pprint
报同样错误。

稳定复现步骤 & 代码

root@paddlenlp-846d4c6dfb-wrc4t:/opt/deployments/flask-app/PaddleNLP/model_zoo/uie/deploy/serving/sim ple_serving# paddlenlp server server:app --workers 1 --host 0.0.0.0 --port 8189[2023-08-21 16:32:46,159] [    INFO] - starting to PaddleNLP SimpleServer... [2023-08-21 16:32:46,159] [    INFO] - The PaddleNLP SimpleServer is starting, backend component uvicorn arguments as follows: [2023-08-21 16:32:46,159] [    INFO] -    the starting argument [host]=0.0.0.0 [2023-08-21 16:32:46,159] [    INFO] -    the starting argument [port]=8189 [2023-08-21 16:32:46,159] [    INFO] -    the starting argument [log_level]=None [2023-08-21 16:32:46,159] [    INFO] -    the starting argument [workers]=1 [2023-08-21 16:32:46,159] [    INFO] -    the starting argument [limit_concurrency]=None [2023-08-21 16:32:46,159] [    INFO] -    the starting argument [limit_max_requests]=None [2023-08-21 16:32:46,159] [    INFO] -    the starting argument [timeout_keep_alive]=15 [2023-08-21 16:32:46,160] [    INFO] -    the starting argument [app_dir]=/opt/deployments/flask-app/PaddleNLP/model_zoo/uie/deploy/serving/simple_serving [2023-08-21 16:32:46,160] [    INFO] -    the starting argument [reload]=False Segmentation fault

matiomlei commented 1 year ago

具体报错在task.py self.predictor = paddle.inference.create_predictor(self._config)这一行

sisrfeng commented 1 year ago
import paddle
# paddle.set_device("cpu")
from pprint import pprint
from paddlenlp import Taskflow
schema = ["收发货人", "进口口岸", "进口日期", "运输方式", "征免性质", "境内目的地", "运输工具名称", "包装种类", "件数", "合同协议号"]
ie = Taskflow("information_extraction", schema=schema, model="uie-x-base")

也报Segmentation fault