Skip to content

使用@MODELS.register_module() 注册器,如何让IDE实现代码跳转? #545

Description

@verigle

Describe the feature
@MODELS.register_module() 注册模型后, 希望可以在阅读训练代码(例如Runner部分代码)的时候, 可以通过IDE 跳转功能转到模型名称应的代码位置,是否可以通过IDE插件或调整框架设计来解决注册器带来的不便呢?

Motivation
配置文件中,通过String 配置 选择一个注册的模型,然而在阅读代码或debug 时,很难通过代码逐行运行的顺序进行跳转到当前选择的模型代码中,给代码调试和review带来了一些困难,希望未来使用注册器后代码跳转功能能进一步完善和优化。

例如 无法通过点击 YOLODetector 名称跳转到YOLODetector 对应的源码

model = dict(
    type='YOLODetector',
    data_preprocessor=dict(
        type='mmdet.DetDataPreprocessor',
        mean=[0., 0., 0.],
        std=[255., 255., 255.],
        bgr_to_rgb=True),

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions