Skip to content

Conversation

@cweniger
Copy link
Owner

Summary

  • Add test_01_minimal_posterior_quality to verify inference actually learns
  • Test trains 01_minimal for 150 epochs with GPU
  • Samples 1000 posterior samples and checks posterior std < prior_std/10
  • Catches gross inference failures (prior-like posteriors) while allowing imperfect convergence

Details

The test uses a lenient check: posterior std must be at least 10x narrower than prior std (~5.77 vs ~57.7 for U(-100,100) prior). The expected posterior std is ~0.1 (the noise level), but with limited training we may not fully converge.

Marked with @pytest.mark.slow and @pytest.mark.gpu - requires GPU for training and sampling.

Test plan

  • Test passes locally with GPU
  • Runtime ~7 minutes

🤖 Generated with Claude Code

New test that verifies the learned posterior is significantly narrower
than the prior, catching gross inference failures while allowing for
imperfect convergence in limited test runtime.

The test:
- Trains 01_minimal for 150 epochs with GPU
- Samples 1000 posterior samples
- Checks posterior std < prior_std/10 (~5.77 vs ~57.7)

Marked with @pytest.mark.slow and @pytest.mark.gpu.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants