umap.plot support for cuml.umap objects
See original GitHub issueHello! First of all thanks for this amazing package! I wanted to raise an issue that I know does not strictly involve this code base but that you may be able to help with:
I want to use the umap.plot
functions with cuml.UMAP
objects(I’ve already raised an issue on the cuml side. I know this may not concern but I thought you could perhaps help. As of now my code does not run if I pass a cuml.UMAP
object the same way it would if I pass it a umap.UMAP
object. If you have access to a GPU this code should not run for the cuml.UMAP
object:
import sklearn.datasets
import pandas as pd
import numpy as np
import umap
import cuml
import umap.plot
pendigits = sklearn.datasets.load_digits()
mapper = umap.UMAP().fit(pendigits.data)
umap.plot.points(mapper, labels = pendigits.target)
### Now cuml
mapper = cuml.UMAP().fit(pendigits.data)
umap.plot.points(mapper, labels = pendigits.target)
I am not able to paste the whole error log here because the GPU I have access to is from work and there is a firewall in my workplace that does not allow me to write issues or comments in GitHub. The main error I get goes something like:
'c' argument has 1797 elements, which is inconsistent with 'x' and 'y' with size 0
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
Thanks – that looks like a relatively easy fix. I will try to add a check and do the conversion if it is a CumlArray soon.
So I started to refactor things a little. I’ll add the CumlArray conversions once I figure out how to properly test for that.