cornellius-gp / linear_operator

A LinearOperator implementation to wrap the numerical nuts and bolts of GPyTorch
MIT License
95 stars 28 forks source link

Removing `evaluate_kernel` #15

Open SebastianAment opened 2 years ago

SebastianAment commented 2 years ago

This PR aims at removing evaluate_kernel from the linear_operator package. This was already suggested in a comment in the code and makes sense since -- as far as I can tell -- it is a no-op for all operators in this package.

The main question at this point seems to be if additional changes are required in GPyTorch, which defines LazyEvaluatedKernelTensor and should therefore take care of any of its implementation specifics.

Balandat commented 2 years ago

As to the changes here, they look good in isolation.

jacobrgardner commented 2 years ago

I just want to be careful about making sure these don't get used. The problem these lines of code originally solved is that, with the current lazy kernel evaluation design, ALL covariance matrices are LazyEvaluatedKernelTensors until we evaluate the kernel, so if we need to type check the kind of linear operator we get out of a Kernel call we can't do that until the kernel has been evaluated

gpleiss commented 2 years ago

It would be great if we could remove this, but I agree with Jake that we want to be extra careful :)