Skip to content

Commit 5cd59f7

Browse files
[Fix]: fix open3d version bug (#2633)
1 parent 5d822da commit 5cd59f7

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

requirements/runtime.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ networkx>=2.5
33
numba # you should install numba==0.53.0 if your environment is cuda-9.0
44
numpy
55
nuscenes-devkit
6-
open3d==0.16.0
6+
open3d
77
plyfile
88
scikit-image
99
# by default we also use tensorboard to log results

tests/test_apis/test_inferencers/test_lidar_seg3d_inferencer.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Copyright (c) OpenMMLab. All rights reserved.
2+
import os
23
import os.path as osp
34
import tempfile
45
from unittest import TestCase
56

67
import mmengine
78
import numpy as np
9+
import pytest
810
import torch
911
from mmengine.utils import is_list_of
1012

@@ -33,9 +35,11 @@ def assert_predictions_equal(self, preds1, preds2):
3335
np.allclose(pred1['pts_semantic_mask'],
3436
pred2['pts_semantic_mask']))
3537

38+
@pytest.mark.skipif(
39+
not torch.cuda.is_available(), reason='requires CUDA support')
40+
@pytest.mark.skipif(
41+
'DISPLAY' not in os.environ, reason='requires DISPLAY device')
3642
def test_call(self):
37-
if not torch.cuda.is_available():
38-
return
3943
# single point cloud
4044
inputs = dict(points='tests/data/s3dis/points/Area_1_office_2.bin')
4145
torch.manual_seed(0)
@@ -79,9 +83,11 @@ def test_call(self):
7983
self.assertIn('visualization', res_bs2)
8084
self.assertIn('predictions', res_bs2)
8185

86+
@pytest.mark.skipif(
87+
not torch.cuda.is_available(), reason='requires CUDA support')
88+
@pytest.mark.skipif(
89+
'DISPLAY' not in os.environ, reason='requires DISPLAY device')
8290
def test_visualizer(self):
83-
if not torch.cuda.is_available():
84-
return
8591
inputs = dict(points='tests/data/s3dis/points/Area_1_office_2.bin')
8692
# img_out_dir
8793
with tempfile.TemporaryDirectory() as tmp_dir:

0 commit comments

Comments
 (0)