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

Add the feature to allow setting custom packages for import when loading configuration files #8978

Open
2 tasks done
InsaneOnion opened this issue May 12, 2024 · 0 comments
Open
2 tasks done
Assignees

Comments

@InsaneOnion
Copy link

问题确认 Search before asking

  • 我已经查询历史issue,没有类似需求。I have searched the issues and found no similar feature requests.

需求描述 Feature Description

  1. 任务目标
    基于PaddleDetection进行二次开发。
  2. 需求场景
    我正在基于PaddleDetection复现YOLO-World模型并打算将其贡献至PaddleMIX仓库(将PaddleDetection作为一个包使用),我使用了PaddleDetection提供的register注册自定义的网络模块,PaddleDetection没有提供类似mmengine中custom_imports在导入配置文件阶段导入包的功能,PaddleDection中现有新增模型算法的方法是将组件放在指定目录下(modeling/architecture等),而在我的当前使用场景下显然不适用,因此我需要手动import自定义的网络模块来完成注册,这显得不太优雅(非常奇怪)。
  3. 功能描述
    类似mmengine中的custom_imports功能
    https://github.com/open-mmlab/mmengine/blob/66fb81f7b392b2cd304fc1979d8af3cc71a011f5/mmengine/config/config.py#L464
    通过在yaml配置文件中定义字符串/列表,实现在加载配置阶段导入对应模块。

是否愿意提交PR Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
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