Closed njzjz closed 1 month ago
The recent changes introduce mappings for "global_polar" and "wfc" in DeepEvalBackend
, update class inheritance and add properties in DeepGlobalPolar
and DeepWFC
, and create a new OldDeepTensor
class. Additionally, the test setup in test_get_potential.py
now includes temporary model files for DeepGlobalPolar
and DeepWFC
.
Files/Modules | Change Summary |
---|---|
deepmd/infer/deep_eval.py |
Added mappings for "global_polar" and "wfc" in DeepEvalBackend 's key_map dictionary. |
deepmd/infer/deep_polar.py |
Updated imports, changed DeepGlobalPolar to inherit from OldDeepTensor , and added output_def property. |
deepmd/infer/deep_tensor.py |
Introduced OldDeepTensor class inheriting from DeepTensor with an eval_full method raising RuntimeError . |
deepmd/infer/deep_wfc.py |
Changed DeepWFC to inherit from OldDeepTensor and added output_def property. |
source/tests/tf/test_get_potential.py |
Added imports, used temporary files for testing, and updated test setup to create temporary model files for DeepGlobalPolar and DeepWFC . |
sequenceDiagram
participant Tester
participant TempFile
participant DeepGlobalPolar
participant DeepWFC
Tester->>+TempFile: Create temporary model files
TempFile-->>Tester: Return file paths
Tester->>+DeepGlobalPolar: Instantiate with model file
Tester->>+DeepWFC: Instantiate with model file
DeepGlobalPolar-->>Tester: Return instance
DeepWFC-->>Tester: Return instance
Objective | Addressed | Explanation |
---|---|---|
Add model files for DeepGlobalPolar and DeepWFC in the test setup (#3561 , #3562 ) |
✅ | |
Ensure instantiation of DeepGlobalPolar and DeepWFC objects in tests (#3561 , #3562 ) |
✅ | |
Convert .pbtxt to .pb for DeepGlobalPolar model in tests (#3562 ) |
✅ |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 92.30769%
with 1 lines
in your changes are missing coverage. Please review.
Project coverage is 82.54%. Comparing base (
12bcc50
) to head (1a244b4
).
Files | Patch % | Lines |
---|---|---|
deepmd/infer/deep_tensor.py | 66.66% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Fix #3561. Fix #3562.
Not sure if some one uses them, but it's good to keep compatibility.
Summary by CodeRabbit
New Features
output_def
property to define model output forDeepGlobalPolar
andDeepWFC
classes.Bug Fixes
DeepGlobalPolar
andDeepWFC
.Refactor
DeepGlobalPolar
andDeepWFC
classes now inherit fromOldDeepTensor
for better structure and functionality.Tests
DeepGlobalPolar
andDeepWFC
objects.