Spaces:
Paused
Paused
File size: 384 Bytes
d3653d5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import argparse
import os
import os.path as osp
from mmengine.config import Config
def parse_config(path=None):
if path is None:
parser = argparse.ArgumentParser()
parser.add_argument('config_dir', type=str)
args = parser.parse_args()
path = args.config_dir
config = Config.fromfile(path)
config.config_dir = path
return config
|