Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caught KeyError in DataLoader worker process 0. #22

Closed
xiongcs opened this issue Apr 23, 2024 · 2 comments
Closed

Caught KeyError in DataLoader worker process 0. #22

xiongcs opened this issue Apr 23, 2024 · 2 comments

Comments

@xiongcs
Copy link

xiongcs commented Apr 23, 2024

When I was running "python tools/train.pyconfigs/td3d _ is/td3d _ is _ s3dis-3d-13class _ pretrain.py"in docker, the following error appeared.

Traceback (most recent call last):
  File "tools/train.py", line 263, in <module>
    main()
  File "tools/train.py", line 259, in main
    meta=meta)
  File "/mmdetection3d/mmdet3d/apis/train.py", line 351, in train_model
    meta=meta)
  File "/mmdetection3d/mmdet3d/apis/train.py", line 319, in train_detector
    runner.run(data_loaders, cfg.workflow)
  File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 136, in run
    epoch_runner(data_loaders[i], **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 49, in train
    for i, data_batch in enumerate(self.data_loader):
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 521, in __next__
    data = self._next_data()
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1203, in _next_data
    return self._process_data(data)
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1229, in _process_data
    data.reraise()
  File "/opt/conda/lib/python3.7/site-packages/torch/_utils.py", line 434, in reraise
    raise exception
KeyError: Caught KeyError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop
    data = fetcher.fetch(index)
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/opt/conda/lib/python3.7/site-packages/mmdet/datasets/dataset_wrappers.py", line 178, in __getitem__
    return self.dataset[idx % self._ori_len]
  File "/opt/conda/lib/python3.7/site-packages/torch/utils/data/dataset.py", line 308, in __getitem__
    return self.datasets[dataset_idx][sample_idx]
  File "/mmdetection3d/mmdet3d/datasets/custom_3d.py", line 435, in __getitem__
    data = self.prepare_train_data(idx)
  File "/mmdetection3d/mmdet3d/datasets/custom_3d.py", line 225, in prepare_train_data
    input_dict = self.get_data_info(index)
  File "/mmdetection3d/mmdet3d/datasets/s3dis_dataset.py", line 128, in get_data_info
    info = self.data_infos[index]
KeyError: 0
@filaPro
Copy link
Contributor

filaPro commented Apr 26, 2024

Have you preprocessed s3dis data with this repo and not we the official mmdetection3d codebase?

@xiongcs
Copy link
Author

xiongcs commented Apr 26, 2024

Have you preprocessed s3dis data with this repo and not we the official mmdetection3d codebase?

Thank you for your reply, which inspired me. I really have a problem with preprocessing data.

@xiongcs xiongcs closed this as completed Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants