Closed ckzhkmk closed 7 months ago
from .mask_matrix_nms import mask_matrix_nms
for sure should work fine, smth is wrong with your installation. Can i see the full log of this run?
from .mask_matrix_nms import mask_matrix_nms
for sure should work fine, smth is wrong with your installation. Can i see the full log of this run?
I used the Dockerfile for installation.And actually it is alost the full log
root@7a8decf9c284:/mnt/oneformer3d# python tools/test.py configs/oneformer3d_1xb2_s3dis-area-5.py \
work_dirs/oneformer3d_1xb2_s3dis-area-5.pth /opt/conda/lib/python3.10/site-packages/MinkowskiEngine/init.py:36: UserWarning: The environment variable
OMP_NUM_THREADS
not set. MinkowskiEngine will automatically setOMP_NUM_THREADS=16
. If you want to setOMP_NUM_THREADS
manually, please export it on the command line before running a python script. e.g.export OMP_NUM_THREADS=12; python your_program.py
. It is recommended to set it below 24. warnings.warn( Traceback (most recent call last): File "/mnt/oneformer3d/tools/test.py", line 149, inmain() File "/mnt/oneformer3d/tools/test.py", line 103, in main cfg = Config.fromfile(args.config) File "/opt/conda/lib/python3.10/site-packages/mmengine/config/config.py", line 178, in fromfile cfg_dict, cfg_text, env_variables = Config._file2dict( File "/opt/conda/lib/python3.10/site-packages/mmengine/config/config.py", line 522, in _file2dict eval(codeobj, global_locals_var, global_locals_var) File "", line 2, in File "/mnt/oneformer3d/oneformer3d/oneformer3d.py", line 10, in from .mask_matrix_nms import mask_matrix_nms ImportError: attempted relative import with no known parent package Exception ignored in: <function _TemporaryFileCloser.del at 0x7f920c87cca0> Traceback (most recent call last): File "/opt/conda/lib/python3.10/tempfile.py", line 450, in del self.close() File "/opt/conda/lib/python3.10/tempfile.py", line 446, in close unlink(self.name) FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpxkupznvh/tmpvcfhkk8u.py'
May be adding PYTHONPATH=./ python test.py ...
helps?
I've just built the docker image from scratch, git cloned this repo there, add PYTHONPATH, and everything is file.
No,it not works. I also met the same problem as #10 and #17,so I follow the advise to add from mmdet3d.registry import MODELS from oneformer3d import * MODELS.module_dict['S3DISOneFormer3D'] in the code and then it comes to the problem I post above.
So, the relative import problem is caused by this code modification? The code for sure should not be modified. This 3 lines example is just to figure out the previous problem...
So, the relative import problem is caused by this code modification? The code for sure should not be modified. This 3 lines example is just to figure out the previous problem...
But without the modification I will just get the same result as #10 and #17. Anyway thank you, maybe I should build the enivornment again.
So, the relative import problem is caused by this code modification? The code for sure should not be modified. This 3 lines example is just to figure out the previous problem...
So sorry to brother you again,I have rebuilt the enivornment and adding PYTHONPATH=./ python test.py ... looks like works there is no ImportError but still have some other errors the full log is bellow.How can i fix it?
OMP_NUM_THREADS
not set. MinkowskiEngine will automatically set OMP_NUM_THREADS=16
. If you want to set OMP_NUM_THREADS
manually, please export it on the command line before running a python script. e.g. export OMP_NUM_THREADS=12; python your_program.py
. It is recommended to set it below 24.
warnings.warn(
/opt/conda/lib/python3.10/site-packages/mmdet3d/evaluation/functional/kitti_utils/eval.py:10: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
def get_thresholds(scores: np.ndarray, num_gt, num_sample_pts=41):
/opt/conda/lib/python3.10/site-packages/torch/cuda/init.py:497: UserWarning: Can't initialize NVML
warnings.warn("Can't initialize NVML")
04/23 06:08:09 - mmengine - INFO -System environment: sys.platform: linux Python: 3.10.8 (main, Nov 4 2022, 13:48:29) [GCC 11.2.0] CUDA available: True numpy_random_seed: 1080071108 GPU 0: NVIDIA RTX A6000 CUDA_HOME: /opt/conda NVCC: Cuda compilation tools, release 11.6, V11.6.124 GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 PyTorch: 1.13.1 PyTorch compiling details: PyTorch built with:
Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.6, CUDNN_VERSION=8.3.2, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.13.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF,
TorchVision: 0.14.1 OpenCV: 4.7.0 MMEngine: 0.7.3
Traceback (most recent call last): File "/opt/conda/lib/python3.10/site-packages/yapf/pytree/pytree_utils.py", line 116, in ParseCodeToTree tree = parser_driver.parse_string(code, debug=False) File "/opt/conda/lib/python3.10/lib2to3/pgen2/driver.py", line 103, in parse_string return self.parse_tokens(tokens, debug) File "/opt/conda/lib/python3.10/lib2to3/pgen2/driver.py", line 71, in parse_tokens if p.addtoken(type, value, (prefix, start)): File "/opt/conda/lib/python3.10/lib2to3/pgen2/parse.py", line 119, in addtoken ilabel = self.classify(type, value, context) File "/opt/conda/lib/python3.10/lib2to3/pgen2/parse.py", line 175, in classify raise ParseError("bad token", type, value, context) lib2to3.pgen2.parse.ParseError: bad token: type=58, value='\x1b', context=('', (41, 7))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/conda/lib/python3.10/site-packages/yapf/pytree/pytree_utils.py", line 122, in ParseCodeToTree tree = parser_driver.parse_string(code, debug=False) File "/opt/conda/lib/python3.10/lib2to3/pgen2/driver.py", line 103, in parse_string return self.parse_tokens(tokens, debug) File "/opt/conda/lib/python3.10/lib2to3/pgen2/driver.py", line 71, in parse_tokens if p.addtoken(type, value, (prefix, start)): File "/opt/conda/lib/python3.10/lib2to3/pgen2/parse.py", line 119, in addtoken ilabel = self.classify(type, value, context) File "/opt/conda/lib/python3.10/lib2to3/pgen2/parse.py", line 175, in classify raise ParseError("bad token", type, value, context) lib2to3.pgen2.parse.ParseError: bad token: type=58, value='\x1b', context=('', (41, 7))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/yapf/yapflib/yapf_api.py", line 212, in FormatCode
tree = pytree_utils.ParseCodeToTree(unformatted_source)
File "/opt/conda/lib/python3.10/site-packages/yapf/pytree/pytree_utils.py", line 128, in ParseCodeToTree
raise e
File "/opt/conda/lib/python3.10/site-packages/yapf/pytree/pytree_utils.py", line 126, in ParseCodeToTree
ast.parse(code)
File "/opt/conda/lib/python3.10/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "
^
SyntaxError: invalid decimal literal
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/mnt/oneformer3d/tools/train.py", line 135, in
SyntaxError
is really strange. Did you make any modifications to our code?
SyntaxError
is really strange. Did you make any modifications to our code?
I made no modifications.
Even paths to files in the config? Looks like there is a syntax error in the s3dis config file, so yapf
can not parse it...
Even paths to files in the config? Looks like there is a syntax error in the s3dis config file, so
yapf
can not parse it...
I replace all the config file and it fixed. Maybe there are sonme modifications before and i forgot it.Sorry for brother you so many times. Thank you very much.
I have got some problems when train and test on dataset s3dis. I follow the instruction but i got error below when i run the command python tools/train.py configs/instance-only-oneformer3d_1xb2_scannet-and-structured3d.py and python tools/test.py configs/oneformer3d_1xb2_s3dis-area-5.py \ work_dirs/oneformer3d_1xb2_s3dis-area-5/epoch_512.pth.
And the error is like: Traceback (most recent call last): File "/mnt/oneformer3d/tools/test.py", line 149, in
main()
File "/mnt/oneformer3d/tools/test.py", line 103, in main
cfg = Config.fromfile(args.config)
File "/opt/conda/lib/python3.10/site-packages/mmengine/config/config.py", line 178, in fromfile
cfg_dict, cfg_text, env_variables = Config._file2dict(
File "/opt/conda/lib/python3.10/site-packages/mmengine/config/config.py", line 522, in _file2dict
eval(codeobj, global_locals_var, global_locals_var)
File "", line 2, in
File "/mnt/oneformer3d/oneformer3d/oneformer3d.py", line 10, in
from .mask_matrix_nms import mask_matrix_nms
ImportError: attempted relative import with no known parent package
Exception ignored in: <function _TemporaryFileCloser.del at 0x7f920c87cca0>
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/tempfile.py", line 450, in del
self.close()
File "/opt/conda/lib/python3.10/tempfile.py", line 446, in close
unlink(self.name)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpxkupznvh/tmpvcfhkk8u.py'
How can I fixed it?