Closed gdurif closed 1 year ago
@gdurif, going from R data to Numpy arrays seems to work. I also reproduced this example with R data to Torch tensors and the idea is the same.
@AmelieVernay that's great!
From there, we can do the following:
keops_kernel()
and keops_grad()
functions to call pykeops.numpy.Genred()
or pykeops.torch.Genred()
(depending on an argument)pykeops
vs reticulate pykeops
on R data @gdurif, calling pykeops.numpy.Genred()
from keops_kernel()
works well, I provided a minimal example in eg_GaussianRBF.R
with a comparison with pykeops only. I am not sure it is useful to let RKeOps users choose between pykeops.numpy.Genred()
and pykeops.torch.Genred()
, what would be the benefit?
About gradients, it is ok to compute gradients based on formulae like Grad(formula ,variable_to_differentiate, input_of_the_gradient)
(see here) but I had trouble with the keops_grad()
syntax like in the second example here because the new variable at which the gradient is computed is not given in args
and pykeops does not handle this (as far as I know). We could add it inside keops_kernel()
but It would mean inferring the type
(Vi
, Vj
...) and the inner_dim
.
Maybe you have an idea?
Merged into main. CI error related to lint error outside rkeops.
Switch from the old keops engine based on C++/Cmake to the new
keopscore
framework based on a meta-programming engine.Implementation : directly use
PyKeOps
throughreticulate
to avoid maintaining two different binders for Python and RTODOs
PyKeOps
from R throughreticulate
PyKeOps
from R throughreticulate
with R dataPyKeOps
management insideRKeOps
withreticualte
keops_kernel()
andkeops_grad()
functions.Rbuildignore
file)Note: WIP (not ready to merge)
See also TODOs.md
Edit (2023-03-31): ready to merge