You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched related issues but cannot get the expected help.
2. I have read the FAQ documentation but cannot get the expected help.
3. The bug has not been fixed in the latest version.
Describe the bug
Issue Converting Pruned RetinaNet from mmrazor to ONNX Using mmdeploy!!!!
I am trying to convert a pruned and finetuned RetinaNet model from the mmrazor library to ONNX format using mmdeploy. However, I encountered an error during the conversion process. I have checked my environment setup and confirmed that mmrazor is included in the codebase libraries.
Is there anyone who can help me resolve this issue? It’s quite urgent. Thank you very much!
Checklist
Describe the bug
Issue Converting Pruned RetinaNet from mmrazor to ONNX Using mmdeploy!!!!
I am trying to convert a pruned and finetuned RetinaNet model from the mmrazor library to ONNX format using mmdeploy. However, I encountered an error during the conversion process. I have checked my environment setup and confirmed that mmrazor is included in the codebase libraries.
Is there anyone who can help me resolve this issue? It’s quite urgent. Thank you very much!
Command:
razor_config=configs/pruning/mmdet/group_fisher/retinanet/group_fisher_act_deploy_retinanet_r50_fpn_1x_coco.py
deploy_config=/code/mmdeploy/configs/mmdet/detection/detection_onnxruntime_static.py
python /code/mmdeploy/tools/deploy.py $deploy_config
$razor_config \
https://download.openmmlab.com/mmrazor/v1/pruning/group_fisher/retinanet/act/group_fisher_act_finetune_retinanet_r50_fpn_1x_coco.pth
/codemmdeploy/tests/data/tiger.jpeg
--work-dir work_dirs/mmdeploy
Log:
10/27 13:03:05 - mmengine - INFO - Start pipeline mmdeploy.apis.pytorch2onnx.torch2onnx in subprocess
10/27 13:03:06 - mmengine - WARNING - Import mmdeploy.codebase.mmrazor.deploy failedPlease check whether the module is the custom module.No module named 'mmdeploy.codebase.mmrazor'
Process Process-2:
Traceback (most recent call last):
File "/root/miniconda3/envs/openmmlab/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/root/miniconda3/envs/openmmlab/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/root/miniconda3/envs/openmmlab/lib/python3.8/site-packages/mmdeploy/apis/core/pipeline_manager.py", line 107, in call
ret = func(*args, **kwargs)
File "/root/miniconda3/envs/openmmlab/lib/python3.8/site-packages/mmdeploy/apis/pytorch2onnx.py", line 61, in torch2onnx
task_processor = build_task_processor(model_cfg, deploy_cfg, device)
File "/root/miniconda3/envs/openmmlab/lib/python3.8/site-packages/mmdeploy/apis/utils/utils.py", line 46, in build_task_processor
import_codebase(codebase_type, custom_module_list)
File "/root/miniconda3/envs/openmmlab/lib/python3.8/site-packages/mmdeploy/codebase/init.py", line 36, in import_codebase
codebase = get_codebase_class(codebase_type)
File "/root/miniconda3/envs/openmmlab/lib/python3.8/site-packages/mmdeploy/codebase/base/mmcodebase.py", line 86, in get_codebase_class
return CODEBASE.build({'type': codebase.value})
File "/root/miniconda3/envs/openmmlab/lib/python3.8/site-packages/mmengine/registry/registry.py", line 570, in build
return self.build_func(cfg, *args, **kwargs, registry=self)
File "/root/miniconda3/envs/openmmlab/lib/python3.8/site-packages/mmengine/registry/build_functions.py", line 121, in build_from_cfg
obj = obj_cls(**args) # type: ignore
TypeError: 'module' object is not callable
10/27 13:03:06 - mmengine - ERROR - /root/miniconda3/envs/openmmlab/lib/python3.8/site-packages/mmdeploy/apis/core/pipeline_manager.py - pop_mp_output - 80 -
mmdeploy.apis.pytorch2onnx.torch2onnx
with Call id: 0 failed. exit.Reproduction
razor_config=configs/pruning/mmdet/group_fisher/retinanet/group_fisher_act_deploy_retinanet_r50_fpn_1x_coco.py
deploy_config=/code/mmdeploy/configs/mmdet/detection/detection_onnxruntime_static.py
python /code/mmdeploy/tools/deploy.py $deploy_config $razor_config https://download.openmmlab.com/mmrazor/v1/pruning/group_fisher/retinanet/act/group_fisher_act_finetune_retinanet_r50_fpn_1x_coco.pth /code/mmdeploy/tests/data/tiger.jpeg --work-dir work_dirs/mmdeploy
Environment
Error traceback
The text was updated successfully, but these errors were encountered: