-
Notifications
You must be signed in to change notification settings - Fork 584
doc(pd): update paddle installation scripts and paddle related content in dpa3 document #4887
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
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
Updates Paddle installation documentation and improves error messaging for custom border operations. The changes modernize installation instructions to use the latest Paddle version and provide clearer guidance for users encountering missing custom operators.
- Updated Paddle installation from version 3.0.0 to 3.1.1 across all documentation
- Added nightly build installation options for development users
- Enhanced border_op error messages with specific installation instructions
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| doc/train/training.md | Updated training comments to remove "eager mode" reference and clarify CINN compiler benefits |
| doc/install/install-from-source.md | Updated Paddle installation commands from v3.0.0 to v3.1.1 and added nightly build options |
| doc/install/easy-install.md | Updated Paddle installation commands from v3.0.0 to v3.1.1 and added nightly build options |
| deepmd/pd/model/descriptor/repformers.py | Improved border_op error message with installation instructions and better formatting |
| deepmd/pd/model/descriptor/repflows.py | Improved border_op error message with installation instructions and better formatting |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: HydrogenSulfate <490868991@qq.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: HydrogenSulfate <490868991@qq.com>
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughUpdated the Paddle Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR/Issue comments)Type 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 (5)
doc/install/easy-install.md (1)
212-217: CPU install block looks correct; small pip best-practice nit.Consider using “python -m pip …” to ensure the right interpreter’s pip when users have multiple Pythons.
Apply if you want the consistency:
- pip install paddlepaddle==3.1.1 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/ + python -m pip install paddlepaddle==3.1.1 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/doc/train/training.md (1)
32-41: Good clarification; consider scoping the CINN speedup claim.The wording changes read better. To avoid overpromising, add “depending on model and hardware” next to the “~40%+ speedup” note or cite a benchmark.
-# [experimental] training models with the CINN compiler (~40%+ speedup) +# [experimental] training models with the CINN compiler (~40%+ speedup, depending on model and hardware)doc/install/install-from-source.md (1)
102-118: Version bump to Paddle 3.1.1 looks consistent; validate index URLs.The cu126/cu118/cpu blocks are consistent with easy-install.md. Please verify that 3.1.1 is available on the referenced stable indices, and that the nightly indices are valid, to keep source-install docs in sync with reality.
Also, optional: prefer “python -m pip …” for interpreter-safe installs.
-pip install paddlepaddle-gpu==3.1.1 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/ +python -m pip install paddlepaddle-gpu==3.1.1 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/deepmd/pd/model/descriptor/repformers.py (1)
69-71: Fix minor grammar and spacing in the NotImplementedError message.There is an extra space before the period after “model ”, and we can slightly tighten the phrasing.
Apply:
- "The 'border_op' operator is unavailable because the custom Paddle OP library was not built when freezing the model .\n" - "To install 'border_op', run: python source/op/pd/setup.py install\n" - "For more information, please refer to the DPA3 documentation." + "The 'border_op' operator is unavailable because the custom Paddle OP library was not built when freezing the model.\n" + "To install 'border_op', run: python source/op/pd/setup.py install\n" + "For more information, please refer to the DPA3 documentation."deepmd/pd/model/descriptor/repflows.py (1)
72-74: Fix minor grammar and spacing in the NotImplementedError message.Same extra space before the period and minor phrasing nit as in repformers.py.
Apply:
- "The 'border_op' operator is unavailable because the custom Paddle OP library was not built when freezing the model .\n" - "To install 'border_op', run: python source/op/pd/setup.py install\n" - "For more information, please refer to the DPA3 documentation." + "The 'border_op' operator is unavailable because the custom Paddle OP library was not built when freezing the model.\n" + "To install 'border_op', run: python source/op/pd/setup.py install\n" + "For more information, please refer to the DPA3 documentation."
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these settings in your CodeRabbit configuration.
📒 Files selected for processing (5)
deepmd/pd/model/descriptor/repflows.py(1 hunks)deepmd/pd/model/descriptor/repformers.py(1 hunks)doc/install/easy-install.md(3 hunks)doc/install/install-from-source.md(1 hunks)doc/train/training.md(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-14T07:11:51.333Z
Learnt from: njzjz
PR: deepmodeling/deepmd-kit#4884
File: .github/workflows/test_cuda.yml:46-46
Timestamp: 2025-08-14T07:11:51.333Z
Learning: As of PyTorch 2.8 (August 2025), the default wheel on PyPI installed by `pip install torch` is CPU-only. CUDA-enabled wheels are available on PyPI for Linux x86 and Windows x86 platforms, but require explicit specification via index URLs or variant-aware installers. For CUDA support, use `--index-url https://download.pytorch.org/whl/cu126` (or appropriate CUDA version).
Applied to files:
doc/install/install-from-source.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: Build wheels for cp311-macosx_x86_64
- GitHub Check: Build wheels for cp311-manylinux_x86_64
- GitHub Check: Build wheels for cp310-manylinux_aarch64
- GitHub Check: Build wheels for cp311-win_amd64
- GitHub Check: Build wheels for cp311-manylinux_x86_64
- GitHub Check: Build C library (2.14, >=2.5.0,<2.15, libdeepmd_c_cu11.tar.gz)
- GitHub Check: Build C library (2.18, libdeepmd_c.tar.gz)
- GitHub Check: Analyze (c-cpp)
- GitHub Check: Analyze (python)
🔇 Additional comments (2)
doc/install/easy-install.md (2)
200-205: Mirror the cu126 validation for cu118.Same comment as above: the commands are fine; verify 3.1.1 presence on cu118 stable/nightly indices to prevent stale docs.
188-193: Verified — PaddlePaddle 3.1.1 present on stable/nightly indices; install instructions OKStable indices (stable/cu126, stable/cu118, stable/cpu) list paddlepaddle(‑gpu) 3.1.1 wheels and the nightly indices (nightly/cu126, nightly/cu118, nightly/cpu) host pre-release builds. Official Paddle docs use these same indices as the canonical pip channels.
- File to keep as-is: doc/install/easy-install.md — lines 188–193
Head branch was pushed to by a user without write access
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 (4)
doc/model/dpa3.md (4)
1-1: Supported backends note is inconsistent with the header (missing Paddle).Header shows Paddle support, but the “Supported backends” note (Line 4) omits Paddle. Please update the note for accuracy.
Proposed change (adjust the note text on Line 4):
**Supported backends**: PyTorch {{ pytorch_icon }}, JAX {{ jax_icon }}, Paddle {{ paddle_icon }}, DP {{ dpmodel_icon }}
43-43: Minor wording tweak for the section title.“Requirements for installation from source code” reads better.
-## Requirements of installation from source code {{ pytorch_icon }} {{ paddle_icon }} +## Requirements for installation from source code {{ pytorch_icon }} {{ paddle_icon }}
47-60: Consider adding explicit install commands for the PyTorch OP path.You mention setting DP_ENABLE_PYTORCH=1 during installation but don’t provide an example. Adding a short, copy-pastable snippet helps users avoid misconfigurations.
Suggested insertion after Line 54:
The customized OP library for the Python interface can be installed by setting environment variable {envvar}`DP_ENABLE_PYTORCH` to `1` during installation. + +For example: + +```sh +# from the repository root +export DP_ENABLE_PYTORCH=1 +python -m pip install -v . +```
64-69: Replace deprecated “setup.py install” with pip.Directly invoking setup.py is deprecated and can lead to environment inconsistencies. Prefer pip to handle builds and metadata.
```sh cd deepmd-kit/source/op/pd -python setup.py install +python -m pip install -v .Optional: if build isolation causes issues with compiler flags or local deps, document the fallback:python -m pip install -v --no-build-isolation .
</blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: CodeRabbit UI** **Review profile: CHILL** **Plan: Pro** **💡 Knowledge Base configuration:** - MCP integration is disabled by default for public repositories - Jira integration is disabled by default for public repositories - Linear integration is disabled by default for public repositories You can enable these sources in your CodeRabbit configuration. <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 696941227c0885f3cfc0561a762b6561935a6c7e and f03083049200ec24a343c5d8627b2e13db33e136. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `doc/model/dpa3.md` (3 hunks) </details> <details> <summary>⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (29)</summary> * GitHub Check: Build C library (2.14, >=2.5.0,<2.15, libdeepmd_c_cu11.tar.gz) * GitHub Check: Build C library (2.18, libdeepmd_c.tar.gz) * GitHub Check: Build wheels for cp310-manylinux_aarch64 * GitHub Check: Build wheels for cp311-macosx_x86_64 * GitHub Check: Build wheels for cp311-win_amd64 * GitHub Check: Build wheels for cp311-macosx_arm64 * GitHub Check: Build wheels for cp311-manylinux_x86_64 * GitHub Check: Build wheels for cp311-manylinux_x86_64 * GitHub Check: Build C++ (clang, clang) * GitHub Check: Build C++ (cuda120, cuda) * GitHub Check: Build C++ (rocm, rocm) * GitHub Check: Build C++ (cpu, cpu) * GitHub Check: Build C++ (cuda, cuda) * GitHub Check: Test C++ (false) * GitHub Check: Test Python (3, 3.9) * GitHub Check: Test C++ (true) * GitHub Check: Test Python (3, 3.12) * GitHub Check: Test Python (5, 3.12) * GitHub Check: Test Python (6, 3.12) * GitHub Check: Test Python (6, 3.9) * GitHub Check: Test Python (5, 3.9) * GitHub Check: Test Python (1, 3.12) * GitHub Check: Test Python (4, 3.12) * GitHub Check: Test Python (2, 3.9) * GitHub Check: Test Python (4, 3.9) * GitHub Check: Test Python (2, 3.12) * GitHub Check: Test Python (1, 3.9) * GitHub Check: Analyze (python) * GitHub Check: Analyze (c-cpp) </details> <details> <summary>🔇 Additional comments (1)</summary><blockquote> <details> <summary>doc/model/dpa3.md (1)</summary> `71-74`: **LGTM on MPI/CUDA guidance; mirrors PyTorch tab.** The MPI/CUDA recommendations are clear and consistent with the PyTorch tab. No action required. </details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## devel #4887 +/- ##
==========================================
- Coverage 84.29% 84.29% -0.01%
==========================================
Files 702 702
Lines 68665 68666 +1
Branches 3573 3573
==========================================
Hits 57884 57884
- Misses 9642 9643 +1
Partials 1139 1139 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dc99ba2
…t in dpa3 document (deepmodeling#4887) update paddle installation scripts and custom border op error message <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated installation guides to reference PaddlePaddle 3.1.1 for CUDA 12.6, CUDA 11.8, and CPU; added nightly pre-release install examples. * Refined training docs wording and CINN note; added Paddle backend guidance and explicit OP-install instructions in DPA3 docs. * **Chores** * Improved error messages when custom Paddle operators are unavailable, adding clearer install instructions and links to documentation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: HydrogenSulfate <490868991@qq.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
update paddle installation scripts and custom border op error message
Summary by CodeRabbit
Documentation
Chores