Skip to content

Commit

Permalink
fix(pt): fix compute_output_stats_global when atomic_output is `N…
Browse files Browse the repository at this point in the history
…one`
  • Loading branch information
njzjz committed Sep 22, 2024
1 parent 6010c73 commit 5ac6729
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepmd/pt/utils/stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def compute_output_stats_global(
std_atom_e = {}
for kk in keys:
if kk in stats_input:
if atomic_output.get_data()[kk].intensive:
if atomic_output is not None and atomic_output.get_data()[kk].intensive:
task_dim = stats_input[kk].shape[1]
assert merged_natoms[kk].shape == (nf[kk], ntypes)
stats_input[kk] = (
Expand Down

0 comments on commit 5ac6729

Please sign in to comment.