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

Error while running train_SemanticKITTI.py #30

Open
bymbhaskar opened this issue Mar 1, 2021 · 9 comments
Open

Error while running train_SemanticKITTI.py #30

bymbhaskar opened this issue Mar 1, 2021 · 9 comments

Comments

@bymbhaskar
Copy link

Error log:

python train_SemanticKITTI.py
train_SemanticKITTI.py
Namespace(check_iter=4000, data_dir='data', grid_size=[480, 360, 32], model='polar', model_save_path='./SemKITTI_PolarSeg.pt', train_batch_size=2, val_batch_size=2)
0%| | 0/9565 [00:00<?, ?it/s]Traceback (most recent call last):
File "train_SemanticKITTI.py", line 197, in
main(args)
File "train_SemanticKITTI.py", line 107, in main
for i_iter,(,train_vox_label,train_grid,,train_pt_fea) in enumerate(train_dataset_loader):
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in next
data = self._next_data()
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1085, in _next_data
return self._process_data(data)
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1111, in process_data
data.reraise()
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils.py", line 428, in reraise
raise self.exc_type(msg)
TypeError: Caught TypeError in DataLoader worker process 0.python train_SemanticKITTI.py
train_SemanticKITTI.py
Namespace(check_iter=4000, data_dir='data', grid_size=[480, 360, 32], model='polar', model_save_path='./SemKITTI_PolarSeg.pt', train_batch_size=2, val_batch_size=2)
0%| | 0/9565 [00:00<?, ?it/s]Traceback (most recent call last):
File "train_SemanticKITTI.py", line 197, in
main(args)
File "train_SemanticKITTI.py", line 107, in main
for i_iter,(
,train_vox_label,train_grid,
,train_pt_fea) in enumerate(train_dataset_loader):
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in next
data = self._next_data()
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1085, in _next_data
return self._process_data(data)
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1111, in _process_data
data.reraise()
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/_utils.py", line 428, in reraise
raise self.exc_type(msg)
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 198, in _worker_loop
data = fetcher.fetch(index)
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/lidar/bhaskar/PolarSeg/dataloader/dataset.py", line 238, in getitem
processed_label = nb_process_label(np.copy(processed_label),label_voxel_pair)
TypeError: expected dtype object, got 'numpy.dtype[uint8]'

0%| | 0/9565 [00:01<?, ?it/s]

Original Traceback (most recent call last):
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 198, in _worker_loop
data = fetcher.fetch(index)
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/lidar/bhaskar/PolarSeg/dataloader/dataset.py", line 238, in getitem
processed_label = nb_process_label(np.copy(processed_label),label_voxel_pair)
TypeError: expected dtype object, got 'numpy.dtype[uint8]'

0%| | 0/9565 [00:01<?, ?it/s]

@edwardzhou130
Copy link
Owner

Looks like a numba problem. Maybe switch to another numba version will fix it?

@bymbhaskar
Copy link
Author

I downgraded the numba version to 0.39.0 (tried with 0.40.0). Now following error is coming:

python train_SemanticKITTI.py
Traceback (most recent call last):
File "train_SemanticKITTI.py", line 13, in
from network.ptBEV import ptBEVnet
File "/home/lidar/bhaskar/PolarSeg/network/ptBEV.py", line 155, in
@nb.jit('b1:',nopython=True,cache=True)
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/numba/decorators.py", line 189, in wrapper
**dispatcher_args)
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/numba/dispatcher.py", line 537, in init
self.targetctx = self.targetdescr.target_context
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/numba/targets/registry.py", line 54, in target_context
return self._toplevel_target_context
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/numba/utils.py", line 283, in get
res = instance.dict[self.name] = self.func(instance)
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/numba/targets/registry.py", line 38, in _toplevel_target_context
return cpu.CPUContext(self.typing_context)
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/numba/targets/base.py", line 247, in init
self.init()
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/numba/targets/cpu.py", line 42, in init
self._internal_codegen = codegen.JITCPUCodegen("numba.exec")
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/numba/targets/codegen.py", line 601, in init
self._init(self._llvm_module)
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/numba/targets/codegen.py", line 610, in _init
tm = target.create_target_machine(**tm_options)
TypeError: create_target_machine() got an unexpected keyword argument 'jitdebug'

@edwardzhou130
Copy link
Owner

This error comes from the llvmlite package. You can try this fix first: rapidsai/cuml#2389.
If it does not work either, you can use the same version in my environment:

numpy 1.18.2
numba 0.39.0
llvmlite 0.24.0

@bymbhaskar
Copy link
Author

I downgraded the llvmlite to

Now following error is coming:

python train_SemanticKITTI.py
train_SemanticKITTI.py
Namespace(check_iter=4000, data_dir='data', grid_size=[480, 360, 32], model='polar', model_save_path='./SemKITTI_PolarSeg.pt', train_batch_size=2, val_batch_size=2)
0%| | 0/9565 [00:00<?, ?it/s]Traceback (most recent call last):
File "train_SemanticKITTI.py", line 197, in
main(args)
File "train_SemanticKITTI.py", line 107, in main
for i_iter,(,train_vox_label,train_grid,,train_pt_fea) in enumerate(train_dataset_loader):
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in next
data = self._next_data()
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1085, in _next_data
return self._process_data(data)
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1111, in _process_data
data.reraise()
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/_utils.py", line 428, in reraise
raise self.exc_type(msg)
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 198, in _worker_loop
data = fetcher.fetch(index)
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/lidar/bhaskar/polarenv/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/lidar/bhaskar/PolarSeg/dataloader/dataset.py", line 239, in getitem
processed_label = nb_process_label(np.copy(processed_label),label_voxel_pair)
TypeError: expected dtype object, got 'numpy.dtype[uint8]'

0%|

@bymbhaskar
Copy link
Author

I tried the version specified by you
numpy 1.18.2
numba 0.39.0
llvmlite 0.24.0

now its showing

python train_SemanticKITTI.py
Segmentation fault (core dumped)

@bymbhaskar
Copy link
Author

I found that error is coming in importing that is :

from network.ptBEV import ptBEVnet

is this required if I want to work on KITTI only?

@edwardzhou130
Copy link
Owner

Yes, it is required. It's the feature encoder in our model.

@wfs123456
Copy link

Segmentation fault (core dumped)

Segmentation fault (core dumped),
Hello, how to fix this error, hope to your reply, thanks!

@Sylva-Lin
Copy link

Segmentation fault (core dumped)

Segmentation fault (core dumped), Hello, how to fix this error, hope to your reply, thanks!

Hello, I also met this problem, how to fix this error, hope to your reply, thanks!

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

4 participants