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

[Bug]: 例子(信息抽取)出错 #8693

Open
1 task done
yuwiggin opened this issue Jul 1, 2024 · 1 comment
Open
1 task done

[Bug]: 例子(信息抽取)出错 #8693

yuwiggin opened this issue Jul 1, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@yuwiggin
Copy link

yuwiggin commented Jul 1, 2024

软件环境

- paddlepaddle: 2.6.1
- paddlepaddle-gpu: 
- paddlenlp: 2.8.1
- paddle2onnx 1.2.4
- paddlefsl 1.1.0

重复问题

  • I have searched the existing issues

错误描述

/home/wiggin/miniconda3/envs/paddle_env/lib/python3.8/site-packages/_distutils_hack/__init__.py:26: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
[2024-07-01 23:27:22,616] [ WARNING] - if you run ring_flash_attention.py, please ensure you install the paddlenlp_ops by following the instructions provided at https://github.com/PaddlePaddle/PaddleNLP/blob/develop/csrc/README.md
Traceback (most recent call last):
  File "extract.py", line 5, in <module>
    ie = Taskflow('information_extraction', schema=schema)
  File "/home/wiggin/PaddleNLP/paddlenlp/taskflow/taskflow.py", line 809, in __init__
    self.task_instance = task_class(
  File "/home/wiggin/PaddleNLP/paddlenlp/taskflow/information_extraction.py", line 538, in __init__
    self._construct_tokenizer()
  File "/home/wiggin/PaddleNLP/paddlenlp/taskflow/information_extraction.py", line 595, in _construct_tokenizer
    self._tokenizer = AutoTokenizer.from_pretrained(
  File "/home/wiggin/PaddleNLP/paddlenlp/transformers/auto/tokenizer.py", line 223, in from_pretrained
    raise ValueError("use_fast is deprecated")
ValueError: use_fast is deprecated

稳定复现步骤 & 代码

extract.py 如下:

# 信息抽取
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分获得金牌!"))

运行出错如上所述。

@yuwiggin yuwiggin added the bug Something isn't working label Jul 1, 2024
@wawltor
Copy link
Collaborator

wawltor commented Jul 3, 2024

谢谢提出问题,我们进行了修复,请看 cf57f86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants