Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Pt Polar Stat keyword #3584

Merged
merged 12 commits into from
Mar 26, 2024
Merged

Fix: Pt Polar Stat keyword #3584

merged 12 commits into from
Mar 26, 2024

Conversation

anyangml
Copy link
Collaborator

To fix #3582, should merge after #3571.

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.71%. Comparing base (3c09d46) to head (ff7d3dd).

Additional details and impacted files
@@           Coverage Diff           @@
##            devel    #3584   +/-   ##
=======================================
  Coverage   77.70%   77.71%           
=======================================
  Files         433      433           
  Lines       37491    37498    +7     
  Branches     1620     1620           
=======================================
+ Hits        29134    29141    +7     
  Misses       7496     7496           
  Partials      861      861           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anyangml
Copy link
Collaborator Author

anyangml commented Mar 22, 2024

There seems to be another bug KeyError: 'find_atomic_polarizability'.

I think the keys are removed here. @iProzd because the dtype for all the find_ terms are np.float32

sys_stat[dd] = None
elif isinstance(stat_data[dd], torch.Tensor):
if dd not in sys_stat:
sys_stat[dd] = []
sys_stat[dd].append(stat_data[dd])
else:
pass

if repeat != 1:
data = np.repeat(data, repeat).reshape([nframes, -1])
return np.float32(1.0), data
elif must:
raise RuntimeError("%s not found!" % path)
else:
if type_sel is not None and not output_natoms_for_type_sel:
ndof = ndof_ * natoms_sel
data = np.full([nframes, ndof], default, dtype=dtype)
if repeat != 1:
data = np.repeat(data, repeat).reshape([nframes, -1])
return np.float32(0.0), data

@anyangml anyangml requested a review from iProzd March 22, 2024 09:40
@njzjz njzjz linked an issue Mar 22, 2024 that may be closed by this pull request
@anyangml anyangml requested a review from njzjz March 25, 2024 06:05
deepmd/pt/utils/stat.py Show resolved Hide resolved
deepmd/pt/utils/utils.py Outdated Show resolved Hide resolved
@anyangml anyangml requested a review from iProzd March 25, 2024 07:52
deepmd/pt/utils/utils.py Outdated Show resolved Hide resolved
@anyangml anyangml requested a review from njzjz March 26, 2024 01:30
@njzjz njzjz added this pull request to the merge queue Mar 26, 2024
Merged via the queue into deepmodeling:devel with commit 964f02d Mar 26, 2024
48 checks passed
@njzjz njzjz mentioned this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] pt: polar training error: KeyError: 'type'
3 participants