JuliaGaussianProcesses / KernelFunctions.jl

Julia package for kernel functions for machine learning
https://juliagaussianprocesses.github.io/KernelFunctions.jl/stable/
MIT License
267 stars 32 forks source link

show #307

Open willtebbutt opened 3 years ago

willtebbutt commented 3 years ago

i don't think we want to overload 2-arg show here, only the 3-arg plain-text method below.

The reason is that we probably want repr to return parseable code that recreates a NaiveLMMMOKernel (other kernels in this package seem to have overloaded 2-arg show to have non-parseable "pretty printing" output, which also seems a mistake to me)

And 3-arg show is what gets used in the repl, so probably all you want for pretty-printing.

(But my opinion here might be at adds with the currect practices of the package, so we can move this discussion to an issue if that's better)

_Originally posted by @nickrobinson251 in https://github.com/JuliaGaussianProcesses/KernelFunctions.jl/pull/304#discussion_r655375183_

willtebbutt commented 3 years ago

I'm opening this as this seems to be part of a larger discussion, and I don't want it to hold up #304 .

@devmotion pointed out that this is related to #244

devmotion commented 3 years ago

Yes, this is (or was, it might be a bit outdated now) solved by https://github.com/JuliaGaussianProcesses/KernelFunctions.jl/pull/244. However, IIRC there was no agreement on the more verbose output for nested kernels so the PR hasn't been merged.