BurnyCoder's picture
Publish matched baseline findings in the README and paper
4651367 verified
Raw History Blame Contribute Delete
1.18 kB
"""The public comparison distinguishes a better checkpoint from a useful scratchpad."""
from novel_tokens.reporting import baseline_overview
def test_frozen_advantage_and_donor_intervention_use_different_intervals():
stage = "transfer-gsm"
novel = dict(id="cups-symbols-17", arm="symbols", stage=stage, seed=17, accuracy=.45,
donor_accuracy=.44, delta=.01, ci=[-.02, .04], conditions={"direct": .50},
sampled={"donor_answer_changes": 8})
text = dict(id="cups-text-17", arm="text", stage=stage, seed=17, accuracy=.30)
pair = dict(first=novel["id"], second=text["id"], stage=stage, n=100,
difference=.15, ci=[.07, .23])
assert baseline_overview([novel], [pair]) == ([], {})
findings, scores = baseline_overview([novel, text], [pair])
title, details = findings[0]
assert "favored novel tokens" in title
assert "cause of the checkpoint's advantage unresolved" in details
assert "changed 8 numerical answers" in details and "50.00% when answering directly" in details
assert "-2.00 to 4.00" in details
assert scores[(novel["id"], text["id"], stage)][-1] == "+15.00 [+7.00, +23.00]"