# -*- coding: utf-8 -*-
import yaml
import os
import numpy as np
import pprint

def build_cfg(path):
    print('Loading config from ', path)
    if not os.path.exists(path):
        raise KeyError('%s does not exist ...' % path)

    with open(path, 'r') as f:
        cfg = yaml.safe_load(f.read())
        cfg.update(cfg['global'])
        pprint.pprint(cfg)

    return cfg

0155f0341cc63d981bdc9d473e3934c57a6a52c0
<mask token>

<mask token>


def build_cfg(path):
    print('Loading config from ', path)
    if not os.path.exists(path):
        raise KeyError('%s does not exist ...' % path)
    with open(path, 'r') as f:
        cfg = yaml.safe_load(f.read())
        cfg.update(cfg['global'])
        pprint.pprint(cfg)
    return cfg

import yaml
import os
import numpy as np
import pprint


def build_cfg(path):
    print('Loading config from ', path)
    if not os.path.exists(path):
        raise KeyError('%s does not exist ...' % path)
    with open(path, 'r') as f:
        cfg = yaml.safe_load(f.read())
        cfg.update(cfg['global'])
        pprint.pprint(cfg)
    return cfg

# -*- coding: utf-8 -*-
import yaml
import os
import numpy as np
import pprint

def build_cfg(path):
    print('Loading config from ', path)
    if not os.path.exists(path):
        raise KeyError('%s does not exist ...' % path)

    with open(path, 'r') as f:
        cfg = yaml.safe_load(f.read())
        cfg.update(cfg['global'])
        pprint.pprint(cfg)

    return cfg
