Closed zouxiaoshi closed 8 months ago
您好,参考Serving v0.5版本https://github.com/PaddlePaddle/Serving/tree/v0.5.0
需要将paddle-serving-app 升级到0.3.0或0.3.1 pip install paddle-serving-app==0.3.0
您好,参考Serving v0.5版本https://github.com/PaddlePaddle/Serving/tree/v0.5.0
需要将paddle-serving-app 升级到0.3.0或0.3.1 pip install paddle-serving-app==0.3.0
试了,还是不行。 我后来用了 generate_runtime_docker.sh 去生成相应环境,也不行。 【DEVELOP分支里的脚本】
bash tool/generate_runtime_docker.sh --env cuda10.2 --python 3.6 --serving 0.6.0 --paddle 2.0.1
随后生成的docker镜像中,缺少paddlepaddle_gpu,看了下源码,https://github.com/PaddlePaddle/Serving/blob/a6df1730968c1107434919a236280a4cfe728b9e/tools/dockerfiles/build_scripts/install_whl.sh#L68 这个地址有问题,导致无法下载。 【构建镜像时,proxy使不了,报错,给删除了,不知道是不是proxy删除后导致的问题】
https://paddle-wheel.bj.bcebos.com/with-trt/2.0.1-gpu-cuda10.2-cudnn8-mkl-gcc8.2/paddlepaddle_gpu-2.0.1-cp36-cp36m-linux_x86_64.whl
{"code":"NoSuchKey","message":"The specified key does not exist.","requestId":"17dba6a9-3e63-46db-80a7-7700c603a24b"}
之后,通过如下方式下载paddlepaddle_gpu
python -m pip install paddlepaddle-gpu==2.0.1 -f https://paddlepaddle.org.cn/whl/stable/tensorrt.html
随后防止代码错误,跑了官方的代码 https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.1/deploy/pdserving
(额外补充一点,https://github.com/PaddlePaddle/Serving/blob/a6df1730968c1107434919a236280a4cfe728b9e/python/examples/pipeline/ocr/web_service.py#L110 这行有问题,在paddleocr中已做更改
https://github.com/PaddlePaddle/PaddleOCR/blob/84445cc4732ccfb9c8e655e11f5f2961faf4074e/deploy/pdserving/web_service.py#L88
请做更新)
出现了内存错误,命令行中信息如下:
----------------------
Error Message Summary:
----------------------
FatalError: `Segmentation fault` is detected by the operating system.
[TimeInfo: *** Aborted at 1623034793 (unix time) try "date -d @1623034793" if you are using GNU date ***]
[SignalInfo: *** SIGSEGV (@0x0) received by PID 226 (TID 0x7f2e32085700) from PID 0 ***]
pipline.log 中信息如下:
INFO 2021-06-07 10:59:52,974 [pipeline_server.py:51] (log_id=0) inference request name:ocr self.name:ocr
INFO 2021-06-07 10:59:52,976 [operator.py:1375] RequestOp unpack one request. log_id:0, clientip: name:ocr, method:prediction
INFO 2021-06-07 10:59:52,976 [dag.py:368] (data_id=0 log_id=0) Succ Generate ID
发起http或 rpc 调用时,一直没发应。
您好,参考Serving v0.5版本https://github.com/PaddlePaddle/Serving/tree/v0.5.0
需要将paddle-serving-app 升级到0.3.0或0.3.1 pip install paddle-serving-app==0.3.0
我又试了下 https://github.com/PaddlePaddle/Serving/tree/develop/python/examples/pipeline/PaddleDetection/yolov3 这次,当client 为 brpc 和 local_predictor时,可用。 client grpc时 initialize client 会报错
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "connections to all backends failing"
debug_error_string = "{"created":"@1623054771.577839667","description":"Failed to pick
随后,我自己训了个yolov3 模型,然后,无论client是什么都报错。。。。[local_service_handler is None]
train_ticket_det Failed to launch local rpc service: local_service_handler is None.
现在就感觉 pipeline service 好玄学。。。
对于grpc/brpc的使用场景有些复杂了,需要启动独立的Server,并且异常信息不方便调试。对这种问题,我们再完善一下文档,再提升一下易用性。
您好,您遇到问题我来详细解答一下:
1.镜像选择: CPU: docker pull registry.baidubce.com/paddlepaddle/serving:0.6.0-devel GPU: nvidia-docker pull registry.baidubce.com/paddlepaddle/serving:0.6.0-cuda10.2-cudnn8-devel
2.安装,参考每个tag上首页的推荐的server、client、app的匹配关系安装对应版本。 在v0.6.0 版本下: pip3 install paddle-serving-client==0.6.0 pip3 install paddle-serving-server==0.6.0 # CPU pip3 install paddle-serving-app==0.6.0 pip3 install paddle-serving-server-gpu==0.6.0.post102 #GPU with CUDA10.2 + TensorRT7
CPU users, please run: pip3 install paddlepaddle==2.0.0 GPU Cuda10.2 please run: pip3 install paddlepaddle-gpu==2.0.0
3.pipeline使用 首先,推荐您使用Local predictor方式:选用local_service_conf + client_type: local_predictor,使用简单并且性能最优
根据您报的错误信息: CRITICAL 2021-05-25 08:46:08,126 [operator.py:1082] [rec|0] failed to init op: load_model_config() got an unexpected keyword argument 'use_lite' use_lite是在v0.6.0加入的特性,需要将pip3 install的版本都升级到最新(2.安装)版本,这样的话OCR示例可以运行的。
您好,参考Serving v0.5版本https://github.com/PaddlePaddle/Serving/tree/v0.5.0 需要将paddle-serving-app 升级到0.3.0或0.3.1 pip install paddle-serving-app==0.3.0
试了,还是不行。 我后来用了 generate_runtime_docker.sh 去生成相应环境,也不行。 【DEVELOP分支里的脚本】
bash tool/generate_runtime_docker.sh --env cuda10.2 --python 3.6 --serving 0.6.0 --paddle 2.0.1
随后生成的docker镜像中,缺少paddlepaddle_gpu,看了下源码,
这个地址有问题,导致无法下载。 【构建镜像时,proxy使不了,报错,给删除了,不知道是不是proxy删除后导致的问题】
https://paddle-wheel.bj.bcebos.com/with-trt/2.0.1-gpu-cuda10.2-cudnn8-mkl-gcc8.2/paddlepaddle_gpu-2.0.1-cp36-cp36m-linux_x86_64.whl {"code":"NoSuchKey","message":"The specified key does not exist.","requestId":"17dba6a9-3e63-46db-80a7-7700c603a24b"}
之后,通过如下方式下载paddlepaddle_gpu
python -m pip install paddlepaddle-gpu==2.0.1 -f https://paddlepaddle.org.cn/whl/stable/tensorrt.html
随后防止代码错误,跑了官方的代码 https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.1/deploy/pdserving
(额外补充一点,
这行有问题,在paddleocr中已做更改 https://github.com/PaddlePaddle/PaddleOCR/blob/84445cc4732ccfb9c8e655e11f5f2961faf4074e/deploy/pdserving/web_service.py#L88 请做更新)
当client为local_predictor时
出现了内存错误,命令行中信息如下:
---------------------- Error Message Summary: ---------------------- FatalError: `Segmentation fault` is detected by the operating system. [TimeInfo: *** Aborted at 1623034793 (unix time) try "date -d @1623034793" if you are using GNU date ***] [SignalInfo: *** SIGSEGV (@0x0) received by PID 226 (TID 0x7f2e32085700) from PID 0 ***]
pipline.log 中信息如下:
INFO 2021-06-07 10:59:52,974 [pipeline_server.py:51] (log_id=0) inference request name:ocr self.name:ocr INFO 2021-06-07 10:59:52,976 [operator.py:1375] RequestOp unpack one request. log_id:0, clientip: name:ocr, method:prediction INFO 2021-06-07 10:59:52,976 [dag.py:368] (data_id=0 log_id=0) Succ Generate ID
当client为 grpc时:
发起http或 rpc 调用时,一直没发应。
目前,只有 client 为 brpc 可正常使用。
对于OCR示例中max_batch_size设置和OCR repo里不同,其实2种情况都经过测试的,是针对shape维度很大图片的特定优化(max_batch_size = 6),在图片偏小的场景max_batch_size = len(dt_boxes)效果更好
max_batch_size = 6 # len(dt_boxes)
https://github.com/PaddlePaddle/PaddleOCR/blob/84445cc4732ccfb9c8e655e11f5f2961faf4074e/deploy/pdserving/web_service.py#L88
如下配置文件中 client_type 为 local_predictor 或 grpc时报错
环境: paddle-serving-app 0.2.0
paddle-serving-client 0.5.0
paddle-serving-server-gpu 0.5.0.post10
paddlepaddle-gpu 2.0.1.post100
模型:
报错: client_type 为grpc时 报错信息如下
local_predictor时报错信息
源码如下
ppocr_keys_v1.txt wget https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.1/ppocr/utils/ppocr_keys_v1.txt
ocr_reader.py wget https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.1/deploy/pdserving/ocr_reader.py