Hi! Thanks for all the work on GPJax, I've been enjoying getting familiar over the last couple of weeks.
When you made the switch to Equinox, did you consider adopting the abstract/final pattern? Or maybe on a smaller scale, relying more on defining fields in eqx.Module instead of custom __init__s?
I have been working with kernels, and a few small things I've noticed:
- My type checker thinks that instantiating a kernel with
RBF() is missing parameters (eg. the compute_engine), since the defaults are provided by __init__ and not in the eqx.Module fields.
- Similarly, my typechecker things that
RBF(name="xyz") is valid, even though it raises an error.
- The
White kernel has a lengthscale, which is meaningless
- Looking at the code of
StationaryKernel.__init__, it is clear that it requires some effort to fight against the Equinox internals.
I think the downstream impact of all these things is minimal - I could definitely see the argument that this isn't worth the effort.
If you are interested, I'd be very happy to make a PR to propose some changes to kernels!
Hi! Thanks for all the work on GPJax, I've been enjoying getting familiar over the last couple of weeks.
When you made the switch to
Equinox, did you consider adopting the abstract/final pattern? Or maybe on a smaller scale, relying more on defining fields ineqx.Moduleinstead of custom__init__s?I have been working with kernels, and a few small things I've noticed:
RBF()is missing parameters (eg. the compute_engine), since the defaults are provided by__init__and not in theeqx.Modulefields.RBF(name="xyz")is valid, even though it raises an error.Whitekernel has alengthscale, which is meaninglessStationaryKernel.__init__, it is clear that it requires some effort to fight against the Equinox internals.I think the downstream impact of all these things is minimal - I could definitely see the argument that this isn't worth the effort.
If you are interested, I'd be very happy to make a PR to propose some changes to
kernels!