-
Notifications
You must be signed in to change notification settings - Fork 540
style: extend no-explicit-dtype check to xp and jnp #4247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
style: extend no-explicit-dtype check to xp and jnp #4247
Conversation
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
|
Signed-off-by: Jinzhe Zeng <[email protected]>
📝 WalkthroughWalkthroughThe changes in this pull request involve modifications to two files: Changes
Possibly related PRs
Suggested reviewers
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- deepmd/dpmodel/array_api.py (1 hunks)
- source/checker/deepmd_checker.py (1 hunks)
🧰 Additional context used
🔇 Additional comments (1)
source/checker/deepmd_checker.py (1)
40-40
: LGTM! The changes correctly extend dtype checking.The addition of "xp" and "jnp" to the set of checked libraries properly implements the PR objective of extending the no-explicit-dtype check. The implementation maintains consistency with the existing error handling logic while broadening the validation scope.
Signed-off-by: Jinzhe Zeng <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## devel #4247 +/- ##
==========================================
+ Coverage 84.55% 84.57% +0.01%
==========================================
Files 537 547 +10
Lines 51237 51334 +97
Branches 3047 3051 +4
==========================================
+ Hits 43324 43416 +92
- Misses 6965 6968 +3
- Partials 948 950 +2 ☔ View full report in Codecov by Sentry. |
Summary by CodeRabbit
New Features
DPChecker
to recognize additional libraries ("xp" and "jnp") for enhanced validation of function calls.Bug Fixes
offset
calculation in thexp_take_along_axis
function to ensure it matches the data type of theindices
array.