MCPcopy
hub / github.com/OpenMotionLab/MotionGPT / get_module_config

Function get_module_config

mGPT/config.py:9–21  ·  view source on GitHub ↗

Load yaml config files from subfolders

(cfg, filepath="./configs")

Source from the content-addressed store, hash-verified

7
8
9def get_module_config(cfg, filepath="./configs"):
10 """
11 Load yaml config files from subfolders
12 """
13
14 yamls = glob.glob(pjoin(filepath, '*', '*.yaml'))
15 yamls = [y.replace(filepath, '') for y in yamls]
16 for yaml in yamls:
17 nodes = yaml.replace('.yaml', '').replace('/', '.')
18 nodes = nodes[1:] if nodes[0] == '.' else nodes
19 OmegaConf.update(cfg, nodes, OmegaConf.load('./configs' + yaml))
20
21 return cfg
22
23
24def get_obj_from_str(string, reload=False):

Callers 1

parse_argsFunction · 0.85

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected