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

[Fix]Fix is_module_wrapper #1900

Merged
merged 3 commits into from
May 25, 2022
Merged

[Fix]Fix is_module_wrapper #1900

merged 3 commits into from
May 25, 2022

Conversation

HIT-cwh
Copy link
Contributor

@HIT-cwh HIT-cwh commented Apr 21, 2022

Motivation

In order to avoid scope collision with other codebases, DistributedDataParallelWrapper in mmrazor, mmpose, mmedit or some other codebases need to be registered to a separate registry whose parent is the MODULE_WRAPPERS registry in mmcv. Ref to this pr. When checking if a module is a module wrapper, we need to consider these child MODULE_WRAPPERS.

Modification

A Depth-First-Search is needed in is_module_wrapper.

@zhouzaida zhouzaida merged commit c90f2be into open-mmlab:master May 25, 2022
wangruohui pushed a commit to wangruohui/mmcv that referenced this pull request Jun 11, 2022
* fix is_module_wrapper

* test is_module_wrapper

* fix code style
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

Successfully merging this pull request may close these issues.

4 participants