def dump_cfg(cfg, path):
    if comm.is_main_process():
        with PathManager.open(path, 'w') as f:
            f.write(cfg.dump())
        logger.info('Full config saved to {}'.format(path))
def dump_cfg(cfg, path):
    if comm.is_main_process():
        with PathManager.open(path, 'w') as f:
            f.write(cfg.dump())
        logger.info('Full config saved to {}'.format(path))