allow .yml extension for config file

pull/38/head
wangg12 2019-03-08 10:08:58 +08:00
parent 8b4417c19a
commit bfdd0d5985
1 changed files with 2 additions and 2 deletions

View File

@ -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