open-mmlab / mmdeploy

OpenMMLab Model Deployment Framework
https://mmdeploy.readthedocs.io/en/latest/
Apache License 2.0
2.75k stars 631 forks source link

ImportError: Please install petrel_client to enable 'PetrelBackend'. #1148

Closed FinallyKiKi closed 2 years ago

FinallyKiKi commented 2 years ago

When turn pytorch model to onnx, raise error Please install petrel_client to enable 'PetrelBackend'. And I can not find 'petrel_client' from pip .

2022-09-30 17:23:45,114 - mmdeploy - INFO - torch2onnx: model_cfg: /data/jdx/code/mmpose/demo/mmdetection_cfg/ssdlite_mobilenetv2_scratch_600e_onehand.py deploy_cfg: configs/mmdet/detection/detection_onnxruntime_static.py load checkpoint from local path: /data/jdx/code/mmpose/checkpoint/ssdlite_mobilenetv2_scratch_600e_onehand-4f9f8686_20220523.pth /data/jdx/miniconda3/envs/deploy/lib/python3.9/site-packages/mmdet-2.25.2-py3.9.egg/mmdet/datasets/utils.py:66: UserWarning: "ImageToTensor" pipeline is replaced by "DefaultFormatBundle" for batch inference. It is recommended to manually replace it in the test data pipeline in your config file. warnings.warn( Traceback (most recent call last): File "/data/jdx/miniconda3/envs/deploy/lib/python3.9/site-packages/mmcv/fileio/file_client.py", line 113, in init from petrel_client import client ModuleNotFoundError: No module named 'petrel_client'

RunningLeon commented 2 years ago

@FinallyKiKi Hi, as per here describes, PetrelBackend is for internal use. You should check the model config and update the loading backend in pipelines. Besides, you post here the model config and env info by running python tools/check_env.py for reproducing the issue as well.

FinallyKiKi commented 2 years ago

Thank you very much. I have changed my config file from

file_client_args = dict( backend='petrel', path_mapping=dict({ "data/onehand10k/": "openmmlab:s3://openmmlab/datasets/pose/OneHand10K/", "data/onehand10k/": "openmmlab:s3://openmmlab/datasets/pose/OneHand10K/" }))

to

file_client_args = dict(backend='disk')

without using PetrelBackend