rapidsai / cuml

cuML - RAPIDS Machine Learning Library
https://docs.rapids.ai/api/cuml/stable/
Apache License 2.0
4.17k stars 527 forks source link

[BUG] KNeighborsClassifier will fail for non cuDF or numpy input #1643

Closed beckernick closed 4 years ago

beckernick commented 4 years ago

It look like when the KNN Classifier's predict calls down to https://github.com/rapidsai/cuml/blob/1b6f14183b660cf29229f321845515ef0b9d7fcd/python/cuml/neighbors/nearest_neighbors.pyx#L335-L341 ,

we will fail with a non-cuDF or numpy array input (i..e, CuPy or Numba devicearray). Since inds will not exist for the return statement, we'll throw an error.

dantegd commented 4 years ago

@beckernick thanks for raising this! This will be handled by adopting the new cuml array shim introduced in #1635 which will improve our output generation massively once it is merged and adopted anywhere. Is this algorithm a priority? If so can make it part of the first set of algorithms to change