NVIDIA / MinkowskiEngine

Minkowski Engine is an auto-diff neural network library for high-dimensional sparse tensors
https://nvidia.github.io/MinkowskiEngine
Other
2.43k stars 360 forks source link

return_maps_only arg in sparse_quantize #585

Open matteo-st opened 6 months ago

matteo-st commented 6 months ago

Describe the bug A clear and concise description of what the bug is.

The return_maps_only argument in sparse_quantize function does not seem to work as expected. If labels are used, the function return the tuple (discrete_coordinates[unique_map], features[unique_map], labels[unique_map], unique_map) but we expect just unique_map.


To Reproduce Steps to reproduce the behavior. If the code is not attached and cannot be reproduced easily, the bug report will be closed without any comments.

python -c "import MinkowskiEngine as ME;import numpy as np; coords = np.array([[1,2,3], [4,5,6]]); feats = np.array([[1,1,1], [2,2,2]]);labels = np.array([[1], [2]]); print(len(ME.utils.sparse_quantize( coords, feats, labels, return_index=True, return_maps_only=True, # This argument does not work as expected )))"


Expected behavior A clear and concise description of what you expected to happen.

We expect that the function returns only unique_map, not a tuple of length 4.


Desktop (please complete the following information):

python -c "import MinkowskiEngine as ME; ME.print_diagnostics()

" ==========System========== Linux-5.10.0-28-cloud-amd64-x86_64-with-glibc2.10 cat: /etc/lsb-release: No such file or directory 3.8.19 | packaged by conda-forge | (default, Mar 20 2024, 12:47:35) [GCC 12.3.0] ==========Pytorch========== 2.1.1 torch.cuda.is_available(): True ==========NVIDIA-SMI========== /usr/bin/nvidia-smi Driver Version 525.105.17 CUDA Version 12.0 VBIOS Version 90.04.A7.00.01 Image Version G183.0200.00.02 GSP Firmware Version 525.105.17 ==========NVCC========== /usr/local/cuda/bin/nvcc nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:33:58_PDT_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0 ==========CC========== /usr/bin/c++ c++ (Debian 10.2.1-6) 10.2.1 20210110 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

==========MinkowskiEngine========== 0.5.4 MinkowskiEngine compiled with CUDA Support: True NVCC version MinkowskiEngine is compiled: 11080 CUDART version MinkowskiEngine is compiled: 11080


Additional context Add any other context about the problem here.

Vanessa-F commented 5 months ago

Hi, how do you successfully installedMinkowski Engine ? I tried pip install, conda install and python local install and all failed. When using pip install, it shows ERROR: Could not build wheels for MinkowskiEngine, which is required to install pyproject.toml-based projects

EvgenyUgolkov commented 5 months ago

@Vanessa-F Hello! I have the same issue. Did you manage to solve it? If yes, could you tell me, what was the problem?