PaddlePaddle / PaddleX

All-in-One Development Tool based on PaddlePaddle(飞桨低代码开发工具)
Apache License 2.0
4.82k stars 950 forks source link

配置好环境后,运行示例代码,报错 #2275

Closed yanziwu621 closed 1 day ago

yanziwu621 commented 5 days ago

File "/......./PaddleX/paddlex/inference/components/paddle_predictor/predictor.py", line 145, in _create predictor = create_predictor(config) RuntimeError: (PreconditionNotMet) Tensor's dimension is out of bound.Tensor's dimension must be equal or less than the size of its memory.But received Tensor's dimension is 8, memory's size is 0. [Hint: Expected numel() SizeOf(dtype()) <= memory_size(), but received numel() SizeOf(dtype()):8 > memory_size():0.] (at /paddle/paddle/phi/core/dense_tensor_impl.cc:55) [operator < cast > error]

liu-jiaxuan commented 5 days ago

是用的哪个示例代码呢

yanziwu621 commented 5 days ago

from paddlex import create_pipeline

pipeline = create_pipeline( pipeline="PP-ChatOCRv3-doc", llm_name="ernie-3.5", llm_params={"api_type": "qianfan", "ak": "test", "sk": "test"}, # 请填入您的ak与sk,否则无法调用大模型

llm_params={"api_type": "aistudio", "access_token": "test"}, # 请填入您的access_token,否则无法调用大模型

device="gpu:3"
)

visual_result, visual_info = pipeline.visual_predict("resume.pdf")

for res in visual_result: res.save_to_img("./output") res.save_to_html('./output') res.save_to_xlsx('./output')

vector = pipeline.build_vector(visual_info=visual_info)

chat_result = pipeline.chat( key_list=["姓名", "手机号"], visual_info=visual_info, vector=vector, ) chat_result.print()

cuicheng01 commented 5 days ago

Paddle的版本是?请确保是PaddlePaddle 3.0beta1

yanziwu621 commented 1 day ago

Paddle的版本更新至3.0beta1,运行成功。