feat(qvae): unify SVI training entry aligning with QVAE interface (Fixes #172) #174
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.40) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 159 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.304
Real PR Conversation Timeline
1 comments
"Review active on #174"
general
weight: 0.35
aoright
Summary
Refactors QVAE training to introduce a unified SVI training entry aligning with
pyro.infer.SVIwithout adding heavy external dependencies, fulfilling all acceptance criteria of #172.Per review feedback from @ffiamz:
1. Split PRs: The Boltzmann Machine Ising bias scaling fix has been extracted into dedicated PR #389. This PR is strictly focused on the SVI training engine refactoring.
2. Interface Consistency:
Q_SVI(aliased asQSVI) has been integrated directly intosrc/kaiwu/torch_plugin/qvae.pyadhering toAutoEncoderBase/QVAEdesign conventions and Pyro SVI API semantics.src/kaiwu/torch_plugin/qvae_svi.pyre-exports it for modularity.Key Changes
Q_SVIinsrc/kaiwu/torch_plugin/qvae.pyprovidingstep(x)andevaluate_loss(x). Preserves the alternating two-stage optimization sequence (VAE parameters first, detachedq.detach()for BM optimizer second).backend='svi'|'legacy'switch toexample/qvae_mnistandexample/qvae_cell.tests/test_qvae_svi.pyand GitHub Actions smoke test.