-
Notifications
You must be signed in to change notification settings - Fork 584
fix(tf): fix UV resolution with TF 2.19 #4786
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(tf): fix UV resolution with TF 2.19 #4786
Conversation
Fix deepmodeling#4679 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 adds UV dependency metadata entries for TensorFlow 2.19.0 to resolve issue #4679.
- Introduces a
tool.uv.dependency-metadatablock fortensorflow2.19.0. - Introduces a similar block for
tensorflow-cpu2.19.0.
Comments suppressed due to low confidence (1)
pyproject.toml:540
- The
tensorflow-cpublock includes GPU-specific extras (e.g., nvidia-cublas) which will pull unnecessary GPU dependencies for CPU-only installs. Remove or scope these GPU extras appropriately.
'nvidia-cublas-cu12 ==12.5.3.2 ; extra == "and-cuda",
📝 WalkthroughWalkthroughThe change adds two new dependency metadata entries for Changes
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. 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 (
|
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
🧹 Nitpick comments (2)
pyproject.toml (2)
470-511: Consolidate duplicate dependency metadata
Both thetensorflowandtensorflow-cpuentries share an almost identicalrequires-distlist. Duplicating this list increases maintenance overhead and risks drift when future updates are needed. Consider extracting the common array into a shared snippet or generating both tables programmatically.
472-472: Clarify the issue reference
The inline comment# Fix https://github.com/deepmodeling/deepmd-kit/issues/4679is useful, but a more descriptive annotation (e.g.# Adding TF 2.19 metadata to resolve issue #4679) will aid future readers.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
pyproject.toml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (30)
- GitHub Check: Build C library (2.18, libdeepmd_c.tar.gz)
- GitHub Check: Build C library (2.14, >=2.5.0rc0,<2.15, libdeepmd_c_cu11.tar.gz)
- GitHub Check: Test Python (5, 3.9)
- GitHub Check: Test Python (5, 3.12)
- GitHub Check: Test Python (6, 3.9)
- GitHub Check: Test Python (6, 3.12)
- GitHub Check: Test Python (3, 3.12)
- GitHub Check: Test Python (2, 3.9)
- GitHub Check: Test Python (4, 3.12)
- GitHub Check: Test Python (1, 3.9)
- GitHub Check: Test Python (3, 3.9)
- GitHub Check: Test Python (1, 3.12)
- GitHub Check: Test Python (2, 3.12)
- GitHub Check: Test Python (4, 3.9)
- GitHub Check: Build C++ (cuda120, cuda)
- GitHub Check: Build C++ (cpu, cpu)
- GitHub Check: Build C++ (rocm, rocm)
- GitHub Check: Build C++ (cuda, cuda)
- GitHub Check: Build C++ (clang, clang)
- GitHub Check: Test C++ (true)
- GitHub Check: Test C++ (false)
- GitHub Check: Build wheels for cp311-manylinux_x86_64
- GitHub Check: Analyze (python)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (c-cpp)
- GitHub Check: Build wheels for cp310-manylinux_aarch64
- GitHub Check: Build wheels for cp311-macosx_arm64
- GitHub Check: Build wheels for cp311-manylinux_x86_64
- GitHub Check: Build wheels for cp311-win_amd64
- GitHub Check: Build wheels for cp311-macosx_x86_64
🔇 Additional comments (2)
pyproject.toml (2)
477-481: Verify CUDA-extra conditions
You've appended CUDA-related packages underextra == "and-cuda". Please confirm that UV’s extras mechanism prevents these from installing by default on CPU-only platforms, and that end users won’t accidentally pull in GPU libs when they only need the CPU variant.
513-553: Approve TF CPU variant metadata
Thetensorflow-cputable correctly mirrors the GPU variant with conditional CUDA extras. This should ensure proper resolution for CPU-only installations under TF 2.19.0.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## devel #4786 +/- ##
==========================================
- Coverage 84.80% 84.79% -0.01%
==========================================
Files 698 698
Lines 67793 67793
Branches 3543 3543
==========================================
- Hits 57489 57486 -3
Misses 9171 9171
- Partials 1133 1136 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Fix deepmodeling#4679 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated dependency metadata for TensorFlow 2.19.0 and TensorFlow-CPU 2.19.0 to improve compatibility and dependency resolution. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Fix #4679
Summary by CodeRabbit