-
Notifications
You must be signed in to change notification settings - Fork 504
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
[r2] fix: move resnet_dt checking from graph to tabulate #3952
Conversation
Fix deepmodeling#3950. Backport a part of deepmodeling#3263 to r2 (the whole of deepmodeling#3263 is not likely to be backported). Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
WalkthroughWalkthroughThe updates in Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant Trainer
participant Descriptor
participant Utils
User ->> CLI: dp train --skip-neighbor-stat --init-frz-model test.pb test_job.json
CLI ->> Trainer: Initialize training
Trainer ->> Descriptor: Load descriptor (se_atten_v2)
Descriptor ->> Utils: Call get_embedding_net_variables_from_graph_def
Utils ->> Utils: get_embedding_net_nodes_from_graph_def with refined constraints
Utils ->> Descriptor: Return variables
Descriptor ->> Trainer: Initialize variables
Trainer ->> CLI: Start training
Assessment against linked issues
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (2)
Files skipped from review due to trivial changes (1)
Additional context usedRuff
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: 0
Outside diff range and nitpick comments (2)
deepmd/utils/tabulate.py (2)
136-139
: Usekey in dict
instead ofkey in dict.keys()
.This simplifies the code and is more idiomatic in Python.
- for key in self.embedding_net_nodes.keys(): + for key in self.embedding_net_nodes:Tools
Ruff
136-136: Use
key in dict
instead ofkey in dict.keys()
Remove
.keys()
(SIM118)
137-139
: Ensure error message clarity in assertion.The error message should be more descriptive to help users understand the constraint.
- ), "currently, only support weight matrix and bias matrix at the tabulation op!" + ), "Currently, only weight matrix and bias matrix are supported at the tabulation operation."
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## r2 #3952 +/- ##
=======================================
Coverage 81.51% 81.51%
=======================================
Files 342 342
Lines 33882 33882
Branches 2876 2876
=======================================
Hits 27618 27618
Misses 5381 5381
Partials 883 883 ☔ View full report in Codecov by Sentry. |
Fix #3950. Backport a part of #3263 to r2 (the whole of #3263 is not likely to be backported).
Summary by CodeRabbit
New Features
Refactor