-
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
fix(cc,pt): translate PT exceptions to the DeePMD-kit exception #3918
Conversation
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
This reverts commit 42aa5d6.
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
WalkthroughWalkthroughThe recent updates enhance the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant DeepPotPT
participant PyTorch
participant DeePMD
Note over User,DeepPotPT: Initialization Phase
User ->> DeepPotPT: new DeepPotPT
DeepPotPT ->> translate_error: Wrapping init
translate_error ->> PyTorch: Attempt to initialize
PyTorch -->> translate_error: Throws exception
translate_error ->> DeePMD: Convert to DeePMD exception
DeePMD -->> User: Initialization failed exception
Note over User,DeepPotPT: Computation Phase
User ->> DeepPotPT: computew
DeepPotPT ->> translate_error: Wrapping computew
translate_error ->> PyTorch: Perform computation
PyTorch -->> translate_error: Throws exception
translate_error ->> DeePMD: Convert to DeePMD exception
DeePMD -->> User: Computation failed exception
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (3)
Additional comments not posted (4)
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 (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #3918 +/- ##
==========================================
- Coverage 82.72% 82.21% -0.52%
==========================================
Files 519 519
Lines 50515 50540 +25
Branches 3015 3015
==========================================
- Hits 41791 41553 -238
- Misses 7788 8054 +266
+ Partials 936 933 -3 ☔ View full report in Codecov by Sentry. |
…modeling#3918) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced error handling with the new `translate_error` method, improving the user experience by providing clearer error messages during model initialization and computation. - **Tests** - Added a test to verify exception handling when initializing `DeepPot` with a non-existent file. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Summary by CodeRabbit
New Features
translate_error
method, improving the user experience by providing clearer error messages during model initialization and computation.Tests
DeepPot
with a non-existent file.