From e35d99768fb825846b0281c48455a8d80a63d0ad Mon Sep 17 00:00:00 2001 From: MURAOKA Taro Date: Fri, 22 Mar 2024 23:16:36 +0900 Subject: [PATCH] compose path with os.path.join for base/config.yml and revert previous check for None --- ann_benchmarks/definitions.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ann_benchmarks/definitions.py b/ann_benchmarks/definitions.py index bb2ee77d2..8ba363591 100644 --- a/ann_benchmarks/definitions.py +++ b/ann_benchmarks/definitions.py @@ -127,7 +127,7 @@ def get_config_files(base_dir: str = "ann_benchmarks/algorithms") -> List[str]: """Get config files for all algorithms.""" config_files = glob.glob(os.path.join(base_dir, "*", "config.yml")) return list( - set(config_files) - {f"{base_dir}/base/config.yml"} + set(config_files) - {os.path.join(base_dir, "base", config.yml")} ) def load_configs(point_type: str, base_dir: str = "ann_benchmarks/algorithms") -> Dict[str, Any]: @@ -138,8 +138,6 @@ def load_configs(point_type: str, base_dir: str = "ann_benchmarks/algorithms") - with open(config_file, 'r') as stream: try: config_data = yaml.safe_load(stream) - if config_data is None: - continue algorithm_name = os.path.basename(os.path.dirname(config_file)) if point_type in config_data: configs[algorithm_name] = config_data[point_type]