fix(api): trim PyTorch type map separators#5544
Conversation
Return PyTorch and PTExpt type maps with the same space-separated format as other backends, without a trailing separator or stale caller-provided content. Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5)
📝 WalkthroughWalkthroughFive Changesget_type_map trailing-space fix and test coverage
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
DeepPotPD appends characters into the caller-provided output string. Clear it first so repeated calls and non-empty output strings do not retain stale data. Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5)
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #5544 +/- ##
=======================================
Coverage 82.21% 82.22%
=======================================
Files 892 892
Lines 101531 101542 +11
Branches 4240 4245 +5
=======================================
+ Hits 83475 83490 +15
+ Misses 16753 16751 -2
+ Partials 1303 1301 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Problem - Issue deepmodeling#3905 asks for universal C/C++ API coverage instead of one-off backend-specific DeepPot tests. - A first pass should stay focused and avoid rewriting the existing large API test suite. Change - Add shared reference data for the common DeepPot water fixture. - Add parameterized C++ API tests for metadata and atomic inference across TensorFlow, PyTorch, PT-Expt, JAX, and Paddle when those backends/artifacts are available. - Add matching C API tests using `DP_DeepPotCompute2` / `DP_DeepPotComputef2` and link torch in the C test target so PT-Expt guards are detected consistently. - After deepmodeling#5544 fixed PyTorch type-map separators, require exact type-map metadata again and tighten the remaining PyTorch DeepTensor type-map test similarly. Verification - `uvx pre-commit run --files source/api_c/tests/CMakeLists.txt source/api_c/tests/test_deeppot_universal.cc source/api_cc/tests/test_deeppot_universal.cc source/tests/infer/deeppot_universal_data.h source/api_c/tests/test_deeppot_a_ptexpt.cc source/api_cc/tests/test_deepdipole_pt.cc` - Local full CTest was not run because this workspace does not have a C++ backend dependency installed; the new tests skip unavailable backend artifacts and should be exercised by the existing C++ test job after generated models are prepared. Refs deepmodeling#3905 Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5) --------- Co-authored-by: Jinzhe Zeng <jinzhe.zeng@ustc.edu.cn>
Problem
get_type_mapimplementations append a trailing space to the returned type-map string.Change
Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5)