dask / dask/dask-image

Memory error using dask-image ndmeasure.label

Open
#391 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
226
Forks
56
PR merge metrics
No merged PRs in 30d

Description

I am obtaining an OOM error when using ndmeasure.label with a large array.

**Minimal Complete Verifiable Example**:

```python
nx = 5120 # things are OK < 2500
arr = da.random.random(size=(nx,nx,nx))
darr_bin = arr > 0.8
# The next line will fail
label_image, num_labels = dask_image.ndmeasure.label(darr_bin)
```
Note that this problem occurs already in the last line, and not when executing the computation via, e.g., `num_labels.compute()`.
This also means that I have the same problem when using a (large) cluster as the OOM always occurs on node 1.

**Environment**:
[I could reproduce this problem on several machines, below is one particular environment]
- Dask version: 2024.9.1
- Python version: Python 3.12.6
- Operating System: Mac OS 12.2
- Install method (conda, pip, source): conda / mamba

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.