lmcinnes / lmcinnes/umap

Basic example hangs in 0.4dev

Open
#336 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.3k
Forks
871
Avg merge
1d 13h
Merged PRs (30d)
5

Description

The basic example in the README hangs when using UMAP from the master or 0.4dev branch.

```python
import umap
from sklearn.datasets import load_digits

digits = load_digits()

embedding = umap.UMAP().fit_transform(digits.data)
```

If I do

```
pip install umap-learn
```

then the code works as expected (taking only 5-10 seconds). However, it hangs when using a version of UMAP built from the 0.4dev branch or master. It looks like it is doing *something* since I see the message

```
/home/gclenden/anaconda3/envs/umap_debug/lib/python3.7/site-packages/umap/spectral.py:243: UserWarning: Embedding a total of 2 separate connected components using meta-embedding (experimental)
n_components
```

I think the commit where this occurs is https://github.com/lmcinnes/umap/commit/eb6774056aa5fc8a858d466eaba4a1cb35c978ae. It works as expected on the commit prior to that one https://github.com/lmcinnes/umap/commit/c26bc8dac3e8fc71a4221986cf3cf0926b573766. However, I don't know enough about numba/tbb to explain why this might be happening.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the README basic example and compare the changes between commits c26bc8dac3e8fc71a4221986cf3cf0926b573766 and eb6774056aa5fc8a858d466eaba4a1cb35c978ae. Inspect the spectral.py path shown in the warning and run the example against the affected branch. Done means the example completes rather than hanging, with behavior comparable to the released version.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.