From 36884d2b924c12b8a24d5194a2df2c5da619401f Mon Sep 17 00:00:00 2001 From: Chun Cai Date: Wed, 27 Nov 2024 12:52:18 +0800 Subject: [PATCH] Perf: remove redundant checks on data integrity --- deepmd/utils/data_system.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/deepmd/utils/data_system.py b/deepmd/utils/data_system.py index 0e960d0ba1..0aea12e2b1 100644 --- a/deepmd/utils/data_system.py +++ b/deepmd/utils/data_system.py @@ -758,20 +758,9 @@ def process_systems(systems: Union[str, list[str]]) -> list[str]: help_msg = "Please check your setting for data systems" # check length of systems if len(systems) == 0: - msg = "cannot find valid a data system" + msg = "Can not find any valid data systems" log.fatal(msg) raise OSError(msg, help_msg) - # roughly check all items in systems are valid - for ii in systems: - ii = DPPath(ii) - if not ii.is_dir(): - msg = f"dir {ii} is not a valid dir" - log.fatal(msg) - raise OSError(msg, help_msg) - if not (ii / "type.raw").is_file(): - msg = f"dir {ii} is not a valid data system dir" - log.fatal(msg) - raise OSError(msg, help_msg) return systems