-
Notifications
You must be signed in to change notification settings - Fork 584
fix(jax): fix the usage of jaxlib.xla_extension
#4824
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
Conversation
`jaxlib.xla_extension` has been removed in the recent jax versions. Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
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.
Pull Request Overview
This PR updates OOM error detection by removing the dependency on the removed jaxlib.xla_extension.XlaRuntimeError type.
- Replace
jaxlib.xla_extension.XlaRuntimeErrorwith built-inRuntimeError - Retain existing
ValueErrorcheck for RESOURCE_EXHAUSTED messages
for more information, see https://pre-commit.ci
📝 WalkthroughWalkthroughThe code removes the import of the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant auto_batch_size.py
Caller->>auto_batch_size.py: Call is_oom_error(e)
auto_batch_size.py->>auto_batch_size.py: Check if e is (RuntimeError, ValueError)
auto_batch_size.py->>auto_batch_size.py: Check if "RESOURCE_EXHAUSTED:" in str(e)
auto_batch_size.py-->>Caller: Return True/False
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Pylint (3.3.7)deepmd/jax/utils/auto_batch_size.pyNo files to lint: exiting. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (2)📓 Common learningsdeepmd/jax/utils/auto_batch_size.py (6)⏰ Context from checks skipped due to timeout of 90000ms (24)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #4824 +/- ##
==========================================
- Coverage 84.57% 84.57% -0.01%
==========================================
Files 699 699
Lines 68039 68038 -1
Branches 3541 3543 +2
==========================================
- Hits 57542 57541 -1
Misses 9363 9363
Partials 1134 1134 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f8f01cb
`jaxlib.xla_extension` has been removed in recent versions of JAX. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Improved exception handling by updating error type checks and removing an unnecessary dependency. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
jaxlib.xla_extensionhas been removed in recent versions of JAX.Summary by CodeRabbit