getkeops / keops

KErnel OPerationS, on CPUs and GPUs, with autodiff and without memory overflows
https://www.kernel-operations.io
MIT License
1.03k stars 65 forks source link

KeOps always gives a warning "keyword argument dtype in Genred is deprecated ; argument is ignored." #240

Open qinzheng93 opened 2 years ago

qinzheng93 commented 2 years ago

I am implementing kNN with KeOps but always get the following warning:

[pyKeOps] Warning : keyword argument dtype in Genred is deprecated ; argument is ignored.

But I didn't pass a dtype argument in my code:

def keops_knn(k, dimension=3):
    xi = Vi(0, dimension)
    xj = Vj(1, dimension)
    dij = (xi - xj).norm2()
    knn_func = dij.Kmin_argKmin(k, dim=1)
    return knn_func

knn_func = keops_knn(k, dimension=3)
knn_distances, knn_indices = knn_func(q_points, s_points)

How should I get rid of the warning message?

joanglaunes commented 2 years ago

Hello @qinzheng93 , This warning was issued because some part of the code in the LazyTensor class was not properly updated when we released the v2.0. This is now fixed in the main branch.