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

Serving模式推理异常 #1969

Open
weida008 opened this issue Aug 29, 2023 · 9 comments
Open

Serving模式推理异常 #1969

weida008 opened this issue Aug 29, 2023 · 9 comments

Comments

@weida008
Copy link

我在使用飞桨的框架实现模型训练和推理过程中发生了一些问题,有人了解的吗?麻烦帮忙分析解决,谢谢!

问题:同一批图片进行推理多次推理时,偶尔出现结果不一样的情况,关闭TRT加速后暂未发现,但关闭后无法实现推理加速。

服务端启动命令:python3 -m paddle_serving_server.serve --model serving_server  --runtime_thread_num 6 --batch_infer_size 32  --port 9595  --gpu_ids 0 --gpu_multi_stream --use_trt

环境:服务端在Ubuntu系统,运行Serving模式进行推理。客户端在windows端(采用GRPC协议,异步通信方式)。
@jiangjiajun
Copy link
Collaborator

什么模型呢?

@weida008
Copy link
Author

什么模型呢?

picodet

@jiangjiajun
Copy link
Collaborator

这里说的结果有差别,是结果错误,还是结果正确,但有差异?

@weida008
Copy link
Author

weida008 commented Aug 30, 2023

这里说的结果有差别,是结果错误,还是结果正确,但有差异?
正确的结果(我们只取置信度大于0.8的目标画框)
image
异常的结果(每次异常都不一样,下图只是个例子)
image
推理返回的数据(第1列为类别,第2列为置信度,第3-6列为坐标)
image

@jiangjiajun
Copy link
Collaborator

paddleserving里面的版本不确认是否会太低了。 你可以试下使用FastDeploy提供的Serving示例看下https://github.com/PaddlePaddle/FastDeploy/tree/develop/examples/vision/detection/paddledetection

@weida008
Copy link
Author

weida008 commented Aug 30, 2023

paddleserving里面的版本不确认是否会太低了。 你可以试下使用FastDeploy提供的Serving示例看下https://github.com/PaddlePaddle/FastDeploy/tree/develop/examples/vision/detection/paddledetection

这两者有什么不一样?
由于传输3通道的32位浮点图片,太占带宽导致传输速度不高,我们改成传输单通道8位的图片,在服务端接到图片时再进行预处理转成3通道的32位浮点数据,所以需将对Serving进行编译,我换用这个改动较大,能跟我说说两者的区别吗?

@jiangjiajun
Copy link
Collaborator

区别在于服务框架不同,底层都是Paddle。

你可以试下将Paddle Serving底层的Paddle升级到最新。如果仍然有同样问题,可以试下本地调用Paddle Inference推理确认结果是否正常,如果原因在于Paddle Inference,我可以帮忙联系下Paddle同学来支持

@weida008
Copy link
Author

weida008 commented Aug 31, 2023

区别在于服务框架不同,底层都是Paddle。

你可以试下将Paddle Serving底层的Paddle升级到最新。如果仍然有同样问题,可以试下本地调用Paddle Inference推理确认结果是否正常,如果原因在于Paddle Inference,我可以帮忙联系下Paddle同学来支持

我们用的Serving已是最新版,“本地调用Paddle Inference推理”这个需要时间测试(我们也会测试一下),有没有可能是GRPC异步通信的问题?数据组包拆包偶发性错乱?

@weida008
Copy link
Author

weida008 commented Sep 8, 2023

区别在于服务框架不同,底层都是Paddle。

你可以试下将Paddle Serving底层的Paddle升级到最新。如果仍然有同样问题,可以试下本地调用Paddle Inference推理确认结果是否正常,如果原因在于Paddle Inference,我可以帮忙联系下Paddle同学来支持

我们测试过了原生推理没有发现问题,再帮忙分析原因,谢谢支持!

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