Skip to content

Commit cfd8e85

Browse files
authored
Merge branch 'develop' into bugfix/fix_id_list
2 parents e653596 + 95b3931 commit cfd8e85

File tree

197 files changed

+14958
-6384
lines changed

Some content is hidden

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

197 files changed

+14958
-6384
lines changed

.github/workflows/_accuracy_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
-v "${CACHE_DIR}/ConfigDir:/root/.config" \
144144
-e TZ="Asia/Shanghai" \
145145
--gpus '"device='"${DEVICES}"'"' ${docker_image} /bin/bash -xc '
146-
python -m pip install paddlepaddle-gpu==3.3.0.dev20251112 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
146+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
147147
148148
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
149149

.github/workflows/_base_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ jobs:
143143
-v "${CACHE_DIR}/ConfigDir:/root/.config" \
144144
-e TZ="Asia/Shanghai" \
145145
--gpus '"device='"${DEVICES}"'"' ${docker_image} /bin/bash -xc '
146-
python -m pip install paddlepaddle-gpu==3.3.0.dev20251112 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
146+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
147147
148148
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
149149

.github/workflows/_build_linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
elif [[ "${PADDLEVERSION}" != "" ]];then
156156
python -m pip install paddlepaddle-gpu==${PADDLEVERSION} -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
157157
else
158-
python -m pip install paddlepaddle-gpu==3.3.0.dev20251112 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
158+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
159159
fi
160160
161161
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
@@ -164,7 +164,7 @@ jobs:
164164
python -m pip install -r requirements.txt
165165
python -m pip install wheel
166166
# 编译RDMA
167-
export ENABLE_FD_RDMA=1
167+
export FD_ENABLE_RDMA_COMPILE=1
168168
bash build.sh 1 python false [${COMPILE_ARCH}]
169169
ls ./dist/*.whl
170170
'

.github/workflows/_logprob_test_linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
-v "${CACHE_DIR}/ConfigDir:/root/.config" \
135135
-e TZ="Asia/Shanghai" \
136136
--gpus '"device='"${DEVICES}"'"' ${docker_image} /bin/bash -xc '
137-
python -m pip install paddlepaddle-gpu==3.3.0.dev20251112 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
137+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
138138
139139
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
140140

.github/workflows/_pre_ce_test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ jobs:
8282
FD_ENGINE_QUEUE_PORT=$((8058 + DEVICE_PORT * 100))
8383
FD_METRICS_PORT=$((8078 + DEVICE_PORT * 100))
8484
FD_CACHE_QUEUE_PORT=$((8098 + DEVICE_PORT * 100))
85+
FD_CONTROLLER_PORT=$((8018 + DEVICE_PORT * 100))
8586
FD_ZMQ_RECV_REQUEST_SERVER_PORT=$((8048 + DEVICE_PORT * 100))
8687
FD_ZMQ_SEND_RESPONSE_SERVER_PORT=$((8038 + DEVICE_PORT * 100))
8788
FD_ZMQ_CONTROL_CMD_SERVER_PORTS=$((8028 + DEVICE_PORT * 100))
@@ -92,6 +93,7 @@ jobs:
9293
echo "FD_ENGINE_QUEUE_PORT=${FD_ENGINE_QUEUE_PORT}"
9394
echo "FD_METRICS_PORT=${FD_METRICS_PORT}"
9495
echo "FD_CACHE_QUEUE_PORT=${FD_CACHE_QUEUE_PORT}"
96+
echo "FD_CONTROLLER_PORT=${FD_CONTROLLER_PORT}"
9597
echo "FD_ZMQ_RECV_REQUEST_SERVER_PORT=${FD_ZMQ_RECV_REQUEST_SERVER_PORT}"
9698
echo "FD_ZMQ_SEND_RESPONSE_SERVER_PORT=${FD_ZMQ_SEND_RESPONSE_SERVER_PORT}"
9799
echo "FD_ZMQ_CONTROL_CMD_SERVER_PORTS=${FD_ZMQ_CONTROL_CMD_SERVER_PORTS}"
@@ -143,6 +145,7 @@ jobs:
143145
-e "FD_ENGINE_QUEUE_PORT=${FD_ENGINE_QUEUE_PORT}" \
144146
-e "FD_METRICS_PORT=${FD_METRICS_PORT}" \
145147
-e "FD_CACHE_QUEUE_PORT=${FD_CACHE_QUEUE_PORT}" \
148+
-e "FD_CONTROLLER_PORT=${FD_CONTROLLER_PORT}" \
146149
-e "FLASK_PORT=${FLASK_PORT}" \
147150
-e "FD_ZMQ_RECV_REQUEST_SERVER_PORT=${FD_ZMQ_RECV_REQUEST_SERVER_PORT}" \
148151
-e "FD_ZMQ_SEND_RESPONSE_SERVER_PORT=${FD_ZMQ_SEND_RESPONSE_SERVER_PORT}" \
@@ -151,7 +154,7 @@ jobs:
151154
--gpus "\"device=${DEVICES}\"" ${docker_image} /bin/bash -c '
152155
git config --global --add safe.directory /workspace/FastDeploy
153156
cd FastDeploy
154-
python -m pip install paddlepaddle-gpu==3.3.0.dev20251112 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
157+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
155158
python -m pip install ${fd_wheel_url}
156159
bash scripts/run_pre_ce.sh
157160
'

.github/workflows/_stable_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ jobs:
146146
-v "${CACHE_DIR}/ConfigDir:/root/.config" \
147147
-e TZ="Asia/Shanghai" \
148148
--gpus '"device='"${DEVICES}"'"' ${docker_image} /bin/bash -xc '
149-
python -m pip install paddlepaddle-gpu==3.3.0.dev20251112 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
149+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
150150
151151
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
152152

.github/workflows/_unit_test_coverage.yml

Lines changed: 33 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ jobs:
4343
runs-on: [self-hosted, GPU-h1z1-2Cards]
4444
timeout-minutes: 90
4545
needs: check_cov_skip
46+
if: needs.check_cov_skip.outputs.can-skip != 'true'
4647
outputs:
47-
diff_cov_file_url: ${{ steps.cov_upload.outputs.diff_cov_file_url }}
48+
all_cov_file_url: ${{ steps.cov_upload.outputs.all_cov_file_url }}
4849
unittest_failed_url: ${{ steps.cov_upload.outputs.unittest_failed_url }}
4950
diff_cov_result_json_url: ${{ steps.cov_upload.outputs.diff_cov_result_json_url }}
5051
steps:
@@ -173,7 +174,7 @@ jobs:
173174
git config --global --add safe.directory /workspace/FastDeploy
174175
cd FastDeploy
175176
git diff origin/${BASE_REF}..HEAD --unified=0 > diff.txt
176-
python -m pip install paddlepaddle-gpu==3.3.0.dev20251112 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
177+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
177178
pip config set global.extra-index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
178179
179180
python -m pip install -r scripts/unittest_requirement.txt
@@ -201,7 +202,7 @@ jobs:
201202
if [[ "$IS_PR" == "true" ]]; then
202203
echo "Running diff coverage for PR..."
203204
diff-cover python_coverage_all.xml --diff-file=diff.txt --fail-under=80 --json-report diff_coverage.json || COVERAGE_EXIT_CODE=9
204-
python scripts/generate_diff_coverage_xml.py diff.txt python_coverage_all.xml
205+
# python scripts/generate_diff_coverage_xml.py diff.txt python_coverage_all.xml
205206
else
206207
echo "Running full coverage"
207208
coverage report -m > full_coverage_report.txt
@@ -249,15 +250,15 @@ jobs:
249250
250251
target_path_stripped="${target_path#paddle-github-action/}"
251252
252-
if [[ "$IS_PR" == "true" ]]; then
253-
diff_cov_file="diff_coverage.xml"
254-
if [ -f ${diff_cov_file} ]; then
255-
python ${push_file} ${diff_cov_file} ${target_path}/CoverageData
256-
DIFF_COV_FILE_URL=https://paddle-github-action.bj.bcebos.com/${target_path_stripped}/CoverageData/${diff_cov_file}
257-
echo "diff_cov_file_url=${DIFF_COV_FILE_URL}" >> $GITHUB_OUTPUT
258-
echo "diff_cov_file_url=${DIFF_COV_FILE_URL}" >> $GITHUB_ENV
259-
fi
253+
all_coverage_file="python_coverage_all.xml"
254+
if [ -f ${all_coverage_file} ]; then
255+
python ${push_file} ${all_coverage_file} ${target_path}/CoverageData
256+
ALL_COV_FILE_URL=https://paddle-github-action.bj.bcebos.com/${target_path_stripped}/CoverageData/${all_coverage_file}
257+
echo "all_cov_file_url=${ALL_COV_FILE_URL}" >> $GITHUB_OUTPUT
258+
echo "all_cov_file_url=${ALL_COV_FILE_URL}" >> $GITHUB_ENV
259+
fi
260260
261+
if [[ "$IS_PR" == "true" ]]; then
261262
diff_cov_result_json="diff_coverage.json"
262263
if [ -f ${diff_cov_result_json} ]; then
263264
python ${push_file} ${diff_cov_result_json} ${target_path}/CoverageData
@@ -319,7 +320,7 @@ jobs:
319320
echo "All tests passed"
320321
321322
- name: Verify Code Coverage Threshold (80%)
322-
if: ${{ github.event_name == 'pull_request' && (needs.check_cov_skip.outputs['can-skip'] != 'true') }}
323+
if: ${{ github.event_name == 'pull_request' }}
323324
shell: bash
324325
run: |
325326
cd FastDeploy
@@ -351,28 +352,33 @@ jobs:
351352
runs-on: ubuntu-latest
352353
timeout-minutes: 15
353354
env:
354-
fd_archive_url: ${{ inputs.FASTDEPLOY_ARCHIVE_URL }}
355+
all_cov_file_url: ${{ needs.run_tests_with_coverage.outputs.all_cov_file_url }}
355356
steps:
356-
- name: coverage diff file download
357+
- name: Clone FastDeploy
358+
uses: actions/checkout@v4
359+
with:
360+
fetch-depth: 0
361+
- uses: actions/setup-python@v5
362+
with:
363+
python-version: '3.10'
364+
- name: Download diff coverage file
357365
shell: bash
358-
env:
359-
diff_cov_file_url: ${{ needs.run_tests_with_coverage.outputs.diff_cov_file_url }}
360366
run: |
361-
wget -q --no-proxy ${fd_archive_url}
362-
tar -xf FastDeploy.tar.gz
363-
cd FastDeploy
364-
if [ -z "${diff_cov_file_url}" ]; then
365-
echo "No diff coverage file URL provided."
367+
echo "Downloading all coverage file..."
368+
if ! wget --no-proxy "${all_cov_file_url}" -O python_coverage_all.xml; then
369+
echo "Download failed, skipping upload."
366370
exit 0
367371
fi
368-
wget "${diff_cov_file_url}" -O ./diff_coverage.xml || echo "Download cov file failed, but continuing..."
372+
373+
sed -i 's|<source>/workspace/FastDeploy/fastdeploy</source>|<source>fastdeploy</source>|' python_coverage_all.xml
374+
369375
- name: Upload diff coverage report
370-
if: ${{ needs.run_tests_with_coverage.outputs.diff_cov_file_url != null && needs.run_tests_with_coverage.outputs.diff_cov_file_url != '' }}
371-
uses: codecov/codecov-action@v5
376+
if: always() && hashFiles('python_coverage_all.xml') != ''
377+
uses: codecov/codecov-action@v4
372378
with:
373-
files: ./FastDeploy/diff_coverage.xml
379+
files: ./python_coverage_all.xml
380+
flags: GPU
374381
name: python diff coverage
382+
fail_ci_if_error: false
375383
verbose: true
376384
disable_search: true
377-
commit_parent: false
378-
flags: diff

.github/workflows/ci_hpu.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: CI_HPU
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
- 'release/*'
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.event.pull_request.number }}-hpu-ci
12+
cancel-in-progress: true
13+
14+
jobs:
15+
CI_HPU:
16+
runs-on: [self-hosted, HPU-8Card]
17+
steps:
18+
- name: Print current runner name
19+
run: |
20+
echo "Current runner name: ${{ runner.name }}"
21+
22+
- name: Code Checkout
23+
env:
24+
docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/fastdeploy-hpu:latest
25+
run: |
26+
REPO="https://github.com/${{ github.repository }}.git"
27+
FULL_REPO="${{ github.repository }}"
28+
REPO_NAME="${FULL_REPO##*/}"
29+
BASE_BRANCH="${{ github.base_ref }}"
30+
# Clean the repository directory before starting
31+
docker run --rm --net=host -v $(pwd):/workspace -w /workspace \
32+
-e "REPO_NAME=${REPO_NAME}" \
33+
-e "BASE_BRANCH=${BASE_BRANCH}" \
34+
${docker_image} /bin/bash -c '
35+
if [ -d ${REPO_NAME} ]; then
36+
echo "Directory ${REPO_NAME} exists, removing it..."
37+
rm -rf ${REPO_NAME}
38+
fi
39+
'
40+
git config --global user.name "FastDeployCI"
41+
git config --global user.email "fastdeploy_ci@example.com"
42+
git clone ${REPO} ${REPO_NAME} -b ${BASE_BRANCH}
43+
cd FastDeploy
44+
if [ "${{ github.event_name }}" = "pull_request" ]; then
45+
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr/${{ github.event.pull_request.number }}
46+
git merge pr/${{ github.event.pull_request.number }}
47+
git log -n 3 --oneline
48+
else
49+
git checkout ${{ github.sha }}
50+
git log -n 3 --oneline
51+
fi
52+
53+
- name: Run CI unittest
54+
env:
55+
docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/fastdeploy-hpu:latest
56+
run: |
57+
runner_name="${{ runner.name }}"
58+
last_char="${runner_name: -1}"
59+
60+
if [[ "$last_char" =~ [0-3] ]]; then
61+
hpu_id="$last_char"
62+
else
63+
hpu_id="0"
64+
fi
65+
FD_API_PORT=8388
66+
FD_ENGINE_QUEUE_PORT=8902
67+
FD_METRICS_PORT=8202
68+
69+
PARENT_DIR=$(dirname "$WORKSPACE")
70+
echo "PARENT_DIR:$PARENT_DIR"
71+
docker run --rm --net=host --cap-add=SYS_PTRACE --privileged --shm-size=64G \
72+
-v $(pwd):/workspace -w /workspace \
73+
-v "/ssd1:/ssd1" \
74+
-e "MODEL_PATH=/ssd1" \
75+
-e "http_proxy=$(git config --global --get http.proxy)" \
76+
-e "https_proxy=$(git config --global --get https.proxy)" \
77+
-e "no_proxy=bcebos.com,mirrors.tuna.tsinghua.edu.cn,localhost,127.0.0.1,0.0.0.0,10.0.0.0/8,192.168.1.0/24" \
78+
-e "FD_API_PORT=${FD_API_PORT}" \
79+
-e "FD_ENGINE_QUEUE_PORT=${FD_ENGINE_QUEUE_PORT}" \
80+
-e "FD_METRICS_PORT=${FD_METRICS_PORT}" \
81+
${docker_image} /bin/bash -c "
82+
git config --global --add safe.directory /workspace/FastDeploy
83+
cd FastDeploy
84+
bash scripts/run_ci_hpu.sh
85+
"

.github/workflows/ci_xpu.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ concurrency:
1616

1717
jobs:
1818
CI_XPU:
19+
timeout-minutes: 60
1920
runs-on: [self-hosted, XPU-P800-8Card]
2021
steps:
2122
- name: Print current runner name
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Remove Skip-CI Labels
2+
3+
on:
4+
pull_request_target:
5+
types: [synchronize]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
remove-skip-ci-labels:
12+
name: Remove skip-ci labels on new commits
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Get PR labels
16+
id: get-labels
17+
uses: actions/github-script@v7
18+
with:
19+
github-token: ${{ secrets.GITHUB_TOKEN }}
20+
script: |
21+
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
22+
owner: context.repo.owner,
23+
repo: context.repo.repo,
24+
issue_number: context.issue.number
25+
});
26+
27+
const skipCiLabels = labels
28+
.filter(label => label.name.startsWith('skip-ci:'))
29+
.map(label => label.name);
30+
31+
console.log('Found skip-ci labels:', skipCiLabels);
32+
core.setOutput('skip-ci-labels', JSON.stringify(skipCiLabels));
33+
core.setOutput('has-skip-ci-labels', skipCiLabels.length > 0 ? 'true' : 'false');
34+
35+
- name: Remove skip-ci labels
36+
if: steps.get-labels.outputs.has-skip-ci-labels == 'true'
37+
uses: actions/github-script@v7
38+
with:
39+
github-token: ${{ secrets.GITHUB_TOKEN }}
40+
script: |
41+
const skipCiLabels = JSON.parse('${{ steps.get-labels.outputs.skip-ci-labels }}');
42+
43+
for (const label of skipCiLabels) {
44+
console.log(`Removing label: ${label}`);
45+
await github.rest.issues.removeLabel({
46+
owner: context.repo.owner,
47+
repo: context.repo.repo,
48+
issue_number: context.issue.number,
49+
name: label
50+
});
51+
}
52+
53+
console.log(`Successfully removed ${skipCiLabels.length} skip-ci label(s)`);

0 commit comments

Comments
 (0)