Skip to content

Conversation

@HydrogenSulfate
Copy link
Collaborator

@HydrogenSulfate HydrogenSulfate commented Aug 14, 2025

update paddle installation scripts and custom border op error message

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.

Copilot AI review requested due to automatic review settings August 14, 2025 08:43
@HydrogenSulfate HydrogenSulfate changed the title pd: update paddle installation scripts and custom border op error message doc(pd): update paddle installation scripts and custom border op error message Aug 14, 2025
Copy link
Contributor

Copilot AI left a 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.

HydrogenSulfate and others added 2 commits August 14, 2025 16:47
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>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 14, 2025

Note

Other AI code review bot(s) detected

CodeRabbit 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.

📝 Walkthrough

Walkthrough

Updated the Paddle border_op NotImplementedError messages in two descriptor modules; refreshed Paddle installation instructions (bumped to 3.1.1 and added nightly examples); adjusted training doc wording; and added Paddle backend content and OP install steps in the DPA3 model doc. No functional or API changes.

Changes

Cohort / File(s) Summary of Changes
Paddle border_op error messages
deepmd/pd/model/descriptor/repflows.py, deepmd/pd/model/descriptor/repformers.py
Replaced terse NotImplementedError text with a multi-line message that names the border_op operator, provides an install command (python source/op/pd/setup.py install), and references the DPA3 documentation. No behavioral, signature, or control-flow changes.
Docs: Installation
doc/install/easy-install.md, doc/install/install-from-source.md
Updated PaddlePaddle references from 3.0.0 to 3.1.1 for CUDA 12.6, CUDA 11.8, and CPU; added commented examples for nightly/pre-release installs (using --pre and nightly indices).
Docs: Training guide
doc/train/training.md
Removed explicit “eager mode” wording from the Paddle example heading and reworded the CINN section to pluralize “models” and add an approximate speedup note (~40%+).
Docs: DPA3 model guide
doc/model/dpa3.md
Added Paddle as a supported backend in headers/tabs; reorganized requirements into PyTorch/Paddle tabs; added Paddle-specific OP install instructions (cd deepmd-kit/source/op/pd && python setup.py install) and corresponding notes matching existing MPI/CUDA guidance.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • njzjz
  • wanghan-iapcm

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
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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.

📥 Commits

Reviewing files that changed from the base of the PR and between accc331 and ecd51f6.

📒 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 OK

Stable 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

@njzjz njzjz closed this Aug 15, 2025
@njzjz njzjz reopened this Aug 15, 2025
@njzjz njzjz enabled auto-merge August 15, 2025 04:59
auto-merge was automatically disabled August 15, 2025 10:30

Head branch was pushed to by a user without write access

@HydrogenSulfate HydrogenSulfate changed the title doc(pd): update paddle installation scripts and custom border op error message doc(pd): update paddle installation scripts and paddle related content in dpa3 document Aug 15, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 -->

@njzjz njzjz closed this Aug 15, 2025
@njzjz njzjz reopened this Aug 15, 2025
@codecov
Copy link

codecov bot commented Aug 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.29%. Comparing base (e73bbff) to head (f030830).
⚠️ Report is 69 commits behind head on devel.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@njzjz njzjz added this pull request to the merge queue Aug 15, 2025
Merged via the queue into deepmodeling:devel with commit dc99ba2 Aug 15, 2025
104 of 106 checks passed
ChiahsinChu pushed a commit to ChiahsinChu/deepmd-kit that referenced this pull request Dec 17, 2025
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants