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

[Feature] add config new feature #105

Merged
merged 56 commits into from
Aug 8, 2022
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
8f2e7bc
update
HAOCHENYE Mar 6, 2022
af597a1
update
HAOCHENYE Mar 6, 2022
1ee2c59
update
HAOCHENYE Mar 6, 2022
db8df66
add config new feature
HAOCHENYE Mar 7, 2022
22a042a
update
HAOCHENYE Mar 7, 2022
fe61253
update
HAOCHENYE Mar 7, 2022
a9ad44d
remove unused file
HAOCHENYE Mar 7, 2022
d91aa0d
Update pretrained
HAOCHENYE Mar 7, 2022
89e15de
update
HAOCHENYE Mar 7, 2022
837128b
Fix as commetn
HAOCHENYE Mar 9, 2022
43b6eac
update
HAOCHENYE Mar 9, 2022
45c77c8
update
HAOCHENYE Mar 10, 2022
752ea85
Add get_config and get_model test
HAOCHENYE Mar 10, 2022
23b3720
update
HAOCHENYE Mar 10, 2022
d38004c
resolve conflict in mmengine.__init__.py
HAOCHENYE Mar 14, 2022
cb024df
clean code and add comment to config.py
HAOCHENYE Mar 14, 2022
c6d7ddf
fix cycle import
HAOCHENYE Mar 14, 2022
4591f41
fix as comment
HAOCHENYE Jun 10, 2022
69e41a0
temp save
HAOCHENYE Jun 20, 2022
69086c1
tmp
HAOCHENYE Jun 20, 2022
ab9d516
tmp
HAOCHENYE Jun 20, 2022
c754b4c
add unit test
HAOCHENYE Jun 21, 2022
23c4e93
support modify base variable and add unit test
HAOCHENYE Jun 21, 2022
14cfb57
refine build and docstring
HAOCHENYE Jun 21, 2022
f8940c7
move switch scope to build_from_cfg
HAOCHENYE Jun 22, 2022
33d9853
add docstring
HAOCHENYE Jun 22, 2022
da4e1ef
add build model from cfg
HAOCHENYE Jun 22, 2022
2ed530b
fix root registry
HAOCHENYE Jun 22, 2022
20b550d
Merge remote-tracking branch 'origin/main' into HAOCHENYE/config_new_…
HAOCHENYE Jun 22, 2022
313124c
fix docstring
HAOCHENYE Jun 22, 2022
34a7b14
fix remove scope bug
HAOCHENYE Jun 23, 2022
aa3d085
Merge remote-tracking branch 'origin/HAOCHENYE/config_new_feature' in…
HAOCHENYE Jun 23, 2022
b60ef05
fix bug in get model
HAOCHENYE Jun 23, 2022
a33bbae
fix get model bug
HAOCHENYE Jun 24, 2022
fa74795
Merge remote-tracking branch 'origin/HAOCHENYE/config_new_feature' in…
HAOCHENYE Jun 24, 2022
960feb7
add scope to list cfg
HAOCHENYE Jun 27, 2022
5f7a0f5
support get attribute of base variable in config
HAOCHENYE Jun 29, 2022
4afed70
add docstring to _dict_to_config_dict
HAOCHENYE Jun 29, 2022
5b8a2d8
minor refine
HAOCHENYE Jun 29, 2022
2114c25
fix lint
HAOCHENYE Jun 29, 2022
bc53cc8
update registry code
HAOCHENYE Jun 30, 2022
1db616b
add scope when access
HAOCHENYE Jul 4, 2022
aeaa4af
Merge branch 'main' into HAOCHENYE/config_new_feature
HAOCHENYE Jul 4, 2022
c07c0cd
remove unnecessary scope in local base config
HAOCHENYE Jul 4, 2022
b3ea3e3
upload test file
HAOCHENYE Jul 4, 2022
672f95d
fix circle import
HAOCHENYE Jul 4, 2022
2f86cbb
refine ut
HAOCHENYE Jul 6, 2022
912ed85
Merge branch 'main' into HAOCHENYE/config_new_feature
HAOCHENYE Jul 14, 2022
9d4e4c3
fix nested get external config bug
HAOCHENYE Jul 14, 2022
cf75c4e
add comments
HAOCHENYE Jul 14, 2022
aef5dbe
Merge branch 'main' into HAOCHENYE/config_new_feature
HAOCHENYE Jul 21, 2022
2cfb3fa
remove check install in switch_scope_and_registry
HAOCHENYE Jul 27, 2022
4815a55
Merge branch 'main' into HAOCHENYE/config_new_feature
HAOCHENYE Aug 4, 2022
620a36d
only pick first weight
HAOCHENYE Aug 5, 2022
9c20498
Merge branch 'main' into HAOCHENYE/config_new_feature
HAOCHENYE Aug 8, 2022
048c138
fix comment
HAOCHENYE Aug 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove check install in switch_scope_and_registry
  • Loading branch information
HAOCHENYE committed Jul 27, 2022
commit 2cfb3fae76161530c01cfbf7a08b629974beb50a
12 changes: 7 additions & 5 deletions mmengine/registry/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from typing import Any, Dict, Generator, List, Optional, Tuple, Type, Union

from ..config.utils import PKG2PROJECT
from ..utils import is_installed, is_seq_of
from ..utils import is_seq_of
from .default_scope import DefaultScope


Expand Down Expand Up @@ -242,10 +242,12 @@ def switch_scope_and_registry(self, scope: str) -> Generator:
if default_scope is not None:
scope_name = default_scope.scope_name
if scope_name in PKG2PROJECT:
is_installed(PKG2PROJECT[scope_name])
# TODO replace with import from.
module = import_module(f'{scope_name}.utils')
module.register_all_modules() # type: ignore
try:
module = import_module(
f'{PKG2PROJECT[scope_name]}.utils')
module.register_all_modules() # type: ignore
except ImportError as e:
raise e
root = self._get_root_registry()
registry = root._search_child(scope_name)
if registry is None:
Expand Down