PaddleNLP icon indicating copy to clipboard operation
PaddleNLP copied to clipboard

[Bug]: information_extraction输出空

Open Helenailse1 opened this issue 2 years ago • 10 comments

软件环境

- paddlepaddle:
- paddlepaddle-gpu: 
- paddlenlp:

重复问题

  • [X] I have searched the existing issues

错误描述

information_extraction输出空

稳定复现步骤 & 代码

Python 3.7.4 (default, Aug 13 2019, 20:35:49) [GCC 7.3.0] :: Anaconda, Inc. on linux Type "help", "copyright", "credits" or "license" for more information.

from paddlenlp import Taskflow from pprint import pprint schema = ['时间', '选手', '赛事名称'] ie = Taskflow('information_extraction', schema=schema) [2023-09-14 11:20:42,175] [ INFO] - We are using <class 'paddlenlp.transformers.ernie.tokenizer.ErnieTokenizer'> to load '/home/bml/.paddlenlp/taskflow/information_extraction/uie-base'. pprint(ie("2月8日上午北京冬奥会自由式滑雪女子大跳台决赛中中国选手谷爱凌以188.25分获得金牌!")) /home/bml/storage/.local/lib/python3.7/site-packages/paddlenlp/transformers/tokenizer_utils_base.py:2481: FutureWarning: The max_seq_len argument is deprecated and will be removed in a future version, please use max_length instead. FutureWarning, /home/bml/storage/.local/lib/python3.7/site-packages/paddlenlp/transformers/tokenizer_utils_base.py:1884: FutureWarning: The pad_to_max_length argument is deprecated and will be removed in a future version, use padding=True or padding='longest' to pad to the longest sequence in the batch, or use padding='max_length' to pad to a max length. In this case, you can give a specific length with max_length (e.g. max_length=45) or leave max_length to None to pad to the maximal input size of the model (e.g. 512 for Bert). FutureWarning, [{}]

Helenailse1 avatar Sep 14 '23 05:09 Helenailse1

这个问题当前仅在CPU环境下发现,在GPU环境下可以正常输出,可以将paddle换成2.5.0rc1解决。后续paddle版本更新后,会解决这个问题。

DrownFish19 avatar Sep 14 '23 07:09 DrownFish19

@DrownFish19 请问在centos的CPU环境下,paddlepaddle和paddlenlp怎样的版本组合能解决这个问题?

TianruiZhang avatar Sep 18 '23 16:09 TianruiZhang

@TianruiZhang 我现在测试了paddle develop和paddlenlp 2.6.1是可以正常输出的。或者使用paddle 2.5.0rc1 + paddlenlp 2.6.1也可以正常输出,后续paddle2.5.2版本推出后应该能解决这个问题。

DrownFish19 avatar Sep 19 '23 01:09 DrownFish19

实测paddle 2.5.0rc1 + paddlenlp 2.5.2也可以正常输出。

syzykf02 avatar Sep 20 '23 13:09 syzykf02

现在离2.5.1发布都3个月了,还不见2.5.2或者2.6.0的踪影……

另外,神奇的是,用evaluate.py 脚本,在2.5.1下的CPU环境,竟然是正确推理的。

mikeshi80 avatar Oct 25 '23 02:10 mikeshi80

2.5.2出来了,一样不行,还得给它把版本降回去,无语

moqiaaa avatar Nov 17 '23 05:11 moqiaaa

@DrownFish19 paddle2.5.2出来后问题依然存在,有点影响paddlenlp与其他模块的应用

magicianCoder avatar Dec 19 '23 03:12 magicianCoder

请问window10安装哪个版本的paddlepaddle? 安装了paddlepaddle==2.5.0rc1 + paddlenlp==2.6.1不行啊

hjing100 avatar Jan 12 '24 12:01 hjing100

paddlepadle2.4.1 ,paddlenlp 2.4.0 window10+CPU版的paddlepaddle可以

hjing100 avatar Jan 12 '24 12:01 hjing100

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] avatar Apr 28 '24 00:04 github-actions[bot]