Bug fix of memory overflow when calculating model deviation#1154
Bug fix of memory overflow when calculating model deviation#1154amcadmus merged 33 commits intodeepmodeling:develfrom
Conversation
…d-kit-devel into devel
…d-kit-devel into devel
…d-kit-devel into devel
Codecov Report
@@ Coverage Diff @@
## devel #1154 +/- ##
==========================================
+ Coverage 75.66% 76.06% +0.39%
==========================================
Files 89 91 +2
Lines 7048 7241 +193
==========================================
+ Hits 5333 5508 +175
- Misses 1715 1733 +18
Continue to review full report at Codecov.
|
deepmd/infer/model_devi.py
Outdated
| devis.append(devi) | ||
| coords = data["coord"] | ||
| boxs = data["box"] | ||
| atype = data["type"][0] |
There was a problem hiding this comment.
Is there a reason to only use the first (?) atom type?
There was a problem hiding this comment.
I think atom types for all frames in a dataset is the same, aren't they?
There was a problem hiding this comment.
I don't think we can publicly ensure it if the returned array is the size of nframes*natoms instead of natoms
There was a problem hiding this comment.
I agree with @njzjz , in this context we do not assume all frames of data["type"] has the same value.
deepmd/infer/model_devi.py
Outdated
| devis.append(devi) | ||
| coords = data["coord"] | ||
| boxs = data["box"] | ||
| atype = data["type"][0] |
There was a problem hiding this comment.
I agree with @njzjz , in this context we do not assume all frames of data["type"] has the same value.
|
Next time you PR, please checkout a new branch. |
|
fixed by #1165 |
I don't think so... |
|
@njzjz It should be straightforward of using |
Agree, and I've not decided whether we should use it on DeepPot -- the Python interface provided to users. |
Good idea! |
Calculate model deviation frame by frame to avoid memory overflow problems