import whileai.simulations as wai, then wai.name.
HackMonitor
holdout is a list of prompts (strings or message lists) or rows
({"prompt": ..., <extra columns>}); extra columns reach the proxy
as keyword lists, the way TRL passes dataset columns. proxy is a
TRL-shaped reward function (f(prompts=, completions=, **cols));
leave it None to use the reward function passed through
wrap. gold is a judge under the SDK contract (a rollout row
in, a reward or {"reward": ...} out). sample overrides how
completions are drawn: sample(model, tokenizer, prompts, n=, max_new_tokens=) -> list[list[str]]; the default uses the chat
template and model.generate; sampling (temperature,
top_p, batch) steers that default sampler.
n_boot is the bootstrap count behind the gold-vs-window interval,
n_perm the permutation count behind the feature scan, scan_min
the fewest buffered completions the scan runs on. Every number has its
reason in defaults.py (MONITOR_*).
run is the platform run the points and alarms land on; None
keeps everything on the monitor (history, alarms,
summary()).
HackMonitor.evaluate
history, logs to the run, checks the alarms.
Returns the history entry.
HackMonitor.summary
finish carry: the curve points, the
alarms, the last scan, where it stopped.
HackMonitor.wrap
reward_funcs. The name survives, so TRL’s rewards/<name>
column does too.