Skip to content

Commit bd5d7a6

Browse files
authored
Merge branch 'develop' into mm_structred_output
2 parents d8810d1 + 0e4df5a commit bd5d7a6

File tree

192 files changed

+11721
-760
lines changed

Some content is hidden

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

192 files changed

+11721
-760
lines changed

.github/workflows/_accuracy_test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
FULL_REPO="${{ github.repository }}"
4545
REPO_NAME="${FULL_REPO##*/}"
4646
BASE_BRANCH="${{ github.base_ref }}"
47-
47+
docker pull ${docker_image}
4848
# Clean the repository directory before starting
4949
docker run --rm --net=host -v $(pwd):/workspace -w /workspace \
5050
-e "REPO_NAME=${REPO_NAME}" \
@@ -140,8 +140,7 @@ jobs:
140140
-v "${CACHE_DIR}/ConfigDir:/root/.config" \
141141
-e TZ="Asia/Shanghai" \
142142
--gpus '"device='"${DEVICES}"'"' ${docker_image} /bin/bash -xc '
143-
#python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
144-
python -m pip install paddlepaddle-gpu==3.0.0.dev20250818 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
143+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
145144
146145
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
147146

.github/workflows/_base_test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
FULL_REPO="${{ github.repository }}"
4545
REPO_NAME="${FULL_REPO##*/}"
4646
BASE_BRANCH="${{ github.base_ref }}"
47-
47+
docker pull ${docker_image}
4848
# Clean the repository directory before starting
4949
docker run --rm --net=host -v $(pwd):/workspace -w /workspace \
5050
-e "REPO_NAME=${REPO_NAME}" \
@@ -140,8 +140,7 @@ jobs:
140140
-v "${CACHE_DIR}/ConfigDir:/root/.config" \
141141
-e TZ="Asia/Shanghai" \
142142
--gpus '"device='"${DEVICES}"'"' ${docker_image} /bin/bash -xc '
143-
#python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
144-
python -m pip install paddlepaddle-gpu==3.0.0.dev20250818 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
143+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
145144
146145
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
147146

.github/workflows/_build_linux.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ jobs:
148148
elif [[ "${PADDLEVERSION}" != "" ]];then
149149
python -m pip install paddlepaddle-gpu==${PADDLEVERSION} -i https://www.paddlepaddle.org.cn/packages/stable/cu126/
150150
else
151-
#python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
152-
python -m pip install paddlepaddle-gpu==3.0.0.dev20250818 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
151+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
153152
fi
154153
155154
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Docker Build
2+
description: "FastDeploy CI Image Build"
3+
4+
on:
5+
workflow_call:
6+
inputs:
7+
CI_DOCKER_IMAGE_NAME:
8+
description: "Build Images"
9+
required: true
10+
type: string
11+
default: "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleqa:cuda126-py310"
12+
FASTDEPLOY_ARCHIVE_URL:
13+
description: "URL of the compressed FastDeploy code archive."
14+
required: true
15+
type: string
16+
DOCKER_IMAGE_NAME:
17+
description: "Build Images"
18+
required: false
19+
type: string
20+
default: "ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddleqa:fastdeploy-ciuse-cuda126-dailyupdate"
21+
outputs:
22+
docker_name_precheck:
23+
description: "Output path of the generated wheel"
24+
value: ${{ jobs.docker_build.outputs.docker_name_precheck }}
25+
26+
jobs:
27+
docker_build:
28+
runs-on: [self-hosted, Docker-Build]
29+
outputs:
30+
docker_name_precheck: ${{ steps.docker_build.outputs.docker_name_precheck }}
31+
steps:
32+
- name: Code Prepare
33+
id: docker_build
34+
shell: bash
35+
env:
36+
docker_image_name: ${{ inputs.CI_DOCKER_IMAGE_NAME }}
37+
docker_image: ${{ inputs.DOCKER_IMAGE_NAME }}
38+
fd_archive_url: ${{ inputs.FASTDEPLOY_ARCHIVE_URL }}
39+
run: |
40+
set -x
41+
REPO="https://github.com/${{ github.repository }}.git"
42+
FULL_REPO="${{ github.repository }}"
43+
REPO_NAME="${FULL_REPO##*/}"
44+
BASE_BRANCH="${{ github.base_ref }}"
45+
46+
# Clean the repository directory before starting
47+
docker run --rm --net=host -v $(pwd):/workspace -w /workspace \
48+
-e "REPO_NAME=${REPO_NAME}" \
49+
${docker_image} /bin/bash -c '
50+
if [ -d ${REPO_NAME} ]; then
51+
echo "Directory ${REPO_NAME} exists, removing it..."
52+
rm -rf ${REPO_NAME}*
53+
fi
54+
'
55+
56+
wget -q ${fd_archive_url}
57+
tar -xf FastDeploy.tar.gz
58+
rm -rf FastDeploy.tar.gz
59+
cd FastDeploy
60+
git config --global user.name "FastDeployCI"
61+
git config --global user.email "[email protected]"
62+
git log -n 3 --oneline
63+
64+
# Docker Build
65+
cd tools/dockerfile/
66+
set -e
67+
cp ../../requirements.txt ./
68+
cp ../../scripts/unittest_requirement.txt ./
69+
docker build -t ${docker_image_name} -f Dockerfile.ci . \
70+
--network host \
71+
--no-cache
72+
docker push ${docker_image_name}
73+
echo "docker_name_precheck=${docker_image_name}" >> $GITHUB_OUTPUT

.github/workflows/_logprob_test_linux.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
docker_image: ${{ inputs.DOCKER_IMAGE }}
4040
paddletest_archive_url: ${{ inputs.PADDLETEST_ARCHIVE_URL }}
4141
run: |
42+
docker pull ${docker_image}
4243
# Clean the repository directory before starting
4344
docker run --rm --net=host -v $(pwd):/workspace -w /workspace \
4445
-e "REPO_NAME=${REPO_NAME}" \
@@ -114,7 +115,6 @@ jobs:
114115
echo "Removing stale container: ${runner_name}"
115116
docker rm -f ${runner_name} || true
116117
fi
117-
118118
docker run --rm --ipc=host --pid=host --net=host \
119119
--name ${runner_name} \
120120
-v $(pwd):/workspace \
@@ -130,8 +130,7 @@ jobs:
130130
-v "${CACHE_DIR}/ConfigDir:/root/.config" \
131131
-e TZ="Asia/Shanghai" \
132132
--gpus '"device='"${DEVICES}"'"' ${docker_image} /bin/bash -xc '
133-
#python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
134-
python -m pip install paddlepaddle-gpu==3.0.0.dev20250818 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
133+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
135134
136135
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
137136

.github/workflows/_pre_ce_test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
FULL_REPO="${{ github.repository }}"
4747
REPO_NAME="${FULL_REPO##*/}"
4848
BASE_BRANCH="${{ github.base_ref }}"
49-
49+
docker pull ${docker_image}
5050
# Clean the repository directory before starting
5151
docker run --rm --net=host -v $(pwd):/workspace -w /workspace \
5252
-e "REPO_NAME=${REPO_NAME}" \
@@ -139,8 +139,7 @@ jobs:
139139
--gpus "\"device=${DEVICES}\"" ${docker_image} /bin/bash -c '
140140
git config --global --add safe.directory /workspace/FastDeploy
141141
cd FastDeploy
142-
#python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
143-
python -m pip install paddlepaddle-gpu==3.0.0.dev20250818 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
142+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
144143
python -m pip install ${fd_wheel_url}
145144
bash scripts/run_pre_ce.sh
146145
'

.github/workflows/_stable_test.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
FULL_REPO="${{ github.repository }}"
4545
REPO_NAME="${FULL_REPO##*/}"
4646
BASE_BRANCH="${{ github.base_ref }}"
47-
47+
docker pull ${docker_image}
4848
# Clean the repository directory before starting
4949
docker run --rm --net=host -v $(pwd):/workspace -w /workspace \
5050
-e "REPO_NAME=${REPO_NAME}" \
@@ -146,8 +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 --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
150-
python -m pip install paddlepaddle-gpu==3.0.0.dev20250818 -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/
151150
152151
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
153152

.github/workflows/_unit_test_coverage.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
FULL_REPO="${{ github.repository }}"
6161
REPO_NAME="${FULL_REPO##*/}"
6262
BASE_BRANCH="${{ github.base_ref }}"
63-
63+
docker pull ${docker_image}
6464
# Clean the repository directory before starting
6565
docker run --rm --net=host -v $(pwd):/workspace -w /workspace \
6666
-e "REPO_NAME=${REPO_NAME}" \
@@ -164,16 +164,19 @@ jobs:
164164
165165
git config --global --add safe.directory /workspace/FastDeploy
166166
cd FastDeploy
167-
#python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
168-
python -m pip install paddlepaddle-gpu==3.0.0.dev20250818 -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
169-
167+
git diff origin/${BASE_REF}..HEAD --unified=0 > diff.txt
168+
python -m pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu126/
170169
pip config set global.extra-index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
171170
172171
python -m pip install coverage
173172
python -m pip install diff-cover
174173
python -m pip install pytest-cov
175174
python -m pip install jsonschema aistudio_sdk==0.3.5
176175
python -m pip install ${fd_wheel_url}
176+
rm -rf fastdeploy
177+
# coverage subprocess use
178+
python -m pip install ${fd_wheel_url} --no-deps --target=/workspace/FastDeploy
179+
export PYTHONPATH=/workspace/FastDeploy/
177180
if [ -d "tests/plugins" ]; then
178181
cd tests/plugins
179182
python setup.py install
@@ -183,12 +186,11 @@ jobs:
183186
fi
184187
export COVERAGE_FILE=/workspace/FastDeploy/coveragedata/.coverage
185188
export COVERAGE_RCFILE=/workspace/FastDeploy/scripts/.coveragerc
186-
export COVERAGE_PROCESS_START=/workspace/FastDeploy/scripts/.coveragerc
187189
TEST_EXIT_CODE=0
188190
bash scripts/coverage_run.sh || TEST_EXIT_CODE=8
189-
git diff origin/${BASE_REF}..HEAD --unified=0 > diff.txt
190191
echo "TEST_EXIT_CODE=${TEST_EXIT_CODE}" >> exit_code.env
191192
coverage combine coveragedata/ || echo "No data to combine"
193+
coverage report
192194
coverage xml -o python_coverage_all.xml
193195
COVERAGE_EXIT_CODE=0
194196
if [[ "$IS_PR" == "true" ]]; then
@@ -229,7 +231,7 @@ jobs:
229231
echo "diff_cov_result_json_url=${DIFF_COV_JSON_URL}" >> $GITHUB_OUTPUT
230232
echo "diff_cov_result_json_url=${DIFF_COV_JSON_URL}" >> $GITHUB_ENV
231233
fi
232-
unittest_result="tests/failed_tests.log"
234+
unittest_result="failed_tests.log"
233235
if [ -s ${unittest_result} ];then
234236
python ${push_file} ${unittest_result} ${target_path}/UnitTestResult
235237
target_path_stripped="${target_path#paddle-github-action/}"

0 commit comments

Comments
 (0)