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
bfdd0d59
Commit
bfdd0d59
authored
Mar 08, 2019
by
wangg12
Browse files
allow .yml extension for config file
parent
8b4417c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mmcv/utils/config.py
mmcv/utils/config.py
+2
-2
No files found.
mmcv/utils/config.py
View file @
bfdd0d59
...
...
@@ -89,11 +89,11 @@ class Config(object):
for
name
,
value
in
mod
.
__dict__
.
items
()
if
not
name
.
startswith
(
'__'
)
}
elif
filename
.
endswith
((
'.yaml'
,
'.json'
)):
elif
filename
.
endswith
((
'.yml'
,
'.yaml'
,
'.json'
)):
import
mmcv
cfg_dict
=
mmcv
.
load
(
filename
)
else
:
raise
IOError
(
'Only py/yaml/json type are supported now!'
)
raise
IOError
(
'Only py/
yml/
yaml/json type are supported now!'
)
return
Config
(
cfg_dict
,
filename
=
filename
)
@
staticmethod
...
...
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