FlashOCC icon indicating copy to clipboard operation
FlashOCC copied to clipboard

'DataContainer' object is not subscriptable

Open zyxcambridge opened this issue 5 months ago • 0 comments

mmdet3d_plugin/models/dense_heads/bev_centerpoint_head.py", line 1712, in get_task_detections boxes_for_nms = img_metas[i]['box_type_3d']( TypeError: 'DataContainer' object is not subscriptable

Requirement already satisfied: mmcls>=0.20.1 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmsegmentation==0.25.0) (0.25.0) Requirement already satisfied: numpy in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmsegmentation==0.25.0) (1.23.5) Requirement already satisfied: packaging in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmsegmentation==0.25.0) (24.1) Requirement already satisfied: prettytable in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from mmsegmentation==0.25.0) (3.11.0) Requirement already satisfied: cycler>=0.10 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from matplotlib->mmsegmentation==0.25.0) (0.12.1) Requirement already satisfied: fonttools>=4.22.0 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from matplotlib->mmsegmentation==0.25.0) (4.53.1) Requirement already satisfied: kiwisolver>=1.0.1 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from matplotlib->mmsegmentation==0.25.0) (1.4.7) Requirement already satisfied: pillow>=6.2.0 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from matplotlib->mmsegmentation==0.25.0) (10.4.0) Requirement already satisfied: pyparsing>=2.2.1 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from matplotlib->mmsegmentation==0.25.0) (3.1.4) Requirement already satisfied: python-dateutil>=2.7 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from matplotlib->mmsegmentation==0.25.0) (2.9.0.post0) Requirement already satisfied: wcwidth in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from prettytable->mmsegmentation==0.25.0) (0.2.13) Requirement already satisfied: six>=1.5 in /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib->mmsegmentation==0.25.0) (1.16.0) (FlashOcc) (base) zyx@zyx:~/code/FlashOCC$ bash tools/dist_test.sh projects/configs/panoptic-flashocc/${exp_name}.py work_dirs/${exp_name}/epoch_24_ema.pth 1 --eval miou /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/torch/distributed/launch.py:178: FutureWarning: The module torch.distributed.launch is deprecated and will be removed in future. Use torchrun. Note that --use_env is set by default in torchrun. If your script expects --local_rank argument to be set, please change it to read from os.environ['LOCAL_RANK'] instead. See https://pytorch.org/docs/stable/distributed.html#launch-utility for further instructions

warnings.warn( /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/mmdet/utils/setup_env.py:38: UserWarning: Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed. warnings.warn( /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/mmdet/utils/setup_env.py:48: UserWarning: Setting MKL_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed. warnings.warn( projects.mmdet3d_plugin Using /home/zyx/.cache/torch_extensions/py38_cu113 as PyTorch extensions root... Detected CUDA files, patching ldflags Emitting ninja build file /home/zyx/.cache/torch_extensions/py38_cu113/dvr/build.ninja... Building extension module dvr... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) ninja: no work to do. Loading extension module dvr... /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/torch/functional.py:478: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:2894.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/mmdet/models/backbones/resnet.py:401: UserWarning: DeprecationWarning: pretrained is deprecated, please use "init_cfg" instead warnings.warn('DeprecationWarning: pretrained is deprecated, ' load checkpoint from local path: work_dirs/panoptic-flashocc-r50-depth4d-longterm8f-pano/epoch_24_ema.pth [ ] 0/81, elapsed: 0s, ETA:/home/zyx/code/FlashOCC/projects/mmdet3d_plugin/datasets/pipelines/loading.py:361: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at ../torch/csrc/utils/tensor_new.cpp:201.) gt_boxes, gt_labels = torch.Tensor(gt_boxes), torch.tensor(gt_labels) /home/zyx/code/FlashOCC/projects/mmdet3d_plugin/datasets/pipelines/loading.py:361: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at ../torch/csrc/utils/tensor_new.cpp:201.) gt_boxes, gt_labels = torch.Tensor(gt_boxes), torch.tensor(gt_labels) /home/zyx/code/FlashOCC/projects/mmdet3d_plugin/datasets/pipelines/loading.py:361: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at ../torch/csrc/utils/tensor_new.cpp:201.) gt_boxes, gt_labels = torch.Tensor(gt_boxes), torch.tensor(gt_labels) /home/zyx/code/FlashOCC/projects/mmdet3d_plugin/datasets/pipelines/loading.py:361: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at ../torch/csrc/utils/tensor_new.cpp:201.) gt_boxes, gt_labels = torch.Tensor(gt_boxes), torch.tensor(gt_labels) /home/zyx/code/FlashOCC/projects/mmdet3d_plugin/models/necks/view_transformer.py:288: UserWarning: torch.range is deprecated and will be removed in a future release because its behavior is inconsistent with Python's range builtin. Instead, use torch.arange, which produces values in [start, end). ranks_depth = torch.range( /home/zyx/code/FlashOCC/projects/mmdet3d_plugin/models/necks/view_transformer.py:290: UserWarning: torch.range is deprecated and will be removed in a future release because its behavior is inconsistent with Python's range builtin. Instead, use torch.arange, which produces values in [start, end). ranks_feat = torch.range( /home/zyx/code/FlashOCC/projects/mmdet3d_plugin/models/necks/view_transformer.py:301: UserWarning: torch.range is deprecated and will be removed in a future release because its behavior is inconsistent with Python's range builtin. Instead, use torch.arange, which produces values in [start, end). batch_idx = torch.range(0, B - 1).reshape(B, 1).
Traceback (most recent call last): File "tools/test.py", line 290, in main() File "tools/test.py", line 266, in main outputs = multi_gpu_test(model, data_loader, args.tmpdir, File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/mmdet/apis/test.py", line 109, in multi_gpu_test result = model(return_loss=False, rescale=True, **data) File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 1008, in forward output = self._run_ddp_forward(*inputs, **kwargs) File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 969, in _run_ddp_forward return module_to_run(*inputs[0], **kwargs[0]) File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/mmcv/runner/fp16_utils.py", line 116, in new_func return old_func(*args, **kwargs) File "/home/zyx/code/FlashOCC/mmdetection3d/mmdet3d/models/detectors/base.py", line 62, in forward return self.forward_test(**kwargs) File "/home/zyx/code/FlashOCC/projects/mmdet3d_plugin/models/detectors/bevdet.py", line 201, in forward_test return self.simple_test(points[0], img_metas[0], img_inputs[0], File "/home/zyx/code/FlashOCC/projects/mmdet3d_plugin/models/detectors/bevdet_occ.py", line 820, in simple_test File "/home/zyx/code/FlashOCC/projects/mmdet3d_plugin/models/detectors/bevdet_occ.py", line 795, in simple_test_aux_centerness File "/home/zyx/code/FlashOCC/projects/mmdet3d_plugin/models/dense_heads/bev_centerpoint_head.py", line 1588, in get_bboxes self.get_task_detections(batch_cls_preds, batch_reg_preds, File "/home/zyx/code/FlashOCC/projects/mmdet3d_plugin/models/dense_heads/bev_centerpoint_head.py", line 1712, in get_task_detections boxes_for_nms = img_metas[i]['box_type_3d']( TypeError: 'DataContainer' object is not subscriptable ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 51360) of binary: /home/zyx/anaconda3/envs/FlashOcc/bin/python Traceback (most recent call last): File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/torch/distributed/launch.py", line 193, in main() File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/torch/distributed/launch.py", line 189, in main launch(args) File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/torch/distributed/launch.py", line 174, in launch run(args) File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/torch/distributed/run.py", line 752, in run elastic_launch( File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 131, in call return launch_agent(self._config, self._entrypoint, list(args)) File "/home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages/torch/distributed/launcher/api.py", line 245, in launch_agent raise ChildFailedError( torch.distributed.elastic.multiprocessing.errors.ChildFailedError:

tools/test.py FAILED

Failures: <NO_OTHER_FAILURES>

Root Cause (first observed failure): [0]: time : 2024-09-12_11:11:53 host : zyx rank : 0 (local_rank: 0) exitcode : 1 (pid: 51360) error_file: <N/A> traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html

(FlashOcc) (base) zyx@zyx:~/code/FlashOCC$ pip list Package Version Editable project location


absl-py 2.1.0 addict 2.4.0 aiofiles 22.1.0 aiosqlite 0.20.0 aliyun-python-sdk-core 2.15.2 aliyun-python-sdk-kms 2.16.5 anyio 4.4.0 argon2-cffi 23.1.0 argon2-cffi-bindings 21.2.0 arrow 1.3.0 asttokens 2.4.1 asynctest 0.13.0 attrs 24.2.0 babel 2.16.0 backcall 0.2.0 beautifulsoup4 4.12.3 black 24.8.0 bleach 6.1.0 blinker 1.8.2 Brotli 1.0.9 cachetools 5.5.0 ccimport 0.4.3 certifi 2024.8.30 cffi 1.17.1 charset-normalizer 3.3.2 click 8.1.7 codecov 2.1.13 colorama 0.4.6 coloredlogs 15.0.1 comm 0.2.2 ConfigArgParse 1.7 contourpy 1.1.1 coverage 7.6.1 crcmod 1.7 cryptography 43.0.1 cumm-cu113 0.4.11 cycler 0.12.1 dash 2.18.0 dash-core-components 2.0.0 dash-html-components 2.0.0 dash-table 5.0.0 debugpy 1.8.5 decorator 5.1.1 defusedxml 0.7.1 deprecation 2.1.0 descartes 1.1.0 dill 0.3.8 entrypoints 0.4 exceptiongroup 1.2.2 executing 2.1.0 fastjsonschema 2.20.0 filelock 3.14.0 fire 0.6.0 flake8 7.1.1 Flask 3.0.3 flatbuffers 24.3.25 fonttools 4.53.1 fqdn 1.5.1 google-auth 2.34.0 google-auth-oauthlib 1.0.0 grpcio 1.66.1 h5py 3.11.0 humanfriendly 10.0 idna 3.7 imageio 2.35.1 importlib_metadata 8.4.0 importlib_resources 6.4.5 iniconfig 2.0.0 interrogate 1.7.0 ipykernel 6.29.5 ipython 8.12.3 ipython-genutils 0.2.0 ipywidgets 8.1.5 isoduration 20.11.0 isort 5.13.2 itsdangerous 2.2.0 jedi 0.19.1 Jinja2 3.1.4 jmespath 0.10.0 joblib 1.4.2 json5 0.9.25 jsonpointer 3.0.0 jsonschema 4.23.0 jsonschema-specifications 2023.12.1 jupyter_client 7.4.9 jupyter_core 5.7.2 jupyter-events 0.10.0 jupyter_packaging 0.12.3 jupyter_server 2.14.2 jupyter_server_fileid 0.9.3 jupyter_server_terminals 0.5.3 jupyter_server_ydoc 0.8.0 jupyter-ydoc 0.2.5 jupyterlab 3.6.8 jupyterlab_pygments 0.3.0 jupyterlab_server 2.27.3 jupyterlab_widgets 3.0.13 kiwisolver 1.4.7 kwarray 0.7.0 lark 1.2.2 lazy_loader 0.4 llvmlite 0.36.0 lyft-dataset-sdk 0.0.8 Mako 1.3.5 Markdown 3.7 markdown-it-py 3.0.0 MarkupSafe 2.1.5 matplotlib 3.5.3 matplotlib-inline 0.1.7 mccabe 0.7.0 mdurl 0.1.2 mistune 3.0.2 mkl-fft 1.3.8 mkl-random 1.2.4 mkl-service 2.4.0 mmcls 0.25.0 mmcv-full 1.5.3 /home/zyx/anaconda3/envs/FlashOcc/lib/python3.8/site-packages mmdeploy 0.9.0 /home/zyx/code/FlashOCC/mmdeploy mmdet 2.25.1 mmdet3d 1.0.0rc4 /home/zyx/code/FlashOCC/mmdetection3d mmengine 0.10.4 mmsegmentation 0.25.0 model-index 0.1.11 mpmath 1.3.0 multiprocess 0.70.16 mypy-extensions 1.0.0 nbclassic 1.1.0 nbclient 0.10.0 nbconvert 7.16.4 nbformat 5.10.4 nest-asyncio 1.6.0 networkx 2.2 ninja 1.11.1.1 notebook 6.5.7 notebook_shim 0.2.4 numba 0.53.0 numpy 1.23.5 nuscenes-devkit 1.1.11 nvidia-cublas-cu11 11.11.3.6 nvidia-cuda-runtime-cu11 11.8.89 nvidia-cuda-runtime-cu12 12.6.68 nvidia-cudnn-cu11 9.4.0.58 nvidia-tensorrt 8.4.1.5 oauthlib 3.2.2 onnx 1.12.0 onnxruntime-gpu 1.18.1 open3d 0.15.2 opencv-python 4.10.0.84 opendatalab 0.0.10 openmim 0.3.9 openxlab 0.1.1 ordered-set 4.1.0 oss2 2.17.0 overrides 7.7.0 packaging 24.1 pandas 2.0.3 pandocfilters 1.5.1 parso 0.8.4 pathspec 0.12.1 pccm 0.4.16 pexpect 4.9.0 pickleshare 0.7.5 pillow 10.4.0 pip 24.2 pkgutil_resolve_name 1.3.10 platformdirs 4.3.2 plotly 5.24.0 pluggy 1.5.0 plyfile 1.0.3 portalocker 2.10.1 prettytable 3.11.0 prometheus_client 0.20.0 prompt_toolkit 3.0.47 protobuf 3.20.1 psutil 6.0.0 ptyprocess 0.7.0 pure_eval 0.2.3 py 1.11.0 pyasn1 0.6.0 pyasn1_modules 0.4.0 pybind11 2.13.5 pycocotools 2.0.7 pycodestyle 2.12.1 pycparser 2.22 pycryptodome 3.20.0 pycuda 2024.1.2 pyflakes 3.2.0 Pygments 2.18.0 pyparsing 3.1.4 pyquaternion 0.9.9 PySocks 1.7.1 pytest 8.3.2 pytest-cov 5.0.0 pytest-runner 6.0.1 python-dateutil 2.9.0.post0 python-json-logger 2.0.7 pytools 2024.1.14 pytz 2023.4 PyWavelets 1.4.1 PyYAML 6.0.2 pyzmq 26.2.0 referencing 0.35.1 requests 2.32.3 requests-oauthlib 2.0.0 retrying 1.3.4 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rich 13.4.2 rpds-py 0.20.0 rsa 4.9 scikit-image 0.19.3 scikit-learn 1.3.2 scipy 1.10.1 Send2Trash 1.8.3 setuptools 59.5.0 Shapely 1.8.5.post1 six 1.16.0 sniffio 1.3.1 soupsieve 2.6 spconv-cu113 2.3.6 stack-data 0.6.3 sympy 1.13.2 tabulate 0.9.0 tenacity 9.0.0 tensorboard 2.14.0 tensorboard-data-server 0.7.2 tensorrt 10.4.0 tensorrt-cu12 10.4.0 tensorrt-cu12-bindings 10.4.0 tensorrt-cu12-libs 10.4.0 termcolor 2.4.0 terminado 0.18.1 terminaltables 3.1.10 threadpoolctl 3.5.0 tifffile 2023.7.10 tinycss2 1.3.0 tomli 2.0.1 tomlkit 0.13.2 torch 1.12.0+cu113 torchaudio 0.12.0+cu113 torchvision 0.13.0+cu113 tornado 6.4.1 tqdm 4.65.2 traitlets 5.14.3 trimesh 2.35.39 types-python-dateutil 2.9.0.20240906 typing_extensions 4.11.0 tzdata 2024.1 ubelt 1.3.6 uri-template 1.3.0 urllib3 1.26.20 wcwidth 0.2.13 webcolors 24.8.0 webencodings 0.5.1 websocket-client 1.8.0 Werkzeug 3.0.4 wheel 0.43.0 widgetsnbextension 4.0.13 xdoctest 1.2.0 y-py 0.6.2 yapf 0.40.1 ypy-websocket 0.8.4 zipp 3.20.1

zyxcambridge avatar Sep 12 '24 03:09 zyxcambridge