Skip to content

Commit 735acf5

Browse files
authored
fix windows path error
on windows the path separator is "\\" will case the key error in the nodes. Try to fix this issue: OpenMotionLab#65
1 parent 0499f16 commit 735acf5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mGPT/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def get_module_config(cfg, filepath="./configs"):
1414
yamls = glob.glob(pjoin(filepath, '*', '*.yaml'))
1515
yamls = [y.replace(filepath, '') for y in yamls]
1616
for yaml in yamls:
17-
nodes = yaml.replace('.yaml', '').replace('/', '.')
17+
nodes = yaml.replace('.yaml', '').replace(os.sep, '.')
1818
nodes = nodes[1:] if nodes[0] == '.' else nodes
1919
OmegaConf.update(cfg, nodes, OmegaConf.load('./configs' + yaml))
2020

0 commit comments

Comments
 (0)