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

When I use "python tools/train.py configs/instance-only-oneformer3d_1xb2_scannet-and-structured3d.py",it gives me an error #95

Open
yangke111 opened this issue Nov 25, 2024 · 3 comments

Comments

@yangke111
Copy link

我的报错信息如下:

11/25 16:48:43 - mmengine - INFO - Adafactor is already registered in optimizer at torch.optim. Registration ignored.
/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages/mmengine/optim/optimizer/zero_optimizer.py:11: DeprecationWarning: TorchScript support for functional optimizers is deprecated and will be removed in a future PyTorch release. Consider using the torch.compile optimizer instead.
from torch.distributed.optim import
/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages/spconv/pytorch/functional.py:47: FutureWarning: torch.cuda.amp.custom_fwd(args...) is deprecated. Please use torch.amp.custom_fwd(args..., device_type='cuda') instead.
_TORCH_CUSTOM_FWD = amp.custom_fwd(cast_inputs=torch.float16)
/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages/spconv/pytorch/functional.py:96: FutureWarning: torch.cuda.amp.custom_bwd(args...) is deprecated. Please use torch.amp.custom_bwd(args..., device_type='cuda') instead.
@_TORCH_CUSTOM_BWD
/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages/spconv/pytorch/functional.py:162: FutureWarning: torch.cuda.amp.custom_bwd(args...) is deprecated. Please use torch.amp.custom_bwd(args..., device_type='cuda') instead.
@_TORCH_CUSTOM_BWD
/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages/spconv/pytorch/functional.py:242: FutureWarning: torch.cuda.amp.custom_bwd(args...) is deprecated. Please use torch.amp.custom_bwd(args..., device_type='cuda') instead.
@_TORCH_CUSTOM_BWD
/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages/spconv/pytorch/functional.py:331: FutureWarning: torch.cuda.amp.custom_bwd(args...) is deprecated. Please use torch.amp.custom_bwd(args..., device_type='cuda') instead.
@_TORCH_CUSTOM_BWD
/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages/spconv/pytorch/functional.py:368: FutureWarning: torch.cuda.amp.custom_bwd(args...) is deprecated. Please use torch.amp.custom_bwd(args..., device_type='cuda') instead.
@_TORCH_CUSTOM_BWD
/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages/spconv/pytorch/functional.py:388: FutureWarning: torch.cuda.amp.custom_bwd(args...) is deprecated. Please use torch.amp.custom_bwd(args..., device_type='cuda') instead.
@_TORCH_CUSTOM_BWD
/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages/spconv/pytorch/functional.py:411: FutureWarning: torch.cuda.amp.custom_bwd(args...) is deprecated. Please use torch.amp.custom_bwd(args..., device_type='cuda') instead.
@_TORCH_CUSTOM_BWD
Traceback (most recent call last):
File "/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages/mmengine/utils/misc.py", line 77, in import_modules_from_strings
imported_tmp = import_module(imp)
^^^^^^^^^^^^^^^^^^
File "/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/y402/oneformer3d/oneformer3d/init.py", line 1, in
from .oneformer3d import (
File "/home/y402/oneformer3d/oneformer3d/oneformer3d.py", line 5, in
import MinkowskiEngine as ME
ModuleNotFoundError: No module named 'MinkowskiEngine'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages/mmengine/config/config.py", line 466, in fromfile
import_modules_from_strings(**cfg_dict['custom_imports'])
File "/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages/mmengine/utils/misc.py", line 84, in import_modules_from_strings
raise ImportError(f'Failed to import {imp}')
ImportError: Failed to import oneformer3d

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/y402/oneformer3d/tools/train.py", line 136, in
main()
File "/home/y402/oneformer3d/tools/train.py", line 68, in main
cfg = Config.fromfile(args.config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages/mmengine/config/config.py", line 478, in fromfile
raise ImportError(err_msg) from e
ImportError: Failed to import custom modules from {'imports': ['oneformer3d']}, the current sys.path is:
/home/y402/oneformer3d/tools
/home/y402/oneformer3d
/home/y402
/home/y402/anaconda3/envs/oneformer3d/lib/python311.zip
/home/y402/anaconda3/envs/oneformer3d/lib/python3.11
/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/lib-dynload
/home/y402/anaconda3/envs/oneformer3d/lib/python3.11/site-packages
/tmp/tmpkpeb67xi
You should set PYTHONPATH to make sys.path include the directory which contains your custom module

并且我使用了export PYTHONPATH=/path/to/directory,也没有效果,报同样的错误

@yangke111 yangke111 changed the title 当我使用"python tools/train.py configs/instance-only-oneformer3d_1xb2_scannet-and-structured3d.py"时,它报错了 When I use "python tools/train.py configs/instance-only-oneformer3d_1xb2_scannet-and-structured3d.py",it gives me an error Nov 25, 2024
@filaPro
Copy link
Owner

filaPro commented Nov 25, 2024

ModuleNotFoundError: No module named 'MinkowskiEngine'

did you install minkowskiengine?

@ImageKai
Copy link

I have same issue as above.

@chinagalaxy2002
Copy link

I have same issue as above.我有与上面相同的问题。
Did you solve the last error? It is the error related to the inability to import and syspath

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