Skip to content

Commit 057b3a5

Browse files
authored
Merge branch 'develop' into fix_vl_namemapping
2 parents 7e92f13 + 17c5d3a commit 057b3a5

File tree

431 files changed

+16496
-13607
lines changed

Some content is hidden

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

431 files changed

+16496
-13607
lines changed

.flake8

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[flake8]
2+
ignore = E203, E402, E501, E731, E741, W503, W605, E722
3+
max-line-length = 119
4+
5+
# E402: module level import not at top of file
6+
per-file-ignores =
7+
__init__.py:F401,F403,E402

.github/workflows/ci.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22

33
on:
44
pull_request:
5-
branches:
5+
branches:
66
- develop
77
- 'release/*'
88
workflow_dispatch:
@@ -60,10 +60,12 @@ jobs:
6060
runner_name="${{ runner.name }}"
6161
last_char="${runner_name: -1}"
6262
63-
if [[ "$last_char" =~ [0-3] ]]; then
64-
gpu_id="$last_char"
63+
if [ "${last_char}" = "1" ]; then
64+
gpu_id=2
65+
DEVICES="2,3"
6566
else
66-
gpu_id="0"
67+
gpu_id=0
68+
DEVICES="0,1"
6769
fi
6870
FD_API_PORT=$((9180 + gpu_id * 100))
6971
FD_ENGINE_QUEUE_PORT=$((9150 + gpu_id * 100))
@@ -80,8 +82,8 @@ jobs:
8082
-e "FD_API_PORT=${FD_API_PORT}" \
8183
-e "FD_ENGINE_QUEUE_PORT=${FD_ENGINE_QUEUE_PORT}" \
8284
-e "FD_METRICS_PORT=${FD_METRICS_PORT}" \
83-
--gpus device=${gpu_id} ${docker_image} /bin/bash -c "
85+
--gpus '"device='"${DEVICES}"'"' ${docker_image} /bin/bash -c "
8486
git config --global --add safe.directory /workspace/FastDeploy
8587
cd FastDeploy
8688
bash scripts/run_ci.sh
87-
"
89+
"

.github/workflows/ci_iluvatar.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI_ILUVATAR
2+
3+
on:
4+
pull_request:
5+
branches: [ develop ]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ${{ github.event.pull_request.number }}-iluvatar-ci
10+
cancel-in-progress: true
11+
12+
jobs:
13+
CI_ILUVATAR:
14+
runs-on: [self-hosted, IXUCA]
15+
steps:
16+
- name: Print current runner name
17+
run: |
18+
echo "Current runner name: ${{ runner.name }}"
19+
# Because the system version is lower than 2.23, the checkout cannot be used.
20+
# - name: Checkout code
21+
# uses: actions/checkout@v4
22+
23+
- name: Code Checkout
24+
env:
25+
docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/device/paddle-ixuca:latest
26+
run: |
27+
REPO="https://github.com/${{ github.repository }}.git"
28+
FULL_REPO="${{ github.repository }}"
29+
REPO_NAME="${FULL_REPO##*/}"
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+
${docker_image} /bin/bash -c '
34+
if [ -d ${REPO_NAME} ]; then
35+
echo "Directory ${REPO_NAME} exists, removing it..."
36+
rm -rf ${REPO_NAME}
37+
fi
38+
'
39+
git config --global user.name "FastDeployCI"
40+
git config --global user.email "fastdeploy_ci@example.com"
41+
git clone ${REPO} ${REPO_NAME}
42+
cd FastDeploy
43+
if [ "${{ github.event_name }}" = "pull_request" ]; then
44+
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr/${{ github.event.pull_request.number }}
45+
git merge pr/${{ github.event.pull_request.number }}
46+
git log -n 3 --oneline
47+
else
48+
git checkout ${{ github.sha }}
49+
git log -n 3 --oneline
50+
fi
51+
52+
- name: Run CI unittest
53+
env:
54+
docker_image: ccr-2vdh3abv-pub.cnc.bj.baidubce.com/device/paddle-ixuca:latest
55+
run: |
56+
runner_name="${{ runner.name }}"
57+
last_char="${runner_name: -1}"
58+
59+
if [[ "$last_char" =~ [0-3] ]]; then
60+
gpu_id="$last_char"
61+
else
62+
gpu_id="0"
63+
fi
64+
FD_API_PORT=$((9180 + gpu_id * 100))
65+
FD_ENGINE_QUEUE_PORT=$((9150 + gpu_id * 100))
66+
FD_METRICS_PORT=$((9170 + gpu_id * 100))
67+
68+
PARENT_DIR=$(dirname "$WORKSPACE")
69+
echo "PARENT_DIR:$PARENT_DIR"
70+
docker run --rm --net=host --pid=host --cap-add=ALL --privileged --shm-size=64G \
71+
-v /usr/src:/usr/src -v /lib/modules:/lib/modules -v /dev:/dev \
72+
-v $(pwd):/workspace -w /workspace \
73+
-v "/data1/fastdeploy:/data1/fastdeploy" \
74+
-e "MODEL_PATH=/ssd3/model" \
75+
-e "http_proxy=$(git config --global --get http.proxy)" \
76+
-e "https_proxy=$(git config --global --get https.proxy)" \
77+
-e "FD_API_PORT=${FD_API_PORT}" \
78+
-e "FD_ENGINE_QUEUE_PORT=${FD_ENGINE_QUEUE_PORT}" \
79+
-e "FD_METRICS_PORT=${FD_METRICS_PORT}" \
80+
${docker_image} /bin/bash -c "
81+
git config --global --add safe.directory /workspace/FastDeploy
82+
cd FastDeploy
83+
bash scripts/run_ci_iluvatar.sh
84+
"

.github/workflows/ci_xpu.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI_XPU
22

33
on:
44
pull_request:
5-
branches:
5+
branches:
66
- develop
77
- 'release/*'
88
workflow_dispatch:
@@ -63,7 +63,7 @@ jobs:
6363
if [[ "$last_char" =~ [0-3] ]]; then
6464
gpu_id="$last_char"
6565
else
66-
gpu_id="0"
66+
gpu_id="0"
6767
fi
6868
FD_API_PORT=$((9180 + gpu_id * 100))
6969
FD_ENGINE_QUEUE_PORT=$((9150 + gpu_id * 100))
@@ -84,4 +84,4 @@ jobs:
8484
git config --global --add safe.directory /workspace/FastDeploy
8585
cd FastDeploy
8686
bash scripts/run_ci_xpu.sh
87-
"
87+
"

.pre-commit-config.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,41 @@ default_stages:
55
- pre-commit # Run locally
66
# - manual # Run in CI
77
repos:
8+
- repo: https://github.com/psf/black.git
9+
rev: 22.8.0
10+
hooks:
11+
- id: black
12+
files: \.(py|pyi)$
13+
additional_dependencies: [toml]
14+
# 自动排序
15+
- repo: https://github.com/PyCQA/isort
16+
rev: 5.11.5
17+
hooks:
18+
- id: isort
19+
- repo: https://github.com/PyCQA/flake8
20+
rev: 4.0.1
21+
hooks:
22+
- id: flake8
823
# 代码检查
924
- repo: https://github.com/astral-sh/ruff-pre-commit
1025
rev: v0.11.7
1126
hooks:
1227
- id: ruff
13-
args: [--output-format, github, --fix, --line-length=120]
28+
args: [--output-format, github, --fix, --line-length=120, --config, pyproject.toml]
1429
# # 拼写检查
1530
# - repo: https://github.com/codespell-project/codespell
1631
# rev: v2.4.1
1732
# hooks:
1833
# - id: codespell
1934
# additional_dependencies: ['tomli']
2035
# args: ['--toml', 'pyproject.toml']
21-
# 自动排序
22-
- repo: https://github.com/PyCQA/isort
23-
rev: 6.0.1
24-
hooks:
25-
- id: isort
36+
2637
# markdown
2738
- repo: https://github.com/jackdewinter/pymarkdown
2839
rev: v0.9.29
2940
hooks:
3041
- id: pymarkdown
31-
args: [fix]
42+
args: ["-d", "MD029,MD031", fix]
3243
- repo: https://github.com/pre-commit/pre-commit-hooks
3344
rev: v5.0.0
3445
hooks:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<a href="https://github.com/PaddlePaddle/FastDeploy/commits"><img src="https://img.shields.io/github/commit-activity/m/PaddlePaddle/FastDeploy?color=3af"></a>
99
<a href="https://github.com/PaddlePaddle/FastDeploy/issues"><img src="https://img.shields.io/github/issues/PaddlePaddle/FastDeploy?color=9cc"></a>
1010
<a href="https://github.com/PaddlePaddle/FastDeploy/stargazers"><img src="https://img.shields.io/github/stars/PaddlePaddle/FastDeploy?color=ccf"></a>
11-
11+
1212
</p>
1313

1414
<p align="center">
@@ -17,8 +17,8 @@
1717
|
1818
<a href="https://paddlepaddle.github.io/FastDeploy/get_started/quick_start"><b> Quick Start </b></a>
1919
|
20-
<a href="https://paddlepaddle.github.io/FastDeploy/supported_models/"><b> Supported Models </b></a>
21-
20+
<a href="https://paddlepaddle.github.io/FastDeploy/supported_models/"><b> Supported Models </b></a>
21+
2222
</p>
2323

2424
--------------------------------------------------------------------------------

benchmarks/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,4 @@ python benchmarks/benchmark_mtp.py \
131131
--s_itl-base-model:主模型的解码延迟,可由上述的性能压测工具获得,与batch-size一一对应
132132
--dataset-name:指定数据集类,指定为"EBChat"可读取转存的FD格式数据集
133133
--dataset-path:测试数据集路径
134-
```
134+
```

0 commit comments

Comments
 (0)