Skip to content

Commit

Permalink
[Fix] fix mim search error (#3194)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiexinch committed Jul 13, 2023
1 parent ac78b13 commit 067a95e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
11 changes: 10 additions & 1 deletion .dev_scripts/update_model_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def get_model_info(md_file: str, config_dir: str,
if line.startswith('<!-- [DATASET]'):
is_dataset = True

if '<!-- [SKIP DEV CHECK] -->' in line:
return None, None

# get dataset names
if line.startswith('###'):
current_dataset = line.split('###')[1].strip()
Expand Down Expand Up @@ -279,14 +282,20 @@ def update_model_index(config_dir_list: List[str]) -> bool:
collection_name_list: List[str] = get_collection_name_list(md_file_list)
# hard code to add 'FPN'
collection_name_list.append('FPN')
remove_config_dir_list = []
# parse md file
for md_file, config_dir in zip(md_file_list, config_dir_list):
results, collection_name = get_model_info(md_file, config_dir,
collection_name_list)
if results is None:
remove_config_dir_list.append(config_dir)
continue
filename = osp.join(config_dir, 'metafile.yaml')
file_modified |= dump_yaml_and_check_difference(results, filename)
if collection_name != '':
collection_name_list.append(collection_name)

# remove config dir
for config_dir in remove_config_dir_list:
config_dir_list.remove(config_dir)
file_modified |= update_model_index(config_dir_list)
sys.exit(1 if file_modified else 0)
4 changes: 1 addition & 3 deletions configs/dsdl/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# DSDL: Standard Description Language for DataSet

<!-- [ALGORITHM] -->

<!-- [DATASET] -->
<!-- [SKIP DEV CHECK] -->

## Abstract

Expand Down
12 changes: 0 additions & 12 deletions configs/dsdl/metafile.yaml

This file was deleted.

1 change: 0 additions & 1 deletion model-index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Import:
- configs/dmnet/metafile.yaml
- configs/dnlnet/metafile.yaml
- configs/dpt/metafile.yaml
- configs/dsdl/metafile.yaml
- configs/emanet/metafile.yaml
- configs/encnet/metafile.yaml
- configs/erfnet/metafile.yaml
Expand Down

0 comments on commit 067a95e

Please sign in to comment.