Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: 词性标注报错Segmentation fault (core dumped) #9737

Open
sealofyou opened this issue Jan 3, 2025 · 2 comments
Open

[Question]: 词性标注报错Segmentation fault (core dumped) #9737

sealofyou opened this issue Jan 3, 2025 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@sealofyou
Copy link

请提出你的问题

版本Python3.9

paddle-bfloat 0.1.7
paddle2onnx 1.3.1
paddlefsl 1.1.0
paddlehub 2.4.0
paddlenlp 2.6.1
paddleocr 2.8.0
paddlepaddle-gpu 2.6.2

image

只有这个有Segmentation fault (core dumped)

uie抽取相关也可以正常使用。

此代码报错

去掉, user_dict="user_dict.txt"仍报错

tag = Taskflow("pos_tagging", batch_size=4, user_dict="user_dict.txt")
# 百度飞桨NER【机构类】实体识别方法,通过用户自定义分词字典的方案
@app.post("/NER_ORG")
async def textIE(text: Text):
    print(text.text)
    ner_result = tag(text.text)
    return json.dumps(ner_result, ensure_ascii=False)

此代码不报错

# 百度飞桨的NER实体识别的方法
ner = Taskflow("ner", user_dict="ner_user_dict.txt")
@app.post("/NER")
async def textIE(text: Text):
    print(text.text)
    ner_result = ner(text.text)
    return json.dumps(ner_result, ensure_ascii=False)
@sealofyou sealofyou added the question Further information is requested label Jan 3, 2025
@abbydev
Copy link

abbydev commented Jan 6, 2025

我这边的验证结果,词性标注只能在python37下面可用,38,39均推理不出来正确结果,不报错
paddlenlp 2.5.2
paddlepaddle 2.4.2
这个功能还是NLP的经典任务,还是期待社区能维护起来

@paddle-bot paddle-bot bot assigned ZHUI Jan 6, 2025
@sealofyou
Copy link
Author

补充:Python 3.9.21,下面版本不安装paddlepaddle-gpu可运行NER_ORG,但安装paddlepaddle-gpu后会出现Segmentation fault (core dumped)问题
image
paddle相关版本
image
下面是paddlepaddle-gpu测试:
image
依赖(需要用--no-deps安装):uie_req.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants