Category: simplify · Severity: medium
Location: gpjax/variational_families.py:283-307 (+ :435-449, :599-622, :759-782)
Problem
The projection block in VariationalGaussian.predict (Lz⁻¹Kzt, Kzz⁻¹Kzt, Ktt − Q_tt + proj, add_jitter, wrap) is copy-pasted essentially verbatim into three more predicts (whitened, natural, expectation) — ~75 duplicated lines of numerics that can silently drift apart.
Recommendation
Extract one _sparse_predict(mu, sqrt, Lz, ...) helper shared by the families.
Filed from the 2026-07-02 GPJax codebase audit (medium tier). Companion spec for the high-severity items: plans/2026-07-02-audit-high-severity-remediation-design.md.
Category: simplify · Severity: medium
Location:
gpjax/variational_families.py:283-307 (+ :435-449, :599-622, :759-782)Problem
The projection block in
VariationalGaussian.predict(Lz⁻¹Kzt, Kzz⁻¹Kzt, Ktt − Q_tt + proj, add_jitter, wrap) is copy-pasted essentially verbatim into three more predicts (whitened, natural, expectation) — ~75 duplicated lines of numerics that can silently drift apart.Recommendation
Extract one
_sparse_predict(mu, sqrt, Lz, ...)helper shared by the families.Filed from the 2026-07-02 GPJax codebase audit (medium tier). Companion spec for the high-severity items:
plans/2026-07-02-audit-high-severity-remediation-design.md.