Skip to content

Commit

Permalink
Perf: remove redundant checks on data integrity
Browse files Browse the repository at this point in the history
  • Loading branch information
caic99 authored Nov 27, 2024
1 parent f343a3b commit 36884d2
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions deepmd/utils/data_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 36884d2

Please sign in to comment.