PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
44.15k stars 7.81k forks source link

pdserver部署失败 #3986

Closed pengbin2018 closed 3 years ago

pengbin2018 commented 3 years ago

运行python3 web_service.py &>log.txt &。 只出现/home/pengbin2/anaconda3/envs/paddle_v2/lib/python3.7/site-packages/paddle_serving_server/pipeline/pipeline_server.py:342: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. conf = yaml.load(f.read()) 2021/09/09 10:04:12 start proxy service

tink2123 commented 3 years ago

关闭代理试一下:

unset https_proxy
unset http_proxy
tink2123 commented 3 years ago

另外可以查看一下 PipelineServingLogs/pipeline.log 里面有没有更多的报错信息

pengbin2018 commented 3 years ago

CRITICAL 2021-09-09 11:13:39,837 [operator.py:1313] [det|0] failed to init op: load_model_config() got an unexpected keyword argument 'use_mkldnn' Traceback (most recent call last): File "/home/pengbin2/anaconda3/envs/paddle_v2/lib/python3.7/site-packages/paddle_serving_server/pipeline/operator.py", line 1306, in _run concurrency_idx) File "/home/pengbin2/anaconda3/envs/paddle_v2/lib/python3.7/site-packages/paddle_serving_server/pipeline/local_service_handler.py", line 228, in get_client mkldnn_bf16_op_list=self._mkldnn_bf16_op_list) TypeError: load_model_config() got an unexpected keyword argument 'use_mkldnn'

PipelineServingLogs/pipeline.log显示这个错误。

tink2123 commented 3 years ago

升级一下serving版本吧:pip install -U paddle_serving_app==0.6.3

pengbin2018 commented 3 years ago

现在模型部署成功了。在请求服务的时候报这个错误。 INFO 2021-09-09 14:51:29,254 [pipeline_server.py:51] (log_id=0) inference request name: self.name:ocr INFO 2021-09-09 14:51:29,255 [dag.py:368] (data_id=20 log_id=0) Succ Generate ID ERROR 2021-09-09 14:51:29,337 [operator.py:1107] (data_id=20 log_id=0) [det|0] Failed to postprocess: postprocess() takes 4 positional arguments but 5 were given Traceback (most recent call last): File "/home/pengbin2/anaconda3/envs/paddle_v2/lib/python3.7/site-packages/paddle_serving_server/pipeline/operator.py", line 1103, in _run_postprocess logid_dict.get(data_id)) TypeError: postprocess() takes 4 positional arguments but 5 were given ERROR 2021-09-09 14:51:29,342 [dag.py:409] (data_id=20 log_id=0) Failed to predict: (data_id=20 log_id=0) [det|0] Failed to postprocess: postprocess() takes 4 positional arguments but 5 were given

tink2123 commented 3 years ago

发一下你的环境和预测命令吧,我复现一下问题。

pengbin2018 commented 3 years ago

环境: _libgcc_mutex 0.1 main https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main _openmp_mutex 4.5 1_gnu https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main absl-py 0.13.0 pypi_0 pypi astor 0.8.1 pyh9f0ad1d_0 conda-forge babel 2.9.1 pypi_0 pypi backports-entry-points-selectable 1.1.0 pypi_0 pypi bce-python-sdk 0.8.61 pypi_0 pypi beautifulsoup4 4.9.3 pypi_0 pypi brotlipy 0.7.0 py37h5e8e339_1001 conda-forge ca-certificates 2021.5.30 ha878542_0 conda-forge cached-property 1.5.2 pypi_0 pypi cachetools 4.2.2 pypi_0 pypi certifi 2021.5.30 py37h89c1867_0 conda-forge cffi 1.14.6 py37hc58025e_0 conda-forge cfgv 3.3.0 pypi_0 pypi chardet 3.0.4 pypi_0 pypi charset-normalizer 2.0.0 pyhd8ed1ab_0 conda-forge click 7.1.2 pypi_0 pypi cma 2.7.0 pypi_0 pypi colorama 0.4.4 pypi_0 pypi colorlog 5.0.1 pypi_0 pypi conda-pack 0.6.0 pyhd3deb0d_0 conda-forge cryptography 3.4.7 py37h5d9358c_0 conda-forge cudatoolkit 11.2.2 he111cf0_8 conda-forge cudnn 8.1.0.77 h90431f1_0 conda-forge cycler 0.10.0 pypi_0 pypi decorator 5.0.9 pyhd8ed1ab_0 conda-forge dill 0.3.4 pypi_0 pypi distlib 0.3.2 pypi_0 pypi easydict 1.9 pypi_0 pypi filelock 3.0.12 pypi_0 pypi flake8 3.9.2 pypi_0 pypi flask 1.1.4 pypi_0 pypi flask-babel 2.0.0 pypi_0 pypi freetype 2.10.4 h0708190_1 conda-forge func-timeout 4.3.5 pypi_0 pypi future 0.18.2 pypi_0 pypi gast 0.3.3 py_0 conda-forge gitdb 4.0.7 pypi_0 pypi gitpython 3.1.20 pypi_0 pypi google-auth 1.34.0 pypi_0 pypi google-auth-oauthlib 0.4.4 pypi_0 pypi grpcio 1.33.2 pypi_0 pypi grpcio-tools 1.33.2 pypi_0 pypi gunicorn 20.1.0 pypi_0 pypi h5py 3.3.0 pypi_0 pypi identify 2.2.11 pypi_0 pypi idna 3.1 pyhd3deb0d_0 conda-forge importlib-metadata 4.6.1 pypi_0 pypi itsdangerous 1.1.0 pypi_0 pypi jbig 2.1 h7f98852_2003 conda-forge jieba 0.42.1 pypi_0 pypi jinja2 2.11.3 pypi_0 pypi joblib 1.0.1 pypi_0 pypi jpeg 9d h36c2ea0_0 conda-forge kiwisolver 1.3.1 pypi_0 pypi lcms2 2.12 hddcbb42_0 conda-forge ld_impl_linux-64 2.35.1 h7274673_9 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main lerc 2.2.1 h9c3ff4c_0 conda-forge libblas 3.9.0 9_openblas conda-forge libcblas 3.9.0 9_openblas conda-forge libdeflate 1.7 h7f98852_5 conda-forge libffi 3.3 he6710b0_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main libgcc-ng 9.3.0 h5101ec6_17 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main libgfortran-ng 9.3.0 hff62375_19 conda-forge libgfortran5 9.3.0 hff62375_19 conda-forge libgomp 9.3.0 h5101ec6_17 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main liblapack 3.9.0 9_openblas conda-forge libopenblas 0.3.15 pthreads_h8fe5266_1 conda-forge libpng 1.6.37 h21135ba_2 conda-forge libprotobuf 3.17.2 h780b84a_0 conda-forge libstdcxx-ng 9.3.0 hd4cf53a_17 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main libtiff 4.3.0 hf544144_1 conda-forge libwebp-base 1.2.0 h7f98852_2 conda-forge lz4-c 1.9.3 h9c3ff4c_0 conda-forge markdown 3.3.4 pypi_0 pypi markupsafe 1.1.1 pypi_0 pypi matplotlib 3.4.2 pypi_0 pypi mccabe 0.6.1 pypi_0 pypi multiprocess 0.70.12.2 pypi_0 pypi ncurses 6.2 he6710b0_1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main nltk 3.6.2 pypi_0 pypi nodeenv 1.6.0 pypi_0 pypi numpy 1.21.0 py37h038b26d_0 conda-forge oauthlib 3.1.1 pypi_0 pypi olefile 0.46 pyh9f0ad1d_1 conda-forge opencv-python 4.1.2.30 pypi_0 pypi openjpeg 2.4.0 hb52868f_1 conda-forge openssl 1.1.1k h7f98852_0 conda-forge packaging 21.0 pypi_0 pypi paddle-serving-app 0.6.3 pypi_0 pypi paddle-serving-client 0.0.0 pypi_0 pypi paddle-serving-server-gpu 0.0.0.post102 pypi_0 pypi paddle2onnx 0.7 pypi_0 pypi paddlehub 2.1.0 pypi_0 pypi paddlenlp 2.0.6 pypi_0 pypi paddlepaddle-gpu 2.1.1 py37_gpu_cuda11.2_many_linux https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/Paddle pandas 1.3.0 pypi_0 pypi pillow 8.3.1 py37h0f21c89_0 conda-forge pip 21.1.3 py37h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main platformdirs 2.0.2 pypi_0 pypi pre-commit 2.13.0 pypi_0 pypi protobuf 3.17.2 py37hcd2ae1e_0 conda-forge pyasn1 0.4.8 pypi_0 pypi pyasn1-modules 0.2.8 pypi_0 pypi pyclipper 1.3.0 pypi_0 pypi pycodestyle 2.7.0 pypi_0 pypi pycparser 2.20 pyh9f0ad1d_2 conda-forge pycryptodome 3.10.1 pypi_0 pypi pyflakes 2.3.1 pypi_0 pypi pyopenssl 20.0.1 pyhd8ed1ab_0 conda-forge pyparsing 2.4.7 pypi_0 pypi pysocks 1.7.1 py37h89c1867_3 conda-forge python 3.7.10 h12debd9_4 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main python-dateutil 2.8.2 pypi_0 pypi python_abi 3.7 2_cp37m conda-forge pytz 2021.1 pypi_0 pypi pyyaml 5.4.1 pypi_0 pypi pyzmq 22.1.0 pypi_0 pypi qrcode 7.2 pypi_0 pypi rarfile 4.0 pypi_0 pypi readline 8.1 h27cfd23_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main regex 2021.7.6 pypi_0 pypi requests 2.26.0 pyhd8ed1ab_0 conda-forge requests-oauthlib 1.3.0 pypi_0 pypi rsa 4.7.2 pypi_0 pypi scikit-learn 0.24.2 pypi_0 pypi scipy 1.7.0 pypi_0 pypi sentencepiece 0.1.92 pypi_0 pypi seqeval 1.2.2 pypi_0 pypi setuptools 52.0.0 py37h06a4308_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main shapely 1.7.1 pypi_0 pypi shellcheck-py 0.7.2.1 pypi_0 pypi six 1.16.0 pyh6c4a22f_0 conda-forge smmap 4.0.0 pypi_0 pypi soupsieve 2.2.1 pypi_0 pypi sqlite 3.36.0 hc218d9a_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main tb-paddle 0.4.0 pypi_0 pypi tensorboard 2.5.0 pypi_0 pypi tensorboard-data-server 0.6.1 pypi_0 pypi tensorboard-plugin-wit 1.8.0 pypi_0 pypi threadpoolctl 2.2.0 pypi_0 pypi tk 8.6.10 hbc83047_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main toml 0.10.2 pypi_0 pypi tqdm 4.61.2 pypi_0 pypi typing-extensions 3.10.0.0 pypi_0 pypi ujson 4.0.2 pypi_0 pypi urllib3 1.26.6 pyhd8ed1ab_0 conda-forge virtualenv 20.6.0 pypi_0 pypi visualdl 2.2.0 pypi_0 pypi werkzeug 1.0.1 pypi_0 pypi wheel 0.36.2 pyhd3eb1b0_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main xlrd 1.2.0 pypi_0 pypi xlwt 1.3.0 pypi_0 pypi xz 5.2.5 h7b6447c_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main yapf 0.26.0 pypi_0 pypi zipp 3.5.0 pypi_0 pypi zlib 1.2.11 h7b6447c_3 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main zstd 1.5.0 ha95c52a_0 conda-forge

预测命令:python3 pipeline_http_client.py

pengbin2018 commented 3 years ago

已经部署成功。谢谢了。 把这一步: wget https://paddle-serving.bj.bcebos.com/test-dev/whl/paddle_serving_client-0.0.0-cp37-none-any.whl pip3 install paddle_serving_client-0.0.0-cp37-none-any.whl 改成: pip3 install paddle-serving-client==0.6.3 就可以了。 非常感谢

tink2123 commented 3 years ago

好的~