Skip to content

Commit 53c5cbc

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into loss_api_fix
2 parents 5c4c719 + 5387ef2 commit 53c5cbc

File tree

96 files changed

+6956
-823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+6956
-823
lines changed

.github/workflows/Codestyle-Check.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ jobs:
4949
if: steps.check-bypass.outputs.can-skip != 'true'
5050
run: |
5151
pip install pre-commit==2.17.0 cpplint==1.6.0 clang-format==13.0.0
52+
pip install ast-grep-cli==0.39.9 # This version should be consistent with the one in .pre-commit-config.yaml
53+
54+
- name: Run ast-grep unit tests
55+
if: steps.check-bypass.outputs.can-skip != 'true'
56+
run: |
57+
ast-grep test
5258
5359
- name: Check pre-commit
5460
if: steps.check-bypass.outputs.can-skip != 'true'

.github/workflows/_Auto-Parallel.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ jobs:
9696
source ${{ github.workspace }}/../../../proxy
9797
cd PaddleNLP
9898
git pull
99+
git checkout 6ac04028757dfbcc089916997493611f62de81b2
100+
git switch -c 6ac04028757dfbcc089916997493611f62de81b2
99101
git submodule update --init --recursive --force
100102
'
101103

.github/workflows/_Distribute-stable-Formers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
CACHE_DIR: /root/.cache/build
7373
CCACHE_DIR: /root/.ccache/formers
7474
CFS_DIR: /home/data/cfs
75-
paddle_whl: /workspace/dist/paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl
75+
paddle_whl: /workspace/dist/*.whl
7676
formers_docker: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:cuda126-dev-latest
7777
run: |
7878
export CUDA_SO="$(\ls -d /usr/lib64/libcuda* | xargs -I{} echo '-v {}:{}') $(\ls -d /usr/lib64/libnvidia* | xargs -I{} echo '-v {}:{}')"

.github/workflows/_Distribute-stable.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
WITH_TESTING: "ON"
5050
WITH_INFERENCE_API_TEST: "OFF"
5151
COVERALLS_UPLOAD: "ON"
52-
PADDLE_VERSION: 0.0.0
5352
CUDA_VISIBLE_DEVICES: 0,1
5453
GIT_PR_ID: ${{ github.event.pull_request.number }}
5554
GPUBOX_DEMO_INSTALL_DIR: /root/.cache/build
@@ -89,7 +88,6 @@ jobs:
8988
-e WITH_TESTING \
9089
-e COVERALLS_UPLOAD \
9190
-e GIT_PR_ID \
92-
-e PADDLE_VERSION \
9391
-e WITH_DISTRIBUTE \
9492
-e PY_VERSION \
9593
-e WITH_TENSORRT \
@@ -190,7 +188,7 @@ jobs:
190188
env:
191189
home_path: ${{ github.workspace }}/..
192190
bos_file: ${{ github.workspace }}/../bos_retry/BosClient.py
193-
paddle_whl: paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl
191+
paddle_whl: "*.whl"
194192
run: |
195193
docker exec -t ${{ env.container_name }} /bin/bash -c '
196194
set -x

.github/workflows/_Windows-GPU.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
runs-on:
3636
group: win-gpu
3737
env:
38+
PADDLE_VERSION: 0.0.0
3839
NIGHTLY_MODE: "OFF"
3940
WITH_UNITY_BUILD: "ON"
4041
WITH_TPCACHE: "ON"

.github/workflows/_Windows-Inference.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
runs-on:
3636
group: win-infer
3737
env:
38+
PADDLE_VERSION: 0.0.0
3839
NIGHTLY_MODE: "OFF"
3940
WITH_UNITY_BUILD: "ON"
4041
WITH_TPCACHE: "ON"

.github/workflows/_Windows-OPENBLAS.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
runs-on:
3737
group: win-openblas
3838
env:
39+
PADDLE_VERSION: 0.0.0
3940
NIGHTLY_MODE: "OFF"
4041
WITH_UNITY_BUILD: "ON"
4142
WITH_CACHE: "OFF"

.pre-commit-config.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ repos:
3737
(?x)^(
3838
test/dygraph_to_static/test_error.py
3939
)$
40+
- repo: https://github.com/PFCCLab/ast-grep-pre-commit-mirror
41+
rev: v0.39.9
42+
hooks:
43+
- id: ast-grep
4044
- repo: local
4145
hooks:
4246
- id: copyright_checker
@@ -56,7 +60,7 @@ repos:
5660
args: [--force-exclude]
5761
# For Python files
5862
- repo: https://github.com/astral-sh/ruff-pre-commit
59-
rev: v0.13.0
63+
rev: v0.14.4
6064
hooks:
6165
- id: ruff-check
6266
args: [--fix, --exit-non-zero-on-fix, --no-cache]
@@ -158,7 +162,10 @@ repos:
158162
(?x)^(
159163
\.github/.+\.(yaml|yml)|
160164
\.pre-commit-config\.yaml|
161-
\.yamlfmt
165+
\.yamlfmt|
166+
sgconfig\.yml|
167+
ci/rules/.+\.yml|
168+
ci/rule-tests/.+\.yml
162169
)
163170
# Others
164171
- repo: local

ci/check_approval.sh

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -330,19 +330,6 @@ if [ "${EMPTY_GRAD_OP_REGISTERED}" != "" ] && [ "${GIT_PT_ID}" != "" ]; then
330330
check_approval 1 phlrain XiaoguangHu01 kolinwei JiabinYang
331331
fi
332332

333-
INVALID_UNITTEST_ASSERT_CHECK=`echo "$ALL_ADDED_LINES" | grep -zoE '\+\s+((assert\s+)|(self\.assert(True|Equal)\())(\s*\+\s*)?(np|numpy)\.(allclose|array_equal)[^+]*' || true`
334-
if [ "${INVALID_UNITTEST_ASSERT_CHECK}" != "" ] && [ "${PR_ID}" != "" ]; then
335-
echo_line="It is recommended to use 'np.testing.assert_allclose' and 'np.testing.assert_array_equal' instead of 'self.assertTrue(np.allclose(...))' and 'self.assertTrue(np.array_equal(...))'.\nPlease modify the code below. If anything is unclear, please read the specification [ https://github.com/PaddlePaddle/community/blob/master/rfcs/CodeStyle/20220805_code_style_improvement_for_unittest.md#background ]. If it is a mismatch, please request SigureMo (Recommend) or zrr1999 review and approve.\nThe code that do not meet the specification are as follows:\n${INVALID_UNITTEST_ASSERT_CHECK}\n"
336-
check_approval 1 SigureMo zrr1999
337-
fi
338-
339-
TEST_FILE_ADDED_LINES=$(git diff -U0 upstream/$BRANCH -- test |grep "^+")
340-
ENABLE_TO_STATIC_CHECK=`echo "$TEST_FILE_ADDED_LINES" | grep "enable_to_static(" || true`
341-
if [ "${ENABLE_TO_STATIC_CHECK}" != "" ] && [ "${PR_ID}" != "" ]; then
342-
echo_line="You must have one RD (SigureMo, DrRyanHuang, zrr1999 or gouzil) approval for using 'paddle.jit.enable_to_static', we recommend using 'enable_to_static_guard' in the related test files.\n"
343-
check_approval 1 SigureMo DrRyanHuang zrr1999 gouzil
344-
fi
345-
346333
HAS_MODIFIED_DY2ST_TEST_FILES=$(git diff --name-only --diff-filter=ACMR upstream/$BRANCH | grep "test/dygraph_to_static/test_" || true)
347334
if [ "${HAS_MODIFIED_DY2ST_TEST_FILES}" != "" ] && [ "${PR_ID}" != "" ]; then
348335
error_lines=`python ${PADDLE_ROOT}/test/dygraph_to_static/check_approval.py ${HAS_MODIFIED_DY2ST_TEST_FILES}`

ci/distribute_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
148148
pip install onnx==1.17.0
149149
pip install -r "${work_dir}/python/requirements.txt"
150150
pip install -r "${work_dir}/python/unittest_py/requirements.txt"
151-
pip install --force-reinstall ${work_dir}/dist/paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl --no-deps
151+
pip install --force-reinstall ${work_dir}/dist/*.whl --no-deps
152152
echo "::endgroup::"
153153
ldconfig
154154

0 commit comments

Comments
 (0)