open-mmlab / mmdetection3d

OpenMMLab's next-generation platform for general 3D object detection.
https://mmdetection3d.readthedocs.io/en/latest/
Apache License 2.0
5.18k stars 1.52k forks source link

[Bug] install mim error #2996

Open zkailinzhang opened 2 months ago

zkailinzhang commented 2 months ago

Prerequisite

Task

I'm using the official example scripts/configs for the officially supported tasks/models/datasets.

Branch

main branch https://github.com/open-mmlab/mmdetection3d

Environment

pip download failed with args: ['mmdet3d==0.17.1', '-d', '/tmp/tmp1z9ruc5p', '--no-deps', '--no-binary', ':all:'] ERROR: Exception: Traceback (most recent call last): File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper status = run_func(*args) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper return func(self, options, args) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 377, in run requirement_set = resolver.resolve( File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve result = self._result = resolver.resolve( File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 427, in resolve failure_causes = self._attempt_to_pin_criterion(name) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 239, in _attempt_to_pin_criterion criteria = self._get_updated_criteria(candidate) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 229, in _get_updated_criteria for requirement in self._p.get_dependencies(candidate=candidate): File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 244, in get_dependencies return [r for r in candidate.iter_dependencies(with_requires) if r is not None] File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 244, in return [r for r in candidate.iter_dependencies(with_requires) if r is not None] File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 388, in iter_dependencies for r in self.dist.iter_dependencies(): File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/pip/_internal/metadata/pkg_resources.py", line 221, in iter_dependencies return self._dist.requires(extras) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mim/commands/install.py", line 207, in patched_requires mmdeps_text = get_mmdeps_from_mmpkg(self.project_name, File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mim/commands/install.py", line 321, in get_mmdeps_from_mmpkg mminstall_content = get_mminstall_from_pypi(mmpkg, index_url=index_url) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mim/commands/install.py", line 351, in get_mminstall_from_pypi exit(status_code) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/_sitebuiltins.py", line 26, in call raise SystemExit(code) SystemExit: 2 mim resources not found: /opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mmdet/.mim, you can try to install the latest mmdet. mim resources not found: /opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mmseg/.mim, you can try to install the latest mmsegmentation.

Reproduces the problem - code sample

1

Reproduces the problem - command or script

1

Reproduces the problem - error message

1

Additional information

No response

zkailinzhang commented 2 months ago

mmcv-full 1.4.0 mmdet 2.14.0 mmdet3d 0.17.1 /home/zkl/code/mmdetection3d mmsegmentation 0.14.1

torch 2.0.0+cu118 torchaudio 2.0.1+cu118 torchvision 0.15.1+cu118

(py38_cu118_occ_zkl) ~/code/mmdetection3d$ mim install mmdet3d

zkailinzhang commented 2 months ago

(py38_cu118_occ_zkl) zkl3:~/code/mmdetection3d$ python demo/pcd_demo.py demo/data/kitti/000008.bin pointpillars_hv_secfpn_8xb6-160e_kitti-3d-car.py hv_pointpillars_secfpn_6x8_160e_kitti-3d-car_20220331_134606-d42d15ed.pth /opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mmdet3d/models/dense_heads/anchor3d_head.py:94: UserWarning: dir_offset and dir_limit_offset will be depressed and be incorporated into box coder in the future warnings.warn( Loads checkpoint by local backend from path: hv_pointpillars_secfpn_6x8_160e_kitti-3d-car_20220331_134606-d42d15ed.pth 06/28 16:08:03 - mmengine - WARNING - Failed to search registry with scope "mmdet3d" in the "function" registry tree. As a workaround, the current "function" registry in "mmengine" is used to build instance. This may cause unexpected failure when running the built modules. Please check whether "mmdet3d" is a correct scope, or whether the registry is initialized. /opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mmengine/visualization/visualizer.py:196: UserWarning: Failed to add <class 'mmengine.visualization.vis_backend.LocalVisBackend'>, please provide the save_dir argument. warnings.warn(f'Failed to add {vis_backend.class}, ' Inference ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Traceback (most recent call last): File "demo/pcd_demo.py", line 90, in main() File "demo/pcd_demo.py", line 80, in main inferencer(call_args) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mmdet3d/apis/inferencers/base_3d_inferencer.py", line 212, in call preds.extend(self.forward(data, forward_kwargs)) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, kwargs) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mmengine/infer/infer.py", line 296, in forward return self.model.test_step(inputs) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mmengine/model/base_model/base_model.py", line 144, in test_step data = self.data_preprocessor(data, False) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, *kwargs) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mmdet3d/models/data_preprocessors/data_preprocessor.py", line 152, in forward return self.simple_process(data, training) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mmdet3d/models/data_preprocessors/data_preprocessor.py", line 178, in simple_process voxel_dict = self.voxelize(inputs['points'], data_samples) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(args, kwargs) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mmdet3d/models/data_preprocessors/data_preprocessor.py", line 367, in voxelize res_voxels, res_coors, res_num_points = self.voxel_layer(res) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, *kwargs) File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mmdet3d/models/data_preprocessors/voxelize.py", line 170, in forward return voxelization(input, self.voxel_size, self.point_cloud_range, File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/torch/autograd/function.py", line 506, in apply return super().apply(args, **kwargs) # type: ignore[misc] File "/opt/anaconda3/envs/py38_cu118_occ_zkl/lib/python3.8/site-packages/mmdet3d/models/data_preprocessors/voxelize.py", line 78, in forward ext_module.hard_voxelize_forward( RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.