"docs/git@developer.sourcefind.cn:one/TransferBench.git" did not exist on "3983555c6cd30f124bac47721316bbd9abed4bef"
Unverified Commit 76bcbe2d authored by Kai Chen's avatar Kai Chen Committed by GitHub
Browse files

Merge pull request #38 from wangg12/master

allow .yml extension for config file
parents 8b4417c1 bfdd0d59
...@@ -89,11 +89,11 @@ class Config(object): ...@@ -89,11 +89,11 @@ class Config(object):
for name, value in mod.__dict__.items() for name, value in mod.__dict__.items()
if not name.startswith('__') if not name.startswith('__')
} }
elif filename.endswith(('.yaml', '.json')): elif filename.endswith(('.yml', '.yaml', '.json')):
import mmcv import mmcv
cfg_dict = mmcv.load(filename) cfg_dict = mmcv.load(filename)
else: 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) return Config(cfg_dict, filename=filename)
@staticmethod @staticmethod
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment