Skip to content

allow custom data types for deepmd format#476

Merged
wanghan-iapcm merged 3 commits intodeepmodeling:develfrom
njzjz:custom_data
May 24, 2023
Merged

allow custom data types for deepmd format#476
wanghan-iapcm merged 3 commits intodeepmodeling:develfrom
njzjz:custom_data

Conversation

@njzjz
Copy link
Member

@njzjz njzjz commented May 23, 2023

In this commit, the deepmd format reads data types from dpdata.system.LabeledSystem.DTYPES and load or dump the corresponding data. One can modify dpdata.system.LabeledSystem.DTYPES before using it or in a plugin (see tests), so deepmd format can be extended in this way.

@codecov
Copy link

codecov bot commented May 23, 2023

Codecov Report

Patch coverage: 82.60% and project coverage change: -0.01 ⚠️

Comparison is base (bc72db3) 82.70% compared to head (0b0dd8e) 82.69%.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel     #476      +/-   ##
==========================================
- Coverage   82.70%   82.69%   -0.01%     
==========================================
  Files          70       70              
  Lines        6324     6393      +69     
==========================================
+ Hits         5230     5287      +57     
- Misses       1094     1106      +12     
Impacted Files Coverage Δ
dpdata/deepmd/hdf5.py 82.82% <75.00%> (-1.51%) ⬇️
dpdata/deepmd/raw.py 91.48% <81.81%> (-2.96%) ⬇️
dpdata/deepmd/comp.py 94.89% <87.09%> (-2.28%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@njzjz
Copy link
Member Author

njzjz commented May 23, 2023

@robinzyb this PR should be also helpful to you if you want to implement any new data types.

@wanghan-iapcm wanghan-iapcm merged commit e31b42e into deepmodeling:devel May 24, 2023
wanghan-iapcm pushed a commit that referenced this pull request Jun 8, 2023
Follow up #476. `deepmd/npy` and `deepmd/raw` are ok, and only
`deepmd/hdf5` has this bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants