InducingVariables API design: structured solve interface for Points, VFF, and Spherical Harmonics
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- python
- Domain
- backend-api-design, machine-learning
Research direction
Start in ptgp/inducing.py and trace how SVGP dispatches through InducingVariables. Compare Points and FourierFeatures1D, including their Kuu structures, solve methods, domain checks, and initialization utilities. Done means the API boundaries, subclass ownership, and treatment of Points attributes are decided clearly enough to guide future spherical-harmonics work.
Written by the indexing model from the issue text.
Description
With VFF landing in #3 and spherical harmonics (Dutordoir et al. 2020) planned, we need to settle the InducingVariables abstraction.
Current interface
SVGP dispatches through the inducing variable, which implements:
K_uu(kernel)— dense Kuu (for compatibility/debugging)K_uf(kernel, X)— cross-covariance between inducing variables and dataKuu_solve(kernel, rhs)— Kuu^{-1} @ rhsKuu_sqrt_solve(kernel, rhs)— R^{-1} @ rhs where R @ R.T = KuuKuu_logdet(kernel)— log determinant of Kuu
The base class provides dense defaults for the solve/sqrt_solve/logdet methods. Subclasses override with structured implementations.
Subclasses and their Kuu structure
| Subclass | Kuu structure | Solve strategy |
|---|---|---|
Points |
Dense (M, M) | Dense defaults (no override needed) |
FourierFeatures1D |
diag + low-rank | Woodbury identity |
| Spherical Harmonics (future) | Diagonal | Elementwise division |
None of the structured subclasses have a .Z attribute. Points does.
Initialization and validation are subclass-specific
greedy_variance_init, kmeans_init, and random_subsample_init are specific to Points. They select locations in input space, which doesn't apply to spectral methods. VFF is configured by domain bounds and frequency count, SH by truncation level. These should stay separate from the base interface.
Domain validation (_domain_check) is also subclass-specific. VFF needs to check that inputs fall within [a, b]. SH may need to check that inputs are on the sphere. Points doesn't need any check.
Open questions
- Is
.ZaPoints-only attribute, or should there be a base-class method for "give me something plottable/inspectable" that other subclasses can implement differently? - Should
_domain_checkbe a formal optional method on the base class, or stay informal (hasattrdispatch)? - Where should initialization utilities live and be organized?
greedy_variance_init,kmeans_init, andrandom_subsample_initare currently inptgp/inducing.pyalongside the base class, but they'rePoints-specific. VFF and SH will have their own initialization patterns (from_data, frequency/truncation config). Should each subclass module own its init utilities, or should there be a sharedptgp/init/namespace? These utilities also need to be accessible to Claude Code skills files for VFF and SH workflows. - Does
Pointsactually needK_uu,K_uf, and the solve/sqrt_solve/logdet methods? Before VFF,Pointsjust held.Zand SVGP calledkernel(Z)directly. The new methods onPointsare thin wrappers (K_uucallskernel(self.Z),K_ufcallskernel(self.Z, X)). Is that indirection worth it for API consistency, or shouldPointsstay simple and SVGP only dispatch through the structured methods when the inducing variable isn'tPoints?
- Dominant language
- Jupyter Notebook
- Stars
- 16
- Forks
- 5
- Avg merge
- 2d 49m
- Merged PRs (30d)
- 6
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pymc-devs/ptgp
-
Difficulty 5/5 Over a week Newbie friendliness 22/100
-
Expose and document VGP variational parameters for fit diagnosticsPossibly taken @bwengals claimed this 58 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Add VGP: variational Gaussian inference for non-Gaussian likelihoods without inducing pointsPossibly taken @bwengals claimed this 156 days ago. Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
pymc
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
cloudflare/realtimekit-ui#219 ·
Maintainers usually reply within 1 day
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[cloud_functions]: Apple platforms ignore custom domains passed as regionPossibly taken @ragavendranbala-TSL claimed this today. OpenNeeds Attention platform: ios platform: macos plugin: functions type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
firebase/flutterfire#19015 · 2 comments ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
brave/brave-browser#62239 ·
Maintainers usually reply within 1 day