dump model structure

This commit is contained in:
lyl120117
2020-07-11 12:14:05 +08:00
parent 7214a74144
commit d89d3384a0
3 changed files with 13 additions and 0 deletions
+3
View File
@@ -75,6 +75,8 @@ class AttrDict(dict):
global_config = AttrDict()
default_config = {'Global': {'debug': False, }}
def load_config(file_path):
"""
@@ -85,6 +87,7 @@ def load_config(file_path):
Returns: global config
"""
merge_config(default_config)
_, ext = os.path.splitext(file_path)
assert ext in ['.yml', '.yaml'], "only support yaml files for now"
merge_config(yaml.load(open(file_path), Loader=yaml.Loader))