Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
RunningLeon committed Dec 25, 2023
1 parent 9ccf2f1 commit 535a0c3
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/linux/test_full_pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if [ $backend == "trt" ]; then
fi

# prepare dataset
wget -P data/ https://github.com/open-mmlab/mmdeploy/files/9401216/imagenet-val100.zip
wget -P data/ https://github.com/open-mmlab/mmdeploy/releases/download/v0.1.0/imagenet-val100.zip
unzip data/imagenet-val100.zip -d data/

echo "Running test with $backend"
Expand Down
18 changes: 9 additions & 9 deletions .github/scripts/prepare_reg_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ def run_cmd(cmd_lines, log_path=None, raise_error=True):


def prepare_codebases(codebases):
run_cmd(['python -m mim install "mmcv>=2.0.0"'])
for codebase in codebases:
full_name = REPO_NAMES[codebase]
target_dir = os.path.join(MMDEPLOY_DIR, '..', full_name)
branch = 'main'
if codebase in ['mmrotate', 'mmdet3d']:
branch = 'dev-1.x'
if not osp.exists(target_dir):
run_cmd([
'git clone --depth 1 ', f'-b {branch} '
f'https://github.com/open-mmlab/{full_name}.git '
f'{target_dir} '
])
if codebase == 'mmrotate':
branch = 'v1.0.0rc1'
if osp.exists(target_dir):
shutil.rmtree(target_dir)
run_cmd([
'git clone --depth 1 ', f'-b {branch} '
f'https://github.com/open-mmlab/{full_name}.git '
f'{target_dir} '
])
run_cmd([
'python -m mim install ',
f'-r {target_dir}/requirements/mminstall.txt ',
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/windows/test_full_pipeline.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ python tools\deploy.py `
--dump-info

# prepare dataset
Invoke-WebRequest -Uri https://github.com/open-mmlab/mmdeploy/files/9401216/imagenet-val100.zip -OutFile $pwd\data\imagenet-val100.zip
Invoke-WebRequest -Uri https://github.com/open-mmlab/mmdeploy/releases/download/v0.1.0/imagenet-val100.zip -OutFile $pwd\data\imagenet-val100.zip
Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory("$pwd\data\imagenet-val100.zip", "$pwd\data\")

Write-Host "Running test with ort"
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
torch: [1.8.0, 1.9.0]
torch: [1.9.0]
include:
- torch: 1.8.0
torchvision: 0.9.0
- torch: 1.9.0
torchvision: 0.10.0
steps:
Expand All @@ -44,7 +42,7 @@ jobs:
python -m pip install openmim
python -m pip install -r requirements.txt
python -m pip install -r requirements/backends.txt
python -m mim install "mmcv>=2.0.0"
python -m mim install "mmcv==2.0.1"
python -m mim install -r requirements/codebases.txt
python -m pip install clip numba transformers numpy==1.23 albumentations
python -m pip list
Expand Down Expand Up @@ -180,7 +178,7 @@ jobs:
python -m pip install --no-cache-dir openmim
python -m pip install --no-cache-dir -r requirements.txt
python -m pip install --no-cache-dir -r requirements/backends.txt
python -m mim install "mmcv>=2.0.0"
python -m mim install "mmcv==2.0.1"
python -m pip install --no-cache-dir -r requirements/codebases.txt
python -m pip install --no-cache-dir -U pycuda numpy==1.23 clip numba transformers albumentations
python -m pip list
Expand Down Expand Up @@ -245,7 +243,7 @@ jobs:
python -m pip install --no-cache-dir openmim
python -m pip install --no-cache-dir -r requirements.txt
python -m pip install --no-cache-dir -r requirements/backends.txt
python -m mim install --no-cache-dir "mmcv>=2.0.0"
python -m mim install --no-cache-dir "mmcv==2.0.1"
python -m pip install --no-cache-dir -r requirements/codebases.txt
python -m pip install --no-cache-dir -U pycuda numpy clip numba transformers albumentations
python -m pip list
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/regression-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ jobs:
python -m pip install opencv-python==4.5.4.60 opencv-python-headless==4.5.4.60 opencv-contrib-python==4.5.4.60
python .github/scripts/prepare_reg_test.py --torch-version ${{ matrix.torch_version }} --codebases ${{ matrix.codebase}}
python -m pip install -r requirements.txt
python -m pip install --upgrade rich
python -m pip list
- name: Install mmdeploy with sdk
run: |
Expand Down
2 changes: 1 addition & 1 deletion docs/en/01-how-to-build/rockchip.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ It is recommended to create a virtual environment for the project.
git clone [email protected]:rockchip-linux/rknn-toolkit2.git
```

2. Install RKNN python package following [rknn-toolkit2 doc](https://github.com/rockchip-linux/rknn-toolkit2/tree/master/doc) or [rknn-toolkit doc](https://github.com/rockchip-linux/rknn-toolkit/tree/master/doc). When installing rknn python package, it is better to append `--no-deps` after the commands to avoid dependency conflicts. RKNN-Toolkit2 package for example:
2. Install RKNN python package following [rknn-toolkit2 doc](https://github.com/rockchip-linux/rknn-toolkit2/tree/master/doc) or [rknn-toolkit doc](https://github.com/rockchip-linux/rknn-toolkit/tree/master/docs). When installing rknn python package, it is better to append `--no-deps` after the commands to avoid dependency conflicts. RKNN-Toolkit2 package for example:

```
pip install packages/rknn_toolkit2-1.4.0_22dcfef4-cp36-cp36m-linux_x86_64.whl --no-deps
Expand Down
2 changes: 1 addition & 1 deletion docs/zh_cn/01-how-to-build/rockchip.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ MMDeploy 支持把模型部署到瑞芯微设备上。已支持的芯片:RV112
<tr>
<td>RK3566 / RK3568 / RK3588 / RV1103 / RV1106</td>
<td><code>git clone https://github.com/rockchip-linux/rknn-toolkit2</code></td>
<td><a href="https://github.com/rockchip-linux/rknn-toolkit/tree/master/doc">安装指南</a></td>
<td><a href="https://github.com/rockchip-linux/rknn-toolkit/tree/master/docs">安装指南</a></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 2 additions & 0 deletions mmdeploy/mmcv/ops/nms.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,8 @@ def _multiclass_nms_single(boxes: Tensor,
bbox_index = box_inds.unsqueeze(0)
if pre_top_k > 0:
bbox_index = pre_topk_inds[None, box_inds]
# pad index to keep same dim as dets and labels
bbox_index = torch.cat([bbox_index, -bbox_index.new_ones((1, 1))], 1)
if keep_top_k > 0:
bbox_index = bbox_index[:, topk_inds]
return dets, labels, bbox_index
Expand Down
16 changes: 8 additions & 8 deletions requirements/codebases.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
mmagic>=1.0.0
mmdet>=3.0.0
mmdet3d>=1.1.0rc2
mmocr>=1.0.0
mmpose>=1.0.0
mmpretrain>=1.0.0rc7
mmrotate>=1.0.0rc0
mmsegmentation>=1.0.0
mmagic==1.0.0
mmdet==3.0.0
mmdet3d==1.3.0
mmocr==1.0.0
mmpose==1.0.0
mmpretrain==1.0.0
mmrotate==1.0.0rc1
mmsegmentation==1.0.0

0 comments on commit 535a0c3

Please sign in to comment.