fix: standardize the deepmd/npy/mixed format#425
Merged
wanghan-iapcm merged 5 commits intodeepmodeling:develfrom Feb 25, 2023
Merged
fix: standardize the deepmd/npy/mixed format#425wanghan-iapcm merged 5 commits intodeepmodeling:develfrom
wanghan-iapcm merged 5 commits intodeepmodeling:develfrom
Conversation
…_npy_mixed dpdata.MultiSystems().from_deepmd_npy_mixed only returned the results but did not change itself, which is fixed in this PR, to be consistent with other from methods. (another bug is also fixed: not using .copy() in data["atom_names"] may cause error when manually changing type_map for this system.)
wanghan-iapcm
requested changes
Feb 24, 2023
Contributor
wanghan-iapcm
left a comment
There was a problem hiding this comment.
Please add the UTs that can detect the two fixed bugs.
1. Allow multiple sets in mixed-type format. (Now for maximum 50000 frames in one sys and 2000 frames in one set.) (I did not use 5000 frames per set because I think maximum set number will be much more often used in mixed-type format than other format, and 2000 will be enough for large batch and more friendly for memory) 2. Add UTs for type_map changing and mixed_type dir check.
for more information, see https://pre-commit.ci
Codecov ReportBase: 82.35% // Head: 82.51% // Increases project coverage by
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## devel #425 +/- ##
==========================================
+ Coverage 82.35% 82.51% +0.15%
==========================================
Files 68 68
Lines 6182 6198 +16
==========================================
+ Hits 5091 5114 +23
+ Misses 1091 1084 -7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
wanghan-iapcm
requested changes
Feb 25, 2023
…tom_numbs' Merge frames with the same natoms into one single system with name 'atom_numbs' Support auto walk in directory for mixed_type when dpdata.multisystem().from_deepmd_npy_mixed is called.
for more information, see https://pre-commit.ci
wanghan-iapcm
approved these changes
Feb 25, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has concated two commits together:
dpdata.MultiSystems().from_deepmd_npy_mixed only returned the results before but did not change itself, which is fixed in this commit, to be consistent with other from methods.
(another bug is also fixed: not using .copy() in data["atom_names"] may cause error when manually changing type_map for this system. UTs are added in the next commit.)
Now for maximum 50000 frames in one sys and 2000 frames in one set.
The reason I did not use 5000 frames per set, is that I think maximum set frames will be much more often used in mixed-type format than other format, and 2000 will be enough for large batch and more friendly for memory.
Add UTs for type_map changing and mixed_type dir check.