-
Notifications
You must be signed in to change notification settings - Fork 526
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
refactor: remove global data_requirements #3798
Conversation
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
WalkthroughWalkthroughThe recent changes refactor the handling of data requirements in the Changes
Assessment against linked issues
Overall, the changes effectively address the objectives outlined in the linked issues by refactoring the handling of data requirements to eliminate global variables and improve encapsulation within the relevant classes. Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (6)
Files skipped from review due to trivial changes (1)
Additional comments not posted (8)
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 as PR comments)
Additionally, you can add CodeRabbit Configration 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: 3
Outside diff range and nitpick comments (2)
deepmd/tf/model/pairwise_dprc.py (1)
428-435
: Well encapsulated data requirement property.Consider enhancing the docstring to explain what "aparam" represents and why it's necessary for this model, to improve code readability and maintainability.
deepmd/tf/fit/ener.py (1)
936-952
: The newinput_requirement
property effectively encapsulates the data requirements for the model, replacing global variable usage with a more modular approach.Consider adding documentation or examples on how to use the new
input_requirement
property effectively in the context of the entire system, ensuring that developers understand the changes and how to integrate them into their workflows.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #3798 +/- ##
==========================================
- Coverage 82.58% 82.56% -0.03%
==========================================
Files 515 515
Lines 48806 48899 +93
Branches 2982 2983 +1
==========================================
+ Hits 40308 40373 +65
- Misses 7587 7615 +28
Partials 911 911 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Jinzhe Zeng <[email protected]>
Signed-off-by: Jinzhe Zeng <[email protected]>
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.
please add UT for the data requirement of each model type.
Signed-off-by: Jinzhe Zeng <[email protected]>
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
Fix deepmodeling#3522. Fix deepmodeling#3540. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new property `input_requirement` across various models to streamline data requirements handling. - Added a new property `label_requirement` for loss classes to specify data label requirements. - **Bug Fixes** - Refactored and removed outdated data requirement handling methods to improve data processing efficiency. - **Tests** - Added new test cases to validate the `input_requirement` and `label_requirement` properties. - Updated existing tests to align with the new data requirements handling approach. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <[email protected]>
Fix #3522. Fix #3540.
Summary by CodeRabbit
New Features
input_requirement
across various models to streamline data requirements handling.label_requirement
for loss classes to specify data label requirements.Bug Fixes
Tests
input_requirement
andlabel_requirement
properties.