Skip to content

paddlenlp库中的aistudio_sdk版本问题 #10809

@FantasyJXF

Description

@FantasyJXF

问题描述

paddlepaddle-gpu: 3.1.0
paddlenlp: 3.0.0b4
在使用PP-UIE模型时遇到一个小问题: 模型运行依赖的aistudio-sdk库需要是0.2.6版本,但是模型文件下载又要求这个库是0.3.4版本,导致每次运行完旧模型我想下载新模型都要重装一下这个库。。。。

from pprint import pprint
from paddlenlp import Taskflow

schema = ['时间', '选手', '赛事名称'] # Define the schema for entity extraction
ie = Taskflow('information_extraction',
              schema= ['时间', '选手', '赛事名称'],
              schema_lang="zh",
              batch_size=1,
              model='paddlenlp/PP-UIE-7B',
              precision='float16')

model_input = "2月8日上午北京冬奥会自由式滑雪女子大跳台决赛中中国选手谷爱凌以188.25分获得金牌!"
result = ie(model_input)
pprint(result)

aistudio-sdk 0.3.4 代码报错

ImportError: cannot import name 'download' from 'aistudio_sdk.hub' (/usr/local/lib/python3.10/dist-packages/aistudio_sdk/hub.py

Metadata

Metadata

Assignees

Labels

othersunknown issue type

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions