PaddleNLP icon indicating copy to clipboard operation
PaddleNLP copied to clipboard

[Question]: pp-uie使用taskflow无法加载自定义路径模型,只能加载默认路径:C:\Users\.paddlenlp\models\paddlenlp/PP-UIE-0.5B

Open DaveLiu6 opened this issue 9 months ago • 3 comments

请提出你的问题

ie = Taskflow('information_extraction', schema=[{'人物': ["性别", "出生年月", "毕业院校", "民族", "籍贯", "担任职位"]}], schema_lang="zh", batch_size=1, model='paddlenlp/PP-UIE-0.5B', precision='float32', task_path='./PP-UIE-0.5B') # 绝对路径和相对路径都无法加载

DaveLiu6 avatar Apr 14 '25 11:04 DaveLiu6

你试试把 model 修改为路径 './PP-UIE-0.5B'

ZHUI avatar Apr 15 '25 03:04 ZHUI

你试试把 model 修改为路径 './PP-UIE-0.5B'

不行的,model是模型名称,必须为paddlenlp/PP-UIE-0.5B,否则会报错,task_path没起到作用

DaveLiu6 avatar Apr 15 '25 08:04 DaveLiu6

因为系统会下载模型,所以自定义了路径,目前试过,改了路径还是没生效,不知道为啥

BeyondYourself avatar Jun 09 '25 10:06 BeyondYourself

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

github-actions[bot] avatar Aug 09 '25 00:08 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。

github-actions[bot] avatar Aug 24 '25 00:08 github-actions[bot]