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
76bcbe2d
Unverified
Commit
76bcbe2d
authored
Mar 09, 2019
by
Kai Chen
Committed by
GitHub
Mar 09, 2019
Browse files
Merge pull request #38 from wangg12/master
allow .yml extension for config file
parents
8b4417c1
bfdd0d59
Changes
1
Show 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 @
76bcbe2d
...
...
@@ -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