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]: Taskflow如何指定模型路径,task为information_extraction #9698

Open
liujiachang opened this issue Dec 26, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@liujiachang
Copy link

请提出你的问题

我通过task_path和home_path设定均会报错

Traceback (most recent call last):
  File "/root/work/filestorage/liujc/paddle/main.py", line 7, in <module>
    model = Taskflow(
  File "/usr/local/lib/python3.10/dist-packages/paddlenlp/taskflow/taskflow.py", line 809, in __init__
    self.task_instance = task_class(
  File "/usr/local/lib/python3.10/dist-packages/paddlenlp/taskflow/information_extraction.py", line 536, in __init__
    self._get_inference_model()
  File "/usr/local/lib/python3.10/dist-packages/paddlenlp/taskflow/task.py", line 372, in _get_inference_model
    self._prepare_static_mode()
  File "/usr/local/lib/python3.10/dist-packages/paddlenlp/taskflow/task.py", line 227, in _prepare_static_mode
    self.predictor = paddle.inference.create_predictor(self._config)
RuntimeError: (Unavailable) Not allowed to load partial data via load_combine_op, please use load_op instead.
  [Hint: Expected buffer->eof() == true, but received buffer->eof():0 != true:1.] (at /paddle/paddle/phi/kernels/impl/load_combine_kernel_impl.h:81)
  [operator < load_combine > error]

而且保存的模型路径中,缺失了inference.pdmodel文件。

@liujiachang liujiachang added the question Further information is requested label Dec 26, 2024
@wawltor
Copy link
Collaborator

wawltor commented Dec 27, 2024

你的paddle是什么版本?

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