LLVM-Error when using mahalanobis metric with larger datasets
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.3k
- Forks
- 871
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 5
Description
Hello!
First: Thanks for this splendid project! It's looking great, especially the semi-supervised part.
When I try to use Mahalanobis-distances with larger datasets, so the < 4000 codepath is not taken, I get an LLVM IR parsing failure. The other codepath works just fine.
Steps to reproduce:
Version: umap-learn-0.3.2
import numpy as np
from umap import UMAP
matrix = np.random.rand(5000,50)
umap = UMAP(n_components=2, n_neighbors=30, metric='mahalanobis', metric_kwds={'V': np.eye(50)})
umap_model = umap.fit_transform(matrix)
Resulting in
Failed at nopython (nopython mode backend)
LLVM IR parsing error
<string>:1121:137: error: invalid use of function-local name
%".786" = extractvalue [1 x {i8*, i8*, i64, i64, double*, [2 x i64], [2 x i64]}] [{i8*, i8*, i64, i64, double*, [2 x i64], [2 x i64]} %".785"], 0
Full stracktrace (redacted for brevity) here:
https://gist.github.com/johanbev/1918108e65f014600b2e44affcc35fee
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reported umap-learn 0.3.2 reproduction with a 5000x50 NumPy matrix and Mahalanobis metric, then compare it with the smaller-dataset path. Use the linked full stacktrace to locate the failing nopython/LLVM path; done means the larger-dataset case completes without an LLVM IR parsing failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100