import whileai.simulations as wai, then wai.name.
Calibration
whileai/simulations/schema.py.
Measured difficulty of one task for one student. Optional; only
calibrate produces it. pass_rate_ci95 is the Wilson 95%
interval on pass_rate from n rollouts (about +/-0.3 wide at
n=8), so a band assignment can be read with its uncertainty. mean_kl
is the sampled KL to a reference policy per generated token;
simulate(logprobs=True) captures the student side and
calibrate(rows, ref=...) fills it in.
Dataset
whileai/simulations/schema.py.
Split membership is a dataset decision, so one task can be holdout
in one dataset and training in another.
Judgment
whileai/simulations/schema.py.
Marker
whileai/simulations/schema.py.
Rollout
whileai/simulations/schema.py.
One episode. Mutable so grading paths can attach to it in place;
the no-verdict invariant is enforced at the boundary, not here.
Task
whileai/simulations/schema.py.
The situation. Identity-bearing, so nothing computed lives here:
splits belong to a Dataset, difficulty to a Calibration.
calibration_of
whileai/simulations/schema.py.
The typed Calibration a row carries, or None when absent or
malformed. publish_gate / calibrate write it as a flat dict
under calibration; this is the read side. mean_kl is optional.
from_row
whileai/simulations/schema.py.
Split one flat row into its four objects. Any version, any shape.
to_row
whileai/simulations/schema.py.
The flat v1 wire row. Inverse of from_row on engine rows; on
other shapes it is the canonical row load_traces would produce,
with the source row’s unknown keys carried along.
validate
whileai/simulations/schema.py.
Problems with one row, empty when it is fine. Never raises.
Stamped rows must carry the required fields with the right types.
Unstamped kind="row" rows are version 0 and only have to be
non-empty dicts: nothing that works today is rejected there.
Two things are reported regardless of version, because “0 validation
failures” is read as a guarantee and neither case is one:
- an empty dict, which carries no prompt, no messages, no verdict;
- a
trainingorpreferencerow with nomessagesor nochosen/rejected. Those two kinds ask “is this a training sample”, and an unstamped dict with no conversation in it is not one whatever version it claims.