mirror of
https://github.com/wassname/moral-maps.git
synced 2026-09-11 12:20:38 +08:00
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:
+2
-2
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user