Skip to content

Commit a8d2a8d

Browse files
doc(pd): update PaddlePaddle version to 3.3.0 and 3.4.0(develop) (#5306)
fix issue introduced by this pr: #5157 This pull request updates the PaddlePaddle dependency versions across the codebase to ensure compatibility with the latest releases. It also improves the installation instructions in the documentation to reflect these updates and to recommend best practices for installing nightly builds. Dependency version updates: * Updated the `paddlepaddle-gpu` dependency in the CUDA test workflow to version `3.4.0.dev20260310` (`.github/workflows/test_cuda.yml`). * Updated the `paddlepaddle` dependency in the Python test workflow to version `3.4.0.dev20260310` (`.github/workflows/test_python.yml`). Documentation improvements: * Updated installation instructions in `doc/install/easy-install.md` and `doc/install/install-from-source.md` to reference `paddlepaddle-gpu==3.3.0` and `paddlepaddle==3.3.0` as the latest stable release versions [[1]](diffhunk://#diff-8072dac581dd568fe718ff7204aae121465797d5d2890c4bc4d3ee8d978951e7L172-R174) [[2]](diffhunk://#diff-8072dac581dd568fe718ff7204aae121465797d5d2890c4bc4d3ee8d978951e7L183-R185) [[3]](diffhunk://#diff-865b1d35cff7d06cf73ebb95b0f2d93c5cc77b19c64305753008c90dfe9370c8L100-R108). * Modified nightly build installation commands in the documentation to recommend using the `-U` (upgrade) flag for both GPU and CPU versions, ensuring users get the latest nightly build [[1]](diffhunk://#diff-8072dac581dd568fe718ff7204aae121465797d5d2890c4bc4d3ee8d978951e7L172-R174) [[2]](diffhunk://#diff-8072dac581dd568fe718ff7204aae121465797d5d2890c4bc4d3ee8d978951e7L183-R185) [[3]](diffhunk://#diff-865b1d35cff7d06cf73ebb95b0f2d93c5cc77b19c64305753008c90dfe9370c8L100-R108). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Training now supports the AdamW optimizer alongside Adam. * **Documentation** * Updated installation guides with newer PaddlePaddle stable and nightly package versions and improved nightly/pre-release pip syntax. * **Chores** * Bumped PaddlePaddle dependency versions used in CI workflows (Python and CUDA test pipelines). <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 53cd6d3 commit a8d2a8d

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

.github/workflows/test_cuda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
- run: |
4848
export PYTORCH_ROOT=$(python -c 'import torch;print(torch.__path__[0])')
4949
export TENSORFLOW_ROOT=$(python -c 'import importlib.util,pathlib;print(pathlib.Path(importlib.util.find_spec("tensorflow").origin).parent)')
50-
pip install --find-links "https://www.paddlepaddle.org.cn/packages/nightly/cu126/paddlepaddle-gpu/" --index-url https://pypi.org/simple --trusted-host www.paddlepaddle.org.cn --trusted-host paddlepaddle.org.cn "paddlepaddle-gpu==3.3.0.dev20251204"
50+
pip install --find-links "https://www.paddlepaddle.org.cn/packages/nightly/cu126/paddlepaddle-gpu/" --index-url https://pypi.org/simple --trusted-host www.paddlepaddle.org.cn --trusted-host paddlepaddle.org.cn "paddlepaddle-gpu==3.4.0.dev20260310"
5151
source/install/uv_with_retry.sh pip install --system -v -e .[gpu,test,lmp,cu12,torch,jax] mpi4py --reinstall-package deepmd-kit
5252
# See https://github.com/jax-ml/jax/issues/29042
5353
source/install/uv_with_retry.sh pip install --system -U 'nvidia-cublas-cu12>=12.9.0.13'

.github/workflows/test_python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
export TENSORFLOW_ROOT=$(python -c 'import importlib.util,pathlib;print(pathlib.Path(importlib.util.find_spec("tensorflow").origin).parent)')
3333
export PYTORCH_ROOT=$(python -c 'import torch;print(torch.__path__[0])')
3434
source/install/uv_with_retry.sh pip install --system -e .[test,jax] mpi4py --group pin_jax
35-
source/install/uv_with_retry.sh pip install --system --find-links "https://www.paddlepaddle.org.cn/packages/nightly/cpu/paddlepaddle/" --index-url https://pypi.org/simple --trusted-host www.paddlepaddle.org.cn --trusted-host paddlepaddle.org.cn paddlepaddle==3.3.0.dev20251204
35+
source/install/uv_with_retry.sh pip install --system --find-links "https://www.paddlepaddle.org.cn/packages/nightly/cpu/paddlepaddle/" --index-url https://pypi.org/simple --trusted-host www.paddlepaddle.org.cn --trusted-host paddlepaddle.org.cn paddlepaddle==3.4.0.dev20260310
3636
env:
3737
# Please note that uv has some issues with finding
3838
# existing TensorFlow package. Currently, it uses

deepmd/pd/train/training.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def get_opt_param(params: dict[str, Any]) -> tuple[str, dict[str, Any]]:
165165
before this function is called.
166166
"""
167167
opt_type = params.get("type", "Adam")
168-
if opt_type != "Adam":
168+
if opt_type not in ["Adam", "AdamW"]:
169169
raise ValueError(f"Not supported optimizer type '{opt_type}'")
170170
opt_param = dict(params)
171171
opt_param.pop("type", None)
@@ -647,7 +647,7 @@ def single_model_finetune(
647647
# author: iProzd
648648
# TODO add optimizers for multitask
649649
# author: iProzd
650-
if self.opt_type == "Adam":
650+
if self.opt_type in ["Adam", "AdamW"]:
651651
self.scheduler = paddle.optimizer.lr.LambdaDecay(
652652
learning_rate=self.lr_schedule.start_lr,
653653
lr_lambda=lambda step: (
@@ -800,7 +800,7 @@ def step(_step_id: int, task_key: str = "Default") -> None:
800800
print_str = f"Step {_step_id}: sample system{log_dict['sid']} frame{log_dict['fid']}\n"
801801
fout1.write(print_str)
802802
fout1.flush()
803-
if self.opt_type == "Adam":
803+
if self.opt_type in ["Adam", "AdamW"]:
804804
cur_lr = self.scheduler.get_lr()
805805
pref_lr = cur_lr
806806

doc/install/easy-install.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ Switch to the TensorFlow {{ tensorflow_icon }} tab for more information.
169169

170170
```bash
171171
# release version
172-
pip install paddlepaddle-gpu==3.1.1 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
172+
pip install paddlepaddle-gpu==3.3.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
173173
# nightly-build version
174-
# pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
174+
# pip install --pre -U paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
175175
pip install deepmd-kit
176176
```
177177
:::
@@ -180,9 +180,9 @@ pip install deepmd-kit
180180

181181
```bash
182182
# release version
183-
pip install paddlepaddle==3.1.1 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
183+
pip install paddlepaddle==3.3.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
184184
# nightly-build version
185-
# pip install --pre paddlepaddle -i https://www.paddlepaddle.org.cn/packages/nightly/cpu/
185+
# pip install --pre -U paddlepaddle -i https://www.paddlepaddle.org.cn/packages/nightly/cpu/
186186
pip install deepmd-kit
187187
```
188188
:::

doc/install/install-from-source.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ To install Paddle, run
9797
```sh
9898
# cu126
9999
# release version
100-
pip install paddlepaddle-gpu==3.1.1 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
100+
pip install paddlepaddle-gpu==3.3.0 -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
101101
# nightly-build version
102-
# pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
102+
# pip install --pre -U paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
103103

104104
# cpu
105105
# release version
106-
pip install paddlepaddle==3.1.1 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
106+
pip install paddlepaddle==3.3.0 -i https://www.paddlepaddle.org.cn/packages/stable/cpu/
107107
# nightly-build version
108-
# pip install --pre paddlepaddle -i https://www.paddlepaddle.org.cn/packages/nightly/cpu/
108+
# pip install --pre -U paddlepaddle -i https://www.paddlepaddle.org.cn/packages/nightly/cpu/
109109
```
110110
:::
111111

0 commit comments

Comments
 (0)