From aa10365c9f6c21fbd2cb685e19b16ec7f005c278 Mon Sep 17 00:00:00 2001 From: Sun Jiahao <72679458+sunjiahao1999@users.noreply.github.com> Date: Fri, 21 Apr 2023 18:01:28 +0800 Subject: [PATCH] [CI]Fix CI with `pip install wheel` (#2445) * fix ci * fix build cu102 * fix o3d visualizer when have not any display equipment * fix mmocr typo --- .circleci/test.yml | 2 +- .dev_scripts/diff_coverage_test.sh | 2 +- .github/workflows/merge_stage_test.yml | 20 ++++++++++---------- .github/workflows/pr_stage_test.yml | 12 ++++++------ .github/workflows/test_mim.yml | 2 +- mmdet3d/visualization/local_visualizer.py | 3 ++- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.circleci/test.yml b/.circleci/test.yml index 0c9a6d8087..3df6c4b917 100644 --- a/.circleci/test.yml +++ b/.circleci/test.yml @@ -68,7 +68,7 @@ jobs: python -m pip install git+ssh://git@github.com/open-mmlab/mmengine.git@main pip install -U openmim mim install 'mmcv >= 2.0.0rc4' - pip install git+ssh://git@github.com/open-mmlab/mmdetection.git@dev-3.x + mim install 'mmdet >= 3.0.0' pip install -r requirements.txt - run: name: Build and install diff --git a/.dev_scripts/diff_coverage_test.sh b/.dev_scripts/diff_coverage_test.sh index b87690b5a4..52f4dd9ae0 100755 --- a/.dev_scripts/diff_coverage_test.sh +++ b/.dev_scripts/diff_coverage_test.sh @@ -35,7 +35,7 @@ done if [ ! -z "${PY_FILES}" ] then if [ "$REUSE_COVERAGE_REPORT" == "0" ]; then - coverage run --branch --source mmocr -m pytest tests/ + coverage run --branch --source mmdet3d -m pytest tests/ fi coverage report --fail-under 80 -m $PY_FILES interrogate -v --ignore-init-method --ignore-module --ignore-nested-functions --ignore-magic --ignore-regex "__repr__" --fail-under 95 $PY_FILES diff --git a/.github/workflows/merge_stage_test.yml b/.github/workflows/merge_stage_test.yml index 7394caa882..464c941fbd 100644 --- a/.github/workflows/merge_stage_test.yml +++ b/.github/workflows/merge_stage_test.yml @@ -33,7 +33,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: pip install pip --upgrade + run: pip install pip --upgrade && pip install wheel - name: Install PyTorch run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html - name: Install MMEngine @@ -43,7 +43,7 @@ jobs: pip install -U openmim mim install 'mmcv >= 2.0.0rc4' - name: Install MMDet - run: pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + run: mim install 'mmdet>=3.0.0' - name: Install other dependencies run: pip install -r requirements/tests.txt - name: Build and install @@ -87,7 +87,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: pip install pip --upgrade + run: pip install pip --upgrade && pip install wheel - name: Install PyTorch run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html - name: Install MMEngine @@ -97,7 +97,7 @@ jobs: pip install -U openmim mim install 'mmcv >= 2.0.0rc4' - name: Install MMDet - run: pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + run: mim install 'mmdet>=3.0.0' - name: Install other dependencies run: pip install -r requirements/tests.txt - name: Build and install @@ -135,7 +135,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: pip install pip --upgrade + run: pip install pip --upgrade && pip install wheel - name: Fetch GPG keys run: | apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub @@ -147,7 +147,7 @@ jobs: pip install git+https://github.com/open-mmlab/mmengine.git@main pip install -U openmim mim install 'mmcv >= 2.0.0rc4' - pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + mim install 'mmdet>=3.0.0' pip install -r requirements/tests.txt - name: Build and install run: pip install -e . @@ -171,7 +171,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: pip install pip --upgrade + run: pip install pip --upgrade && pip install wheel - name: Fetch GPG keys run: | apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub @@ -183,7 +183,7 @@ jobs: pip install git+https://github.com/open-mmlab/mmengine.git@main pip install -U openmim mim install 'mmcv >= 2.0.0rc4' - pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + mim install 'mmdet>=3.0.0' pip install -r requirements/tests.txt - name: Build and install run: pip install -e . @@ -208,7 +208,7 @@ jobs: with: python-version: ${{ matrix.python }} - name: Upgrade pip - run: pip install pip --upgrade + run: pip install pip --upgrade && pip install wheel - name: Install lmdb run: pip install lmdb - name: Install PyTorch @@ -218,7 +218,7 @@ jobs: pip install git+https://github.com/open-mmlab/mmengine.git@main pip install -U openmim mim install 'mmcv >= 2.0.0rc4' - pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + mim install 'mmdet>=3.0.0' pip install -r requirements/tests.txt - name: Build and install run: pip install -e . diff --git a/.github/workflows/pr_stage_test.yml b/.github/workflows/pr_stage_test.yml index 7ae185182b..6aed10109c 100644 --- a/.github/workflows/pr_stage_test.yml +++ b/.github/workflows/pr_stage_test.yml @@ -30,7 +30,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: python -m pip install pip --upgrade + run: python -m pip install pip --upgrade && pip install wheel - name: Install PyTorch run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html - name: Install MMEngine @@ -40,7 +40,7 @@ jobs: pip install -U openmim mim install 'mmcv >= 2.0.0rc4' - name: Install MMDet - run: pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + run: mim install 'mmdet>=3.0.0' - name: Install other dependencies run: pip install -r requirements/tests.txt - name: Build and install @@ -74,7 +74,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: pip install pip --upgrade + run: pip install pip --upgrade && pip install wheel - name: Fetch GPG keys run: | apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub @@ -86,7 +86,7 @@ jobs: pip install git+https://github.com/open-mmlab/mmengine.git@main pip install -U openmim mim install 'mmcv >= 2.0.0rc4' - pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + mim install 'mmdet>=3.0.0' pip install -r requirements/tests.txt - name: Build and install run: pip install -e . @@ -111,7 +111,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: python -m pip install pip --upgrade + run: python -m pip install pip --upgrade && pip install wheel - name: Install lmdb run: pip install lmdb - name: Install PyTorch @@ -121,7 +121,7 @@ jobs: pip install git+https://github.com/open-mmlab/mmengine.git@main pip install -U openmim mim install 'mmcv >= 2.0.0rc4' - pip install git+https://github.com/open-mmlab/mmdetection.git@dev-3.x + mim install 'mmdet>=3.0.0' pip install -r requirements/tests.txt - name: Build and install run: pip install -e . diff --git a/.github/workflows/test_mim.yml b/.github/workflows/test_mim.yml index 98d6d1ce8c..0ffb48d0ca 100644 --- a/.github/workflows/test_mim.yml +++ b/.github/workflows/test_mim.yml @@ -33,7 +33,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Upgrade pip - run: pip install pip --upgrade + run: pip install pip --upgrade && pip install wheel - name: Install PyTorch run: pip install torch==${{matrix.torch}}+cpu torchvision==${{matrix.torchvision}}+cpu -f https://download.pytorch.org/whl/cpu/torch_stable.html - name: Install openmim diff --git a/mmdet3d/visualization/local_visualizer.py b/mmdet3d/visualization/local_visualizer.py index aaa3ce9e39..ec53e6ad74 100644 --- a/mmdet3d/visualization/local_visualizer.py +++ b/mmdet3d/visualization/local_visualizer.py @@ -204,7 +204,8 @@ def set_points(self, self.o3d_vis.remove_geometry(self.pcd) # set points size in Open3D - self.o3d_vis.get_render_option().point_size = points_size + if self.o3d_vis.get_render_option() is not None: + self.o3d_vis.get_render_option().point_size = points_size points = points.copy() pcd = geometry.PointCloud()