Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
eed9cced
Unverified
Commit
eed9cced
authored
Sep 07, 2021
by
Zaida Zhou
Committed by
GitHub
Sep 07, 2021
Browse files
[Enhancement] Enhance the output of exception (#1309)
parent
4f4eb275
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
mmcv/utils/config.py
mmcv/utils/config.py
+4
-2
No files found.
mmcv/utils/config.py
View file @
eed9cced
...
@@ -251,8 +251,10 @@ class Config:
...
@@ -251,8 +251,10 @@ class Config:
base_cfg_dict
=
dict
()
base_cfg_dict
=
dict
()
for
c
in
cfg_dict_list
:
for
c
in
cfg_dict_list
:
if
len
(
base_cfg_dict
.
keys
()
&
c
.
keys
())
>
0
:
duplicate_keys
=
base_cfg_dict
.
keys
()
&
c
.
keys
()
raise
KeyError
(
'Duplicate key is not allowed among bases'
)
if
len
(
duplicate_keys
)
>
0
:
raise
KeyError
(
'Duplicate key is not allowed among bases. '
f
'Duplicate keys:
{
duplicate_keys
}
'
)
base_cfg_dict
.
update
(
c
)
base_cfg_dict
.
update
(
c
)
# Subtitute base variables from strings to their actual values
# Subtitute base variables from strings to their actual values
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment