mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
[Fix] Fix windows-style path in md2yml.py
in Windows pre-commit. (#1407)
* test * avoid windows path
This commit is contained in:
parent
98984bf855
commit
0d51115d85
@ -264,9 +264,12 @@ def update_model_index():
|
|||||||
yml_files = glob.glob(osp.join(configs_dir, '**', '*.yml'), recursive=True)
|
yml_files = glob.glob(osp.join(configs_dir, '**', '*.yml'), recursive=True)
|
||||||
yml_files.sort()
|
yml_files.sort()
|
||||||
|
|
||||||
|
# add .replace('\\', '/') to avoid Windows Style path
|
||||||
model_index = {
|
model_index = {
|
||||||
'Import':
|
'Import': [
|
||||||
[osp.relpath(yml_file, MMSEG_ROOT) for yml_file in yml_files]
|
osp.relpath(yml_file, MMSEG_ROOT).replace('\\', '/')
|
||||||
|
for yml_file in yml_files
|
||||||
|
]
|
||||||
}
|
}
|
||||||
model_index_file = osp.join(MMSEG_ROOT, 'model-index.yml')
|
model_index_file = osp.join(MMSEG_ROOT, 'model-index.yml')
|
||||||
is_different = dump_yaml_and_check_difference(model_index,
|
is_different = dump_yaml_and_check_difference(model_index,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user