[Question]: paddlenlp 3.0.0b1版本使用uie-m-base报错找不到static/inference.pdmodel
请提出你的问题
CPU版本运行官方示例:
from pprint import pprint
from paddlenlp import Taskflow
schema = schema = ['Time', 'Player', 'Competition', 'Score']# Define the schema for entity extraction
ie = Taskflow('information_extraction', schema=schema, model="uie-m-base", schema_lang="en")
pprint(ie("2月8日上午北京冬奥会自由式滑雪女子大跳台决赛中中国选手谷爱凌以188.25分获得金牌!")) # B
报错提示:
Traceback (most recent call last):
File "/home/yqliu/liuyu_qing/work/study/paddle/PaddleNLP-3.0.0-beta2/legacy/model_zoo/uie/a.py", line 4, i
ie = Taskflow('information_extraction', schema=schema, model="uie-m-base", schema_lang="en")
File "/home/yqliu/anaconda3/envs/uie/lib/python3.9/site-packages/paddlenlp/taskflow/taskflow.py", line 809
self.task_instance = task_class(
File "/home/yqliu/anaconda3/envs/uie/lib/python3.9/site-packages/paddlenlp/taskflow/information_extraction
self._get_inference_model()
File "/home/yqliu/anaconda3/envs/uie/lib/python3.9/site-packages/paddlenlp/taskflow/task.py", line 372, in
self._prepare_static_mode()
File "/home/yqliu/anaconda3/envs/uie/lib/python3.9/site-packages/paddlenlp/taskflow/task.py", line 227, in
self.predictor = paddle.inference.create_predictor(self._config)
RuntimeError: (NotFound) Cannot open file /home/yqliu/.paddlenlp/taskflow/information_extraction/uie-m-base/hether the file is normal.
使用uie-base、uie-base-en模型无问题,混合模型uie-m-base报错,基于uie-m-base微调了一个新模型,微调模型可以执行评估代码eval.py,但是使用taskflow也报相同的错误。
环境信息:
# Name Version Build Channel
paddle2onnx 1.3.1 pypi_0 pypi
paddlefsl 1.1.0 pypi_0 pypi
paddlenlp 3.0.0b1 pypi_0 pypi
paddlepaddle 3.0.0b1 py39_cpu_many_linux paddle
Traceback (most recent call last):
File "/home/XXX/code/PaddleNLP-develop/slm/model_zoo/uie/uie_worlflow.py", line 12, in <module>
ie = Taskflow('information_extraction', schema=schema, model='uie-base',task_path='./checkpoint/model_best')
File "/home/XXX/miniconda3/envs/paddle/lib/python3.9/site-packages/paddlenlp/taskflow/taskflow.py", line 809, in __init__
self.task_instance = task_class(
File "/home/XXX/miniconda3/envs/paddle/lib/python3.9/site-packages/paddlenlp/taskflow/information_extraction.py", line 536, in __init__
self._get_inference_model()
File "/home/XXX/miniconda3/envs/paddle/lib/python3.9/site-packages/paddlenlp/taskflow/task.py", line 371, in _get_inference_model
self._config = paddle.inference.Config(self._static_model_file, self._static_params_file)
RuntimeError: (NotFound) Cannot open file ./checkpoint/model_best/static/inference.pdmodel, please confirm whether the file is normal.
[Hint: Expected paddle::inference::IsFileExists(prog_file_) == true, but received paddle::inference::IsFileExists(prog_file_):0 != true:1.] (at ../paddle/fluid/inference/api/analysis_config.cc:111)
======================== 使用finetune脚本训练的新模型同样有这样的问题,似乎finetune使用的模型和workflow的模型不一致,请教一下是不是有冲突,怎么解决?
先设置环境变量 export FLAGS_enable_pir_api=0 再进行微调试试
Traceback (most recent call last): File "/home/XXX/code/PaddleNLP-develop/slm/model_zoo/uie/uie_worlflow.py", line 12, in <module> ie = Taskflow('information_extraction', schema=schema, model='uie-base',task_path='./checkpoint/model_best') File "/home/XXX/miniconda3/envs/paddle/lib/python3.9/site-packages/paddlenlp/taskflow/taskflow.py", line 809, in __init__ self.task_instance = task_class( File "/home/XXX/miniconda3/envs/paddle/lib/python3.9/site-packages/paddlenlp/taskflow/information_extraction.py", line 536, in __init__ self._get_inference_model() File "/home/XXX/miniconda3/envs/paddle/lib/python3.9/site-packages/paddlenlp/taskflow/task.py", line 371, in _get_inference_model self._config = paddle.inference.Config(self._static_model_file, self._static_params_file) RuntimeError: (NotFound) Cannot open file ./checkpoint/model_best/static/inference.pdmodel, please confirm whether the file is normal. [Hint: Expected paddle::inference::IsFileExists(prog_file_) == true, but received paddle::inference::IsFileExists(prog_file_):0 != true:1.] (at ../paddle/fluid/inference/api/analysis_config.cc:111)======================== 使用finetune脚本训练的新模型同样有这样的问题,似乎finetune使用的模型和workflow的模型不一致,请教一下是不是有冲突,怎么解决?
我也出现了类似错误,缺失的模型似乎无法在线下载,只能手动下载,但还没找到在哪里下载,请问您解决了吗
尝试将paddlepaddle的版本降低,如paddlepaddle 2.6.2
尝试将paddlepaddle的版本降低,如paddlepaddle 2.6.2
谢谢,问题已解决,我就是降低了版本并重新安装了paddlepaddle 2.6.2
尝试将paddlepaddle的版本降低,如paddlepaddle 2.6.2
谢谢,问题已解决,我就是降低了版本并重新安装了paddlepaddle 2.6.2
请问你用的是paddlepaddle 和paddlenlp具体版本是多少,我用paddlepaddle 2.6.2gpu120版 和paddlenlp2.6.1 报cuda版本错误
尝试将paddlepaddle的版本降低,如paddlepaddle 2.6.2
谢谢,问题已解决,我就是降低了版本并重新安装了paddlepaddle 2.6.2
请问你用的是paddlepaddle 和paddlenlp具体版本是多少,我用paddlepaddle 2.6.2gpu120版 和paddlenlp2.6.1 报cuda版本错误
paddlenlp 2.6.1
paddlepaddle-gpu 2.6.2
Wed Mar 5 14:26:54 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 566.36 Driver Version: 566.36 CUDA Version: 12.7 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Driver-Model | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce GTX 1050 WDDM | 00000000:01:00.0 On | N/A |
| N/A 48C P3 N/A / 5001W | 1214MiB / 4096MiB | 1% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 2156 C+G ...1\extracted\runtime\WeChatAppEx.exe N/A |
| 0 N/A N/A 6460 C+G ....Search_cw5n1h2txyewy\SearchApp.exe N/A |
| 0 N/A N/A 17300 C+G ...CBS_cw5n1h2txyewy\TextInputHost.exe N/A |
| 0 N/A N/A 18892 C+G ...crosoft\Edge\Application\msedge.exe N/A |
| 0 N/A N/A 20516 C+G ...les\Microsoft OneDrive\OneDrive.exe N/A |
| 0 N/A N/A 33860 C+G C:\Windows\explorer.exe N/A |
| 0 N/A N/A 34584 C+G ...5n1h2txyewy\ShellExperienceHost.exe N/A |
| 0 N/A N/A 40056 C+G ...t.LockApp_cw5n1h2txyewy\LockApp.exe N/A |
| 0 N/A N/A 44708 C+G D:\QQNT\QQ.exe N/A |
| 0 N/A N/A 72696 C+G ...ft Office\root\Office16\WINWORD.EXE N/A |
| 0 N/A N/A 107268 C+G D:\Twinkstar Browser\twinkstar.exe N/A |
| 0 N/A N/A 107648 C+G ...paper_engine\bin\webwallpaper32.exe N/A |
+-----------------------------------------------------------------------------------------+
尝试将paddlepaddle的版本降低,如paddlepaddle 2.6.2
谢谢,问题已解决,我就是降低了版本并重新安装了paddlepaddle 2.6.2
请问你用的是paddlepaddle 和paddlenlp具体版本是多少,我用paddlepaddle 2.6.2gpu120版 和paddlenlp2.6.1 报cuda版本错误
paddlenlp 2.6.1 paddlepaddle-gpu 2.6.2Wed Mar 5 14:26:54 2025 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 566.36 Driver Version: 566.36 CUDA Version: 12.7 | |-----------------------------------------+------------------------+----------------------+ | GPU Name Driver-Model | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce GTX 1050 WDDM | 00000000:01:00.0 On | N/A | | N/A 48C P3 N/A / 5001W | 1214MiB / 4096MiB | 1% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | 0 N/A N/A 2156 C+G ...1\extracted\runtime\WeChatAppEx.exe N/A | | 0 N/A N/A 6460 C+G ....Search_cw5n1h2txyewy\SearchApp.exe N/A | | 0 N/A N/A 17300 C+G ...CBS_cw5n1h2txyewy\TextInputHost.exe N/A | | 0 N/A N/A 18892 C+G ...crosoft\Edge\Application\msedge.exe N/A | | 0 N/A N/A 20516 C+G ...les\Microsoft OneDrive\OneDrive.exe N/A | | 0 N/A N/A 33860 C+G C:\Windows\explorer.exe N/A | | 0 N/A N/A 34584 C+G ...5n1h2txyewy\ShellExperienceHost.exe N/A | | 0 N/A N/A 40056 C+G ...t.LockApp_cw5n1h2txyewy\LockApp.exe N/A | | 0 N/A N/A 44708 C+G D:\QQNT\QQ.exe N/A | | 0 N/A N/A 72696 C+G ...ft Office\root\Office16\WINWORD.EXE N/A | | 0 N/A N/A 107268 C+G D:\Twinkstar Browser\twinkstar.exe N/A | | 0 N/A N/A 107648 C+G ...paper_engine\bin\webwallpaper32.exe N/A | +-----------------------------------------------------------------------------------------+
谢谢,我也是nlp2.6.1的,cuda12.8,见了鬼了😂
你好 这个PR尝试修复了一些问题,你可以尝试安装 paddlenlp=3.0.0b4 试试 https://github.com/PaddlePaddle/PaddleNLP/pull/9822
This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。
直接paddle和paddlenlp都升级最新版,再单独下载一下model文件就可以,下载链接可以参考bash展示的static其他几个文件的链接
飞浆真垃圾,人家HFT一遍就通过了,paddle怎么弄都通不过。用户这么多,能不能好好维护,健壮性强一点,百度还有几个亮点项目,真让人着急。
inference.pdmodel 这个模型在哪里下载我这边也报这个错
换成paddlepaddle 2.6.2也不行,还是报错,找不到解决的办法了
换成paddlepaddle 2.6.2也不行,还是报错,找不到解决的办法了
把之前的路径下C:\Users\你的用户名.paddlenlp 直接全部删除,然后安装2.6.2 的paddlepaddle;重复报错是因为之前不同的版本用的不同的模型
我也困扰了一段时间。后来运行案例解决了问题。将缺失的文件分享出来,这是uie-base/static里面的。 https://pan.baidu.com/s/10MoIVfCeUA6vUhBTcWeSwA?pwd=uieb (提取码: uieb )
我也困扰了一段时间。后来运行案例解决了问题。将缺失的文件分享出来,这是uie-base/static里面的。 https://pan.baidu.com/s/10MoIVfCeUA6vUhBTcWeSwA?pwd=uieb (提取码: uieb )
感谢分享,下载后放到uie-base/static后运行又报了个别的错误:
信息: 用提供的模式无法找到文件。
C:\yss\coding\python\ai.venv\Lib\site-packages\paddle\utils\cpp_extension\extension_utils.py:718: Use
rWarning: No ccache found. Please be aware that recompiling all source files may be required. You can
download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md
warnings.warn(warning_message)
C:\yss\coding\python\ai.venv\Lib\site-packages\jieba_compat.py:18: UserWarning: pkg_resources is dep
recated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources pack
age is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools
<81.
import pkg_resources
[2025-12-11 18:30:05,380] [ INFO] - We are using <class 'paddlenlp.transformers.ernie.tokenizer.Ern
ieTokenizer'> to load 'C:\Users\luocm.paddlenlp\taskflow\information_extraction\uie-base'.
C:\yss\coding\python\ai.venv\Lib\site-packages\paddlenlp\transformers\tokenizer_utils_base.py:2478: F
utureWarning: The max_seq_len argument is deprecated and will be removed in a future version, please
use max_length instead.
warnings.warn(
C:\yss\coding\python\ai.venv\Lib\site-packages\paddlenlp\transformers\tokenizer_utils_base.py:1878: F
utureWarning: 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).
warnings.warn(
WARNING: Logging before InitGoogleLogging() is written to STDERR
I1211 18:30:05.400938 27256 onednn_context.cc:81] oneDNN v3.6.2
Traceback (most recent call last):
File "C:\yss\coding\python\ai\uie\test_taskflow.py", line 43, in
backends\onednn\onednn_context.cc:345)
[operator < fc > error]
[Process exited 0]
@ilovevim 这个就跟onednn后端有关了,可能paddle版本不匹配?或许问一下大模型,解决得会快一点。