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

[Bug] How do new components run on mmdeploy-runtime #2815

Open
2 of 3 tasks
svipvm opened this issue Aug 20, 2024 · 1 comment
Open
2 of 3 tasks

[Bug] How do new components run on mmdeploy-runtime #2815

svipvm opened this issue Aug 20, 2024 · 1 comment

Comments

@svipvm
Copy link

svipvm commented Aug 20, 2024

Checklist

  • 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

Instead of using the regular classification header on mmpretrain, I customized a NormClsHead. When I finished training, I exported and modified the corresponding logic in mmdeploy, and it was successfully exported.

But when I used pip install mmdeploy-runtime's stand-alone environment, it reported an error:

[mmdeploy] [error] [common.h:50] Could not found entry 'NormClsHead' in mmcls. Available components: [("ConformerHead", 0), ("LinearClsHead", 0), ("MultiLabelLinearClsHead", 0)]
[mmdeploy] [error] [task.cpp:99] error parsing config: ...

This error is understandable because the independent environment mmdeploy-runtime doesn't know any information about NormClsHead, so I wonder how to run it in an independent environment? Add some kind of *.so file to mmdeploy-runtime? Or recompile it to get the corresponding package?

Reproduction

I modified mmdeploy to correspond to the structure of my mmpretrain. Yes, I understand his reason. But I don't know how mmdeploy-runtime corresponds

Environment

08/20 09:44:42 - mmengine - INFO - TorchVision: 0.12.0
08/20 09:44:42 - mmengine - INFO - OpenCV: 4.9.0
08/20 09:44:42 - mmengine - INFO - MMEngine: 0.8.3
08/20 09:44:42 - mmengine - INFO - MMCV: 2.0.1
08/20 09:44:42 - mmengine - INFO - MMCV Compiler: GCC 9.3
08/20 09:44:42 - mmengine - INFO - MMCV CUDA Compiler: 11.3
08/20 09:44:42 - mmengine - INFO - MMDeploy: 1.3.1+
08/20 09:44:42 - mmengine - INFO - 

08/20 09:44:42 - mmengine - INFO - **********Backend information**********
08/20 09:44:44 - mmengine - INFO - tensorrt:    8.4.3.1
08/20 09:44:44 - mmengine - INFO - tensorrt custom ops: Available
08/20 09:44:44 - mmengine - INFO - ONNXRuntime: None
08/20 09:44:44 - mmengine - INFO - ONNXRuntime-gpu:     1.10.0
08/20 09:44:44 - mmengine - INFO - ONNXRuntime custom ops:      Available
08/20 09:44:44 - mmengine - INFO - pplnn:       None
08/20 09:44:44 - mmengine - INFO - ncnn:        None
08/20 09:44:44 - mmengine - INFO - snpe:        None
08/20 09:44:44 - mmengine - INFO - openvino:    None
08/20 09:44:44 - mmengine - INFO - torchscript: 1.11.0
08/20 09:44:44 - mmengine - INFO - torchscript custom ops:      NotAvailable
08/20 09:44:44 - mmengine - INFO - rknn-toolkit:        None
08/20 09:44:44 - mmengine - INFO - rknn-toolkit2:       None
08/20 09:44:44 - mmengine - INFO - ascend:      None
08/20 09:44:44 - mmengine - INFO - coreml:      None
08/20 09:44:44 - mmengine - INFO - tvm: None
08/20 09:44:44 - mmengine - INFO - vacc:        None
08/20 09:44:44 - mmengine - INFO - 

08/20 09:44:44 - mmengine - INFO - **********Codebase information**********
08/20 09:44:44 - mmengine - INFO - mmdet:       3.1.0
08/20 09:44:44 - mmengine - INFO - mmseg:       None
08/20 09:44:44 - mmengine - INFO - mmpretrain:  1.0.1
08/20 09:44:44 - mmengine - INFO - mmocr:       None
08/20 09:44:44 - mmengine - INFO - mmagic:      None
08/20 09:44:44 - mmengine - INFO - mmdet3d:     None
08/20 09:44:44 - mmengine - INFO - mmpose:      None
08/20 09:44:44 - mmengine - INFO - mmrotate:    None
08/20 09:44:44 - mmengine - INFO - mmaction:    None
08/20 09:44:44 - mmengine - INFO - mmrazor:     None
08/20 09:44:44 - mmengine - INFO - mmyolo:      None

Error traceback

No response

@matthost
Copy link

in all of the mm libs you can import the register functions, register your implementation, and then use it without modifying the mm repo.

I’ve only done this in mmdet, where you register the mmdet components and then any rewrites needed for mmdeploy as well.

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