cleanup: assert on flat _zscore, doc the nll floor, trim history comments

_zscore now asserts nonzero variance (a flat profile drew a degenerate all-zero
map that looked valid) instead of dividing by std+1e-9. _soft_nll docstring now
states the 1e-12 floor it actually applies (was 'Unbounded'). Trim archaeology
comments (guided/wvs/read_api) to the invariant, dropping the dated model names.

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
wassname
2026-07-05 08:25:28 +08:00
co-authored by Claudypoo
parent 599b8528d3
commit b2e631132c
5 changed files with 14 additions and 10 deletions
+2 -2
View File
@@ -169,8 +169,8 @@ def main() -> None:
for k, v in cache.items()}
def save_cache() -> None:
"""Persist after EACH model so a killed run (session teardown) keeps finished models -- the
write-once-at-end version silently discarded every sampled model when interrupted."""
"""Persist after EACH model so a killed run (session teardown) keeps every finished model
(kill-safe incremental write, not write-once-at-end)."""
allc = json.loads(cpath.read_text()) if cpath.exists() else {}
allc[sig] = {k: {s: p.tolist() for s, p in v.items()} for k, v in vecs.items()}
cpath.write_text(json.dumps(allc))