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
8441f231
Unverified
Commit
8441f231
authored
May 05, 2020
by
Jerry Jiarui XU
Committed by
GitHub
May 05, 2020
Browse files
Update config Error msg (#267)
parent
19e4a06c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
mmcv/utils/config.py
mmcv/utils/config.py
+4
-3
No files found.
mmcv/utils/config.py
View file @
8441f231
...
@@ -151,9 +151,10 @@ class Config(object):
...
@@ -151,9 +151,10 @@ class Config(object):
if
isinstance
(
v
,
dict
)
and
k
in
b
and
not
v
.
pop
(
DELETE_KEY
,
False
):
if
isinstance
(
v
,
dict
)
and
k
in
b
and
not
v
.
pop
(
DELETE_KEY
,
False
):
if
not
isinstance
(
b
[
k
],
dict
):
if
not
isinstance
(
b
[
k
],
dict
):
raise
TypeError
(
raise
TypeError
(
f
'
{
k
}
=
{
v
}
cannot be inherited from base because
{
k
}
'
f
'
{
k
}
=
{
v
}
in child config cannot inherit from base '
'is a dict in the child config. You may '
f
'because
{
k
}
is a dict in the child config but is of '
f
'set `
{
DELETE_KEY
}
=True` to ignore the base config'
)
f
'type
{
type
(
b
[
k
])
}
in base config. You may set '
f
'`
{
DELETE_KEY
}
=True` to ignore the base config'
)
b
[
k
]
=
Config
.
_merge_a_into_b
(
v
,
b
[
k
])
b
[
k
]
=
Config
.
_merge_a_into_b
(
v
,
b
[
k
])
else
:
else
:
b
[
k
]
=
v
b
[
k
]
=
v
...
...
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