Skip to content

Commit

Permalink
lll
Browse files Browse the repository at this point in the history
  • Loading branch information
SumGuo-88 committed Dec 26, 2024
1 parent 543a318 commit 26f9a17
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions deepmd/pt/utils/stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,16 @@ def make_stat_input(datasets, dataloaders, nbatches):
sys_stat[key] = torch.cat(sys_stat[key], dim=0)
dict_to_device(sys_stat)
lst.append(sys_stat)
unique_elements = set()
all_element = set()

collect_elements = set()
all_element = set()
for i in lst:
unique_values = np.unique(i['atype'].cpu().numpy())
unique_elements.update(unique_values)
collect_values = np.unique(i['atype'].cpu().numpy())
collect_elements.update(collect_values)
for i in datasets:
all_elements_in_dataset = i.get_all_atype
all_element.update(all_elements_in_dataset)
print(all_element)
missing_element = all_element - unique_elements
missing_element = all_element - collect_elements
for miss in missing_element:
for i in datasets:
if i.element_to_frames.get(miss, []) is not None:
Expand Down

0 comments on commit 26f9a17

Please sign in to comment.