MinkowskiEngine icon indicating copy to clipboard operation
MinkowskiEngine copied to clipboard

return_maps_only arg in sparse_quantize

Open matteo-st opened this issue 11 months ago • 2 comments

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.

  • Please complete all sections of this template if applicable. For installation, you must report the environment. Otherwise, your issue will be closed automatically.

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.

  • a minimally reproducible code.

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):

  • OS: Debian GNU/Linux 11 (bullseye)
  • Python version: 3.8
  • Pytorch version: 2.1.1
  • CUDA version: 11.8
  • NVIDIA Driver version: 12.0
  • Minkowski Engine version 0.5.4

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.

matteo-st avatar Mar 24 '24 15:03 matteo-st

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

Vanessa-F avatar Apr 04 '24 21:04 Vanessa-F

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

EvgenyUgolkov avatar Apr 15 '24 16:04 EvgenyUgolkov