diff --git a/.dev_scripts/update_model_index.py b/.dev_scripts/update_model_index.py index ae30fc3bf..eb87c02f1 100755 --- a/.dev_scripts/update_model_index.py +++ b/.dev_scripts/update_model_index.py @@ -78,6 +78,9 @@ def get_model_info(md_file: str, config_dir: str, if line.startswith('' in line: + return None, None + # get dataset names if line.startswith('###'): current_dataset = line.split('###')[1].strip() @@ -279,14 +282,20 @@ if __name__ == '__main__': 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) diff --git a/configs/dsdl/README.md b/configs/dsdl/README.md index b882a118b..e564cffdb 100644 --- a/configs/dsdl/README.md +++ b/configs/dsdl/README.md @@ -1,8 +1,6 @@ # DSDL: Standard Description Language for DataSet - - - + ## Abstract diff --git a/configs/dsdl/metafile.yaml b/configs/dsdl/metafile.yaml deleted file mode 100644 index 19ad07ed6..000000000 --- a/configs/dsdl/metafile.yaml +++ /dev/null @@ -1,12 +0,0 @@ -Collections: -- Name: '' - License: Apache License 2.0 - Metadata: - Training Data: [] - Paper: - Title: '' - URL: '' - README: configs/dsdl/README.md - Frameworks: - - PyTorch -Models: [] diff --git a/model-index.yml b/model-index.yml index 3fe6a2e03..3ed1c1cdc 100644 --- a/model-index.yml +++ b/model-index.yml @@ -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