MIC-DKFZ / nnDetection

nnDetection is a self-configuring framework for 3D (volumetric) medical object detection which can be applied to new data sets without manual intervention. It includes guides for 12 data sets that were used to develop and evaluate the performance of the proposed method.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

error during nndet installation using "pip install -e ." Got following error log

DSRajesh opened this issue · comments

details of the machine are here:

----- PyTorch Information -----
PyTorch Version: 2.0.0+cu117
PyTorch Debug: False
PyTorch CUDA: 11.7
PyTorch Backend cudnn: 8500
PyTorch CUDA Arch List: ['sm_37', 'sm_50', 'sm_60', 'sm_70', 'sm_75', 'sm_80', 'sm_86']
PyTorch Current Device Capability: (8, 9)
PyTorch CUDA available: True

----- System Information -----
System NVCC: nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0

System Arch List: None
System OMP_NUM_THREADS: None
System CUDA_HOME is None: True
System CPU Count: 24
Python Version: 3.10.6 (main, Mar 10 2023, 10:55:28) [GCC 11.3.0]

----- nnDetection Information -----
det_num_threads None
det_data is set True
det_models is set True

and the error log is as follows:

Requirement already satisfied: pyasn1>=0.1.3 in /usr/lib/python3/dist-packages (from rsa<5,>=3.1.4->google-auth<3,>=1.6.3->tensorboard>=2.2.0->pytorch_lightning<=1.4.2,>=1.3.1->nndet==0.1) (0.4.8)
Installing collected packages: argparse, nndet
Attempting uninstall: nndet
Found existing installation: nndet 0.1
Uninstalling nndet-0.1:
Successfully uninstalled nndet-0.1
Running setup.py develop for nndet
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [60 lines of output]
    /usr/lib/python3/dist-packages/setuptools/dist.py:493: UserWarning: Normalizing 'v0.1' to '0.1'
      warnings.warn(tmpl.format(**locals()))
    Build csrc
    Building with sys.version_info(major=3, minor=10, micro=6, releaselevel='final', serial=0)
    main_file [PosixPath('/data4/nnDetection3/nndet/csrc/ops.cpp')]
    source_cpu []
    source_cuda [PosixPath('/data4/nnDetection3/nndet/csrc/cuda/nms.cu')]
    Adding CUDA csrc to build
    CUDA ARCH None
    running develop
    /usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
      warnings.warn(
    /usr/lib/python3/dist-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
      warnings.warn(
    running egg_info
    writing nndet.egg-info/PKG-INFO
    writing dependency_links to nndet.egg-info/dependency_links.txt
    writing entry points to nndet.egg-info/entry_points.txt
    writing requirements to nndet.egg-info/requires.txt
    writing top-level names to nndet.egg-info/top_level.txt
    /home/vayu/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
      warnings.warn(msg.format('we could not find ninja.'))
    reading manifest file 'nndet.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'LICENSE'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '__pycache__' found anywhere in distribution
    writing manifest file 'nndet.egg-info/SOURCES.txt'
    running build_ext
    /home/vayu/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py:388: UserWarning: The detected CUDA version (11.5) has a minor version mismatch with the version that was used to compile PyTorch (11.7). Most likely this shouldn't be a problem.
      warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
    building 'nndet._C' extension
    /usr/bin/nvcc -DWITH_CUDA -I/data4/nnDetection3/nndet/csrc -I/home/vayu/.local/lib/python3.10/site-packages/torch/include -I/home/vayu/.local/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/vayu/.local/lib/python3.10/site-packages/torch/include/TH -I/home/vayu/.local/lib/python3.10/site-packages/torch/include/THC -I/usr/include/python3.10 -c /data4/nnDetection3/nndet/csrc/cuda/nms.cu -o build/temp.linux-x86_64-3.10/data4/nnDetection3/nndet/csrc/cuda/nms.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++17
    /home/vayu/.local/lib/python3.10/site-packages/torch/include/c10/util/irange.h(54): warning #186-D: pointless comparison of unsigned integer with zero
              detected during:
                instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, <unnamed>>::operator==(const c10::detail::integer_iterator<I, one_sided, <unnamed>> &) const [with I=size_t, one_sided=false, <unnamed>=0]"
    (61): here
                instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, <unnamed>>::operator!=(const c10::detail::integer_iterator<I, one_sided, <unnamed>> &) const [with I=size_t, one_sided=false, <unnamed>=0]"
    /home/vayu/.local/lib/python3.10/site-packages/torch/include/c10/core/TensorImpl.h(77): here

    /home/vayu/.local/lib/python3.10/site-packages/torch/include/c10/util/irange.h(54): warning #186-D: pointless comparison of unsigned integer with zero
              detected during:
                instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, <unnamed>>::operator==(const c10::detail::integer_iterator<I, one_sided, <unnamed>> &) const [with I=std::size_t, one_sided=true, <unnamed>=0]"
    (61): here
                instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, <unnamed>>::operator!=(const c10::detail::integer_iterator<I, one_sided, <unnamed>> &) const [with I=std::size_t, one_sided=true, <unnamed>=0]"
    /home/vayu/.local/lib/python3.10/site-packages/torch/include/ATen/core/qualified_name.h(73): here

    /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
      435 |         function(_Functor&& __f)
          |                                                                                                                                                 ^
    /usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
    /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
      530 |         operator=(_Functor&& __f)
          |                                                                                                                                                  ^
    /usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
    error: command '/usr/bin/nvcc' failed with exit code 1
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

Rolling back uninstall of nndet
Moving to /home/vayu/.local/bin/nndet_boxes2nii
from /tmp/pip-uninstall-77qzc2eq/nndet_boxes2nii
Moving to /home/vayu/.local/bin/nndet_cls2fg
from /tmp/pip-uninstall-77qzc2eq/nndet_cls2fg
Moving to /home/vayu/.local/bin/nndet_consolidate
from /tmp/pip-uninstall-77qzc2eq/nndet_consolidate
Moving to /home/vayu/.local/bin/nndet_env
from /tmp/pip-uninstall-77qzc2eq/nndet_env
Moving to /home/vayu/.local/bin/nndet_eval
from /tmp/pip-uninstall-77qzc2eq/nndet_eval
Moving to /home/vayu/.local/bin/nndet_example
from /tmp/pip-uninstall-77qzc2eq/nndet_example
Moving to /home/vayu/.local/bin/nndet_predict
from /tmp/pip-uninstall-77qzc2eq/nndet_predict
Moving to /home/vayu/.local/bin/nndet_prep
from /tmp/pip-uninstall-77qzc2eq/nndet_prep
Moving to /home/vayu/.local/bin/nndet_searchpath
from /tmp/pip-uninstall-77qzc2eq/nndet_searchpath
Moving to /home/vayu/.local/bin/nndet_seg2det
from /tmp/pip-uninstall-77qzc2eq/nndet_seg2det
Moving to /home/vayu/.local/bin/nndet_seg2nii
from /tmp/pip-uninstall-77qzc2eq/nndet_seg2nii
Moving to /home/vayu/.local/bin/nndet_sweep
from /tmp/pip-uninstall-77qzc2eq/nndet_sweep
Moving to /home/vayu/.local/bin/nndet_train
from /tmp/pip-uninstall-77qzc2eq/nndet_train
Moving to /home/vayu/.local/bin/nndet_unpack
from /tmp/pip-uninstall-77qzc2eq/nndet_unpack
Moving to /home/vayu/.local/lib/python3.10/site-packages/nndet.egg-link
from /tmp/pip-uninstall-a4rgjlrj/nndet.egg-link
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [60 lines of output]
/usr/lib/python3/dist-packages/setuptools/dist.py:493: UserWarning: Normalizing 'v0.1' to '0.1'
warnings.warn(tmpl.format(**locals()))
Build csrc
Building with sys.version_info(major=3, minor=10, micro=6, releaselevel='final', serial=0)
main_file [PosixPath('/data4/nnDetection3/nndet/csrc/ops.cpp')]
source_cpu []
source_cuda [PosixPath('/data4/nnDetection3/nndet/csrc/cuda/nms.cu')]
Adding CUDA csrc to build
CUDA ARCH None
running develop
/usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 1.1build1 is an invalid version and will not be supported in a future release
warnings.warn(
/usr/lib/python3/dist-packages/pkg_resources/init.py:116: PkgResourcesDeprecationWarning: 0.1.43ubuntu1 is an invalid version and will not be supported in a future release
warnings.warn(
running egg_info
writing nndet.egg-info/PKG-INFO
writing dependency_links to nndet.egg-info/dependency_links.txt
writing entry points to nndet.egg-info/entry_points.txt
writing requirements to nndet.egg-info/requires.txt
writing top-level names to nndet.egg-info/top_level.txt
/home/vayu/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'nndet.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'LICENSE'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching 'pycache' found anywhere in distribution
writing manifest file 'nndet.egg-info/SOURCES.txt'
running build_ext
/home/vayu/.local/lib/python3.10/site-packages/torch/utils/cpp_extension.py:388: UserWarning: The detected CUDA version (11.5) has a minor version mismatch with the version that was used to compile PyTorch (11.7). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'nndet.C' extension
/usr/bin/nvcc -DWITH_CUDA -I/data4/nnDetection3/nndet/csrc -I/home/vayu/.local/lib/python3.10/site-packages/torch/include -I/home/vayu/.local/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/vayu/.local/lib/python3.10/site-packages/torch/include/TH -I/home/vayu/.local/lib/python3.10/site-packages/torch/include/THC -I/usr/include/python3.10 -c /data4/nnDetection3/nndet/csrc/cuda/nms.cu -o build/temp.linux-x86_64-3.10/data4/nnDetection3/nndet/csrc/cuda/nms.o -D__CUDA_NO_HALF_OPERATORS
_ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++17
/home/vayu/.local/lib/python3.10/site-packages/torch/include/c10/util/irange.h(54): warning #186-D: pointless comparison of unsigned integer with zero
detected during:
instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, >::operator==(const c10::detail::integer_iterator<I, one_sided, > &) const [with I=size_t, one_sided=false, =0]"
(61): here
instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, >::operator!=(const c10::detail::integer_iterator<I, one_sided, > &) const [with I=size_t, one_sided=false, =0]"
/home/vayu/.local/lib/python3.10/site-packages/torch/include/c10/core/TensorImpl.h(77): here

/home/vayu/.local/lib/python3.10/site-packages/torch/include/c10/util/irange.h(54): warning #186-D: pointless comparison of unsigned integer with zero
          detected during:
            instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, <unnamed>>::operator==(const c10::detail::integer_iterator<I, one_sided, <unnamed>> &) const [with I=std::size_t, one_sided=true, <unnamed>=0]"
(61): here
            instantiation of "__nv_bool c10::detail::integer_iterator<I, one_sided, <unnamed>>::operator!=(const c10::detail::integer_iterator<I, one_sided, <unnamed>> &) const [with I=std::size_t, one_sided=true, <unnamed>=0]"
/home/vayu/.local/lib/python3.10/site-packages/torch/include/ATen/core/qualified_name.h(73): here

/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^
/usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^
/usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
error: command '/usr/bin/nvcc' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

Any help is highly appreciated

Rajesh

I didn't perform exhaustive testing with pytorch 2.0 and there are some changes which are not added in the master branch yet. Can you remove the build folder and rerun the installation with pytorch 1.13?

Is there a working branch for pytorch 2.0 ?

Hi @kretes , thanks for the PRs :) There is no pytorch 2.0 branch right now, we are currently working on the next release of nnDetection which will include several changes and thus we will provide a pytorch 2.0 compatible for that release.