[pull] master from deepmodeling:master - #264
Merged
Merged
Conversation
## Summary - export charge_spin-aware JAX SavedModel signatures only for models that need charge/spin conditioning - add Python and C++ JAX runtime fallback to stored default_chg_spin, while keeping old SavedModel signatures compatible - allow C++ header wrapper to broadcast one-frame charge_spin input safely and add focused jax2tf regressions ## Tests - ruff format . - ruff check . - pytest source/jax2tf_tests/test_make_model.py source/jax2tf_tests/test_serialization.py source/jax2tf_tests/test_tfmodel.py -q - c++ -std=c++17 -Isource/api_c/include -fsyntax-only -x c++ ... - c++ -std=c++17 -fsyntax-only ... source/api_cc/src/DeepPotJAX.cc ## Notes - `cmake --build source/build --target deepmd_cc -j2` still fails before compiling this change because local CMake TensorFlow detection stops at `cmake/Findtensorflow.cmake:234 (file): file unknown error`. - Review requested from @anyangml for charge_spin C++ runtime context and @iProzd for charge_spin/DPA3 behavior. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added optional charge/spin conditioning across JAX evaluation, JAX→TF SavedModel export, TensorFlow model wrapper, and C++/C-API interfaces. * SavedModels now expose charge/spin support metadata (supported flag, dimension, default values). * Charge/spin inputs can be provided per frame or broadcast from a single vector. * **Bug Fixes** * When charge/spin conditioning isn’t supported, provided inputs are ignored with a warning. * Improved handling of empty/unsupported charge/spin and clearer errors for invalid shapes. * **Tests** * Added/extended tests covering forwarding, SavedModel export/import, defaults, broadcasting, and validation across JAX/TF/C++. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Added `DPA4Wrapper`/`SeZMWrapper` integration for nvalchemi-toolkit inference, including support for frozen `.pt2` packages. * Added runnable water examples for single-point inference, NVE/NVT molecular dynamics, and geometry relaxation. * **Documentation** * Added a third-party documentation page and an example README covering setup, runtime options, and stress conventions. * Updated documentation navigation to include the new nvalchemi guide. * **Bug Fixes / Improvements** * Improved package import behavior with a clearer error and explicit install instructions when the optional toolkit is unavailable. * **Tests** * Added comprehensive correctness tests comparing wrapper outputs to toolkit-native neighbor-list execution. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )