fix(rhat): subnormal floor, discriminating tolerance probes, corrected docstring (#39 follow-up) - #45
Conversation
- upper-tolerance probe: 1e-14 (~45 eps) instead of 1e-13 (~450 eps, which let a 16x looser tolerance pass); measured: 4x looser -> red, 2x -> green - (-1000.3, -1000.1) replaces (-1000.25, -999.5), which the old rule already caught - subnormal balanced chain (1e-315, 2e-315+5e-324) must be DEGENERATE_FOLDED Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hat_defined docstring Below the normal range eps*scale underflows to 0 while folding rounds by one ulp; the tolerance is now max(16 eps * scale, 16 * spacing(scale)), which is unchanged for normal numbers. The rhat_defined docstring wrongly said rhat is the bulk R-hat under DEGENERATE_FOLDED (reviewer: rhat = 1.0 in 234/400). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Independent round (Equalita role, same family) at 🤖 Generated with Claude Code |
Follow-up to #39 from its second delta review (P3 items; two of them are corrections of my own docstrings/tests).
Changes
8db2b7d: tolerance ×4 → the probe goes red, ×2 → stays green; the tolerance is pinned to a factor 2–4.(-1000.25, -999.5)was already caught by the old (location-blind) rule;(-1000.3, -1000.1)is not.(1e-315, 2e-315+5e-324)still reported OK/converged becauseeps*scaleunderflows to 0 while folding rounds by one ulp. The tolerance is nowmax(16·eps·scale, 16·spacing(scale))— unchanged for normal numbers.rhat_definedwrongly said that underDEGENERATE_FOLDEDrhat is the bulk R-hat; the reviewer measured rhat = 1.0 in 234/400 cases. Now:max(bulk, folded)with a non-meaningful folded component.Evidence (Windows, py3.12) at
d46e7688db2b7d, green after the fixtests/test_rhat.py tests/test_manifest.py tests/test_checkpoint.py: 49 passed, exit 0;ruff check+ruff format --checkcleandiskriminierung.pyrunDK-20260926T095204-ad146ec2860f(provenance VOLL): 4/4 — spacing floor, tolerance ×4, location term (new case), positive control🤖 Generated with Claude Code