"examples/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "5f2639e230c63441ce3e559441e0e1b6ba7f45f8"
Unverified Commit ea131ebc authored by Jingwei Zhang's avatar Jingwei Zhang Committed by GitHub
Browse files

[Fix]: Modify the min version of python to 3.7 in CI & update docs (#1877)

* modify ci config

* minor changes

* min python==3.7.4 & update install docs

* fix data_preprocessor

* fix data_preprocessor

* install waymo-open-dataset-tf-2-6-0

* update docs
parent be937d4a
...@@ -36,8 +36,6 @@ jobs: ...@@ -36,8 +36,6 @@ jobs:
type: string type: string
torchvision: torchvision:
type: string type: string
mmcv:
type: string
docker: docker:
- image: cimg/python:<< parameters.python >> - image: cimg/python:<< parameters.python >>
resource_class: large resource_class: large
...@@ -62,7 +60,8 @@ jobs: ...@@ -62,7 +60,8 @@ jobs:
name: Install mmdet3d dependencies name: Install mmdet3d dependencies
command: | command: |
python -m pip install git+ssh://git@github.com/open-mmlab/mmengine.git@main python -m pip install git+ssh://git@github.com/open-mmlab/mmengine.git@main
python -m pip install << parameters.mmcv >> python -m pip install -U openmim
python -m mim install 'mmcv >= 2.0.0rc1'
python -m pip install git+ssh://git@github.com/open-mmlab/mmdetection.git@dev-3.x python -m pip install git+ssh://git@github.com/open-mmlab/mmdetection.git@dev-3.x
python -m pip install -r requirements.txt python -m pip install -r requirements.txt
- run: - run:
...@@ -85,8 +84,6 @@ jobs: ...@@ -85,8 +84,6 @@ jobs:
cudnn: cudnn:
type: integer type: integer
default: 7 default: 7
mmcv:
type: string
machine: machine:
image: ubuntu-2004-cuda-11.4:202110-01 image: ubuntu-2004-cuda-11.4:202110-01
# docker_layer_caching: true # docker_layer_caching: true
...@@ -108,7 +105,8 @@ jobs: ...@@ -108,7 +105,8 @@ jobs:
name: Install mmdet3d dependencies name: Install mmdet3d dependencies
command: | command: |
docker exec mmdet3d pip install -e /mmengine docker exec mmdet3d pip install -e /mmengine
docker exec mmdet3d pip install << parameters.mmcv >> docker exec pip install -U openmim
docker exec mim install 'mmcv >= 2.0.0rc1'
docker exec mmdet3d pip install -e /mmdetection docker exec mmdet3d pip install -e /mmdetection
docker exec mmdet3d pip install -r requirements.txt docker exec mmdet3d pip install -r requirements.txt
- run: - run:
...@@ -144,8 +142,7 @@ workflows: ...@@ -144,8 +142,7 @@ workflows:
name: minimum_version_cpu name: minimum_version_cpu
torch: 1.6.0 torch: 1.6.0
torchvision: 0.7.0 torchvision: 0.7.0
python: 3.6.9 # The lowest python 3.6.x version available on CircleCI images python: 3.7.4
mmcv: https://download.openmmlab.com/mmcv/dev-2.x/cpu/torch1.6.0/mmcv_full-2.0.0rc0-cp36-cp36m-manylinux1_x86_64.whl
requires: requires:
- lint - lint
- build_cpu: - build_cpu:
...@@ -153,7 +150,6 @@ workflows: ...@@ -153,7 +150,6 @@ workflows:
torch: 1.9.0 torch: 1.9.0
torchvision: 0.10.0 torchvision: 0.10.0
python: 3.9.0 python: 3.9.0
mmcv: https://download.openmmlab.com/mmcv/dev-2.x/cpu/torch1.9.0/mmcv_full-2.0.0rc0-cp39-cp39-manylinux1_x86_64.whl
requires: requires:
- minimum_version_cpu - minimum_version_cpu
- hold: - hold:
...@@ -166,7 +162,6 @@ workflows: ...@@ -166,7 +162,6 @@ workflows:
# Use double quotation mark to explicitly specify its type # Use double quotation mark to explicitly specify its type
# as string instead of number # as string instead of number
cuda: "10.2" cuda: "10.2"
mmcv: https://download.openmmlab.com/mmcv/dev-2.x/cu102/torch1.8.0/mmcv_full-2.0.0rc0-cp37-cp37m-manylinux1_x86_64.whl
requires: requires:
- hold - hold
merge_stage_test: merge_stage_test:
...@@ -179,7 +174,6 @@ workflows: ...@@ -179,7 +174,6 @@ workflows:
torch: 1.6.0 torch: 1.6.0
# Use double quotation mark to explicitly specify its type # Use double quotation mark to explicitly specify its type
# as string instead of number # as string instead of number
mmcv: https://download.openmmlab.com/mmcv/dev-2.x/cu101/torch1.6.0/mmcv_full-2.0.0rc0-cp37-cp37m-manylinux1_x86_64.whl
cuda: "10.1" cuda: "10.1"
filters: filters:
branches: branches:
......
...@@ -18,6 +18,8 @@ If you are experienced with PyTorch and have already installed it, just skip thi ...@@ -18,6 +18,8 @@ If you are experienced with PyTorch and have already installed it, just skip thi
**Step 1.** Create a conda environment and activate it. **Step 1.** Create a conda environment and activate it.
```shell ```shell
# We recommend to install python=3.8 since the waymo-open-dataset-tf-2-6-0 requires python>=3.7
# If you want to install python<3.7, make sure to install waymo-open-dataset-tf-2-x-0 (x<=4)
conda create --name openmmlab python=3.8 -y conda create --name openmmlab python=3.8 -y
conda activate openmmlab conda activate openmmlab
``` ```
...@@ -254,6 +256,8 @@ docker run --gpus all --shm-size=8g -it -v {DATA_DIR}:/mmdetection3d/data mmdete ...@@ -254,6 +256,8 @@ docker run --gpus all --shm-size=8g -it -v {DATA_DIR}:/mmdetection3d/data mmdete
Here is a full script for setting up MMdetection3D with conda. Here is a full script for setting up MMdetection3D with conda.
```shell ```shell
# We recommend to install python=3.8 since the waymo-open-dataset-tf-2-6-0 requires python>=3.7
# If you want to install python<3.7, make sure to install waymo-open-dataset-tf-2-x-0 (x<=4)
conda create -n open-mmlab python=3.8 -y conda create -n open-mmlab python=3.8 -y
conda activate open-mmlab conda activate open-mmlab
......
...@@ -17,6 +17,8 @@ MMDetection3D 可以安装在 Linux, MacOS, (实验性支持 Windows) 的平台 ...@@ -17,6 +17,8 @@ MMDetection3D 可以安装在 Linux, MacOS, (实验性支持 Windows) 的平台
**步骤 1.** 使用 conda 新建虚拟环境,并进入该虚拟环境. **步骤 1.** 使用 conda 新建虚拟环境,并进入该虚拟环境.
```shell ```shell
# 鉴于 waymo-open-dataset-tf-2-6-0 要求 python>=3.7, 我们推荐安装 python3.8
# 如果您想要安装 python3.6, 之后须确保安装 waymo-open-dataset-tf-2-x-0 (x<=4)
conda create --name openmmlab python=3.8 -y conda create --name openmmlab python=3.8 -y
conda activate openmmlab conda activate openmmlab
``` ```
...@@ -269,7 +271,9 @@ docker run --gpus all --shm-size=8g -it -v {DATA_DIR}:/mmdetection3d/data mmdete ...@@ -269,7 +271,9 @@ docker run --gpus all --shm-size=8g -it -v {DATA_DIR}:/mmdetection3d/data mmdete
以下是一个基于 conda 安装 MMdetection3D 的脚本 以下是一个基于 conda 安装 MMdetection3D 的脚本
```shell ```shell
conda create -n open-mmlab python=3.7 -y # 鉴于 waymo-open-dataset-tf-2-6-0 要求 python>=3.7, 我们推荐安装 python3.8
# 如果您想要安装 python3.6, 之后须确保安装 waymo-open-dataset-tf-2-x-0 (x<=4)
conda create -n open-mmlab python=3.8 -y
conda activate open-mmlab conda activate open-mmlab
# install latest PyTorch prebuilt with the default prebuilt CUDA version (usually the latest) # install latest PyTorch prebuilt with the default prebuilt CUDA version (usually the latest)
......
...@@ -13,7 +13,7 @@ from torch.nn import functional as F ...@@ -13,7 +13,7 @@ from torch.nn import functional as F
from mmdet3d.registry import MODELS from mmdet3d.registry import MODELS
from mmdet3d.utils import OptConfigType from mmdet3d.utils import OptConfigType
from mmdet.models import DetDataPreprocessor from mmdet.models import DetDataPreprocessor
from mmdet.models.utils.misc import samplelist_boxlist2tensor from mmdet.models.utils.misc import samplelist_boxtype2tensor
@MODELS.register_module() @MODELS.register_module()
...@@ -75,7 +75,7 @@ class Det3DDataPreprocessor(DetDataPreprocessor): ...@@ -75,7 +75,7 @@ class Det3DDataPreprocessor(DetDataPreprocessor):
seg_pad_value: int = 255, seg_pad_value: int = 255,
bgr_to_rgb: bool = False, bgr_to_rgb: bool = False,
rgb_to_bgr: bool = False, rgb_to_bgr: bool = False,
boxlist2tensor: bool = True, boxtype2tensor: bool = True,
batch_augments: Optional[List[dict]] = None): batch_augments: Optional[List[dict]] = None):
super().__init__( super().__init__(
mean=mean, mean=mean,
...@@ -88,7 +88,7 @@ class Det3DDataPreprocessor(DetDataPreprocessor): ...@@ -88,7 +88,7 @@ class Det3DDataPreprocessor(DetDataPreprocessor):
seg_pad_value=seg_pad_value, seg_pad_value=seg_pad_value,
bgr_to_rgb=bgr_to_rgb, bgr_to_rgb=bgr_to_rgb,
rgb_to_bgr=rgb_to_bgr, rgb_to_bgr=rgb_to_bgr,
boxlist2tensor=boxlist2tensor, boxtype2tensor=boxtype2tensor,
batch_augments=batch_augments) batch_augments=batch_augments)
self.voxel = voxel self.voxel = voxel
self.voxel_type = voxel_type self.voxel_type = voxel_type
...@@ -169,8 +169,8 @@ class Det3DDataPreprocessor(DetDataPreprocessor): ...@@ -169,8 +169,8 @@ class Det3DDataPreprocessor(DetDataPreprocessor):
'pad_shape': pad_shape 'pad_shape': pad_shape
}) })
if self.boxlist2tensor: if self.boxtype2tensor:
samplelist_boxlist2tensor(data_samples) samplelist_boxtype2tensor(data_samples)
if self.pad_mask: if self.pad_mask:
self.pad_gt_masks(data_samples) self.pad_gt_masks(data_samples)
......
black==20.8b1 # be compatible with typing-extensions 3.7.4 black==20.8b1 # be compatible with typing-extensions 3.7.4
spconv spconv
typing-extensions==3.7.4 # required by tensorflow before version 2.6 typing-extensions==3.7.4 # required by tensorflow<=2.6
waymo-open-dataset-tf-2-4-0 waymo-open-dataset-tf-2-6-0 # requires python>=3.7
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment