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

paddle Serving 部署模型,出现KeyError报错 #1903

Closed
fanruifeng opened this issue Jan 6, 2023 · 3 comments
Closed

paddle Serving 部署模型,出现KeyError报错 #1903

fanruifeng opened this issue Jan 6, 2023 · 3 comments

Comments

@fanruifeng
Copy link

环境
CUDA 11.6
cudnn 8.4.1
显卡:GTX 1080
python 3.6
paddle-serving-app 0.7.0
paddle-serving-client 0.7.0
paddle-serving-server-gpu 0.7.0.post112
paddlepaddle-gpu 2.3.2.post116

用paddleDetection训练的PicoDet模型,通过python tools/export_model.py -c configs/picodet/application/mainbody_detection/picodet_lcnet_x2_5_640_mainbody.yml -o weights=output/picodet_lcnet_x2_5_640_mainbody/best_model --export_serving_model=True命令将inference模型转为了server模型。
然后在服务端成功启动服务; 命令如下: python3 -m paddle_serving_server.serve --model serving_server --port 50982 --gpu_ids 1
在启动客户端 test_client.py代码时
发现一个问题,会出现lod报错。具体如下:
Traceback (most recent call last):
File "../../deploy/serving/test_client.py", line 49, in
postprocess(fetch_map)
File "/usr/local/lib/python3.6/site-packages/paddle_serving_app/reader/image_reader.py", line 427, in call
self.clsid2catid)
File "/usr/local/lib/python3.6/site-packages/paddle_serving_app/reader/image_reader.py", line 344, in _get_bbox_result
lod = [fetch_map[fetch_name + '.lod']]
KeyError: 'transpose_7.tmp_0.lod'
我的fetch_map 没找到这个key, 我检查了下serving_client_conf.prototxt 文件, 没有这个name ,
请问技术同学,为何会出现lod缺失的问题,这个问题该如何处理呀,谢谢!

@github-actions
Copy link

github-actions bot commented Jan 6, 2023

Message that will be displayed on users' first issue

@HexToString
Copy link
Collaborator

你这个可能是版本的问题,更换新的版本应该不存在这个问题了就。使用0.9.0

@fanruifeng
Copy link
Author

好的, 我这边更新模型到0.9.0了, 还是同样的错误, serving_client_conf.prototxt 文件, 没有这个name ,

@paddle-bot paddle-bot bot closed this as completed Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants