-
Notifications
You must be signed in to change notification settings - Fork 520
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
feat: add get_model
classmethod to BaseModel
#4002
Conversation
Fix deepmodeling#3968. External and new models can implement this method (if different from default) without changing the old `get_model` methods (which cannot be done by a plugin). Note: I don't modify old `get_model` methods in this PR. Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
WalkthroughWalkthroughThe recent changes introduce a standardized method for model instantiation across various classes in the DeepMD framework. The new Changes
Assessment against linked issues
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 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: 3
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #4002 +/- ##
==========================================
- Coverage 82.83% 82.82% -0.02%
==========================================
Files 522 522
Lines 50901 50917 +16
Branches 3015 3015
==========================================
+ Hits 42165 42171 +6
- Misses 7799 7807 +8
- Partials 937 939 +2 ☔ View full report in Codecov by Sentry. |
|
Fix deepmodeling#3968. External and new models can implement this method (if different from default) without changing the old `get_model` methods (which cannot be done by a plugin). Note: I don't modify old `get_model` methods in this PR. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new method for model instantiation that enhances flexibility in parameter configuration. - Improved the model retrieval process to support dynamic model selection based on specified types. - **Bug Fixes** - Enhanced control flow to ensure correct model type selection, addressing potential issues with model retrieval. - **Refactor** - Updated existing model retrieval functions to streamline logic and improve maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Fix #3968. External and new models can implement this method (if different from default) without changing the old
get_model
methods (which cannot be done by a plugin).Note: I don't modify old
get_model
methods in this PR.Summary by CodeRabbit
New Features
Bug Fixes
Refactor