Rollout Diff
Rollout Diff finds changes in generated code and prose across RL training steps. It reads a TRL or verl dump locally, ranks events for inspection, and links each event to examples in the original data. Ordinary analysis needs no GPU, model API, or trainer installation.
Install
Use Python 3.11 or newer. The local investigation app and watch workflows require macOS or Linux. The wheel includes the web interface.
Install from the directory containing the wheel.
python3 -m venv .venv
. .venv/bin/activate
python -m pip install ./rolloutdiff-0.1.0-py3-none-any.whl
rollout --help
The distribution and import name are rolloutdiff. The executable is rollout. For an index that carries 0.1.0, use python -m pip install rolloutdiff==0.1.0. From an unpacked source distribution, use python -m pip install ..
Analyze a dump
rollout analyze /path/to/completions --format trl --run experiment-1 \
--reward-column training_passed --output report.json
rollout render report.json --output report.html
Open report.html locally. The report shows how many series could be screened, which features changed, when they alerted, and which events ranked highest. If there is an event, inspect its selected responses using the same dump, run, and reward column.
rollout inspect /path/to/completions --format trl --run experiment-1 \
--reward-column training_passed --report report.json --event-rank 1
Add --with-absent to inspect completions from the same run, step, and prompt where a binary feature is absent. This needs complete prompt groups. Reports store evidence and references. Raw response text stays in the source dump. Choose fresh output paths for reports.
| Format | Input | Required source columns |
|---|---|---|
trl |
Trainer output, completions directory, or completions_<step>.parquet |
step, prompt, completion, and reward or a named --reward-column |
verl |
Directory or <step>.jsonl / step_<step>.jsonl, optionally gzipped |
step, input, output, score |
For verl use --format verl and omit --reward-column. Each file's step must agree with its name. Interpret the reward according to the producer's scoring function.
Read the evidence
At each step, analysis averages completions within each exact prompt and weights prompts equally. Estimating a standard error needs at least two sampling units. Related prompt variants can share a sampling unit through the Python API. Sequential alerts use a 15-step baseline and three consecutive qualifying observations. Event rank is a heuristic for choosing what to inspect.
New analyses run sequential detection by default. Add --retrospective to rollout analyze or rollout watch run, or pass retrospective=True to analyze_rollouts(), to enable the experimental detector. It estimates a mean-shift boundary from the available series. Its original null-alert benchmark failed at 16/768 (2.08%) against a 0.5% ceiling.
Version-3 analysis reports record the detector policy and distinguish disabled analysis from a completed scan with zero changes. They require a current reader. Historical version-1 and version-2 reports retain their recorded evidence. The bundled benchmark describes historical trials and does not calibrate a new run.
The source distribution includes benchmark results, a data manifest, and offline reproduction instructions. Open bench/README.md inside rolloutdiff-0.1.0.tar.gz. To download that archive from an index, use python -m pip download --no-deps --no-binary=rolloutdiff rolloutdiff==0.1.0.
--sensitivity lenient selects an experimental profile for smaller increases in retained structural binary features. Its report shows default and experimental counts for the same cohort. Retrospective detection is a separate choice. Full-run vocabulary selection limits alert dates to offline analysis.
Compare windows or trajectories
rollout diff /path/to/completions --format trl --run experiment-1 \
--reward-column training_passed --a 80:100 --b 140:160 \
--output diff.json --html diff.html
Ranges are inclusive and can overlap or appear in either order. To compare whole dumps, pass two paths. Differences are B minus A, with completions pooled within each exact prompt per side. The report shows prompt overlap, uncertainty, and citations for each side. Comparison inspection verifies source and response fingerprints.
For recorded conversations, use --format openhands for SWE-rebench, --format swe-smith, or --format inspect. Two unstepped dumps can be compared in full. SWE-smith files containing multiple models need an explicit --model for side A and --other-model for side B. OpenHands and SWE-smith accept JSON lists, JSONL, or Parquet. Inspect accepts one completed, text-only schema-v2 log per side. Rewards and scores require explicit selection. Missing steps and rewards stay unavailable.
rollout diff a.json b.json --format inspect --run run-a --other-run run-b \
--tool-calls --output calls.json
rollout inspect a.json --format inspect --run run-a --report calls.json \
--side a --feature tool_calls_count
--tool-calls compares recorded assistant requests by count, adjacent tool names, argument shape, path category, and command class. Citations resolve to original calls. A request's outcome needs separate evidence, and differences across models can reflect different tasks. Measuring change through agent training requires stepped data. Missing steps or rewards and tool-call comparisons use the version-2 comparison format.
Inspect JSON works with the base installation. To read native .eval files, install the optional inspect-ai==0.3.290 reader in a fresh environment.
python3 -m venv .venv-inspect
.venv-inspect/bin/python -m pip install './rolloutdiff-0.1.0-py3-none-any.whl[inspect]'
.venv-inspect/bin/rollout diff --help
The equivalent index requirement is 'rolloutdiff[inspect]==0.1.0'. The adapters read recorded logs without running tools or rescoring samples.
Python adapters and extractors
load_trl and load_verl return canonical rows. To adapt a different stepped table, map canonical names to the columns of your pandas DataFrame, frame, with from_table. Preserve the exact prompt and response, a nonnegative integer step, finite reward, and a unique (run, sample_id). Supply stable sample IDs if rows may be reordered. Prompt identity includes chat roles and metadata.
from rolloutdiff import analyze_rollouts, extract, featurize, from_table
rows = from_table(frame, run="trial", columns={
"step": "iteration", "prompt": "question", "response": "answer",
"reward": "score", "sample_id": "completion_id",
})
sample = extract(rows.iloc[0].response)
print(sample.dense["n_code_blocks"], sorted(sample.sparse))
tables = featurize(rows)
print(tables.catalog[["feature", "tier", "kind"]])
analysis = analyze_rollouts(rows)
print(analysis.event_ranking)
extract reads Python syntax and prose from one response. featurize produces per-completion dense values, retained sparse features, and a catalog. build_report(analysis) and render_report(report) export an analysis. For unstepped inputs use load_trajectories or load_inspect and compare_rollouts(a, b, include_tool_calls=True). Use extract_tool_calls(tool_calls, response_messages) to inspect one record's structured call features.
Other workflows
- Investigate locally.
rollout investigate --root /path/to/dataopens the loopback app. Choose a TRL or verl dump to inspect ranked events or compare windows. Keep the session URL private.--no-browserprints the URL. Saved replay and intervention evidence can be viewed read-only. - Watch completed steps.
rollout watch sealchecks a closed file against independently planned prompt-group counts.rollout watch runconsumes marked files in order, waits for gaps, and resumes with the detector policy recorded in its private state. A supported legacy session continues with both detectors and needs the newer writer after it appends a step. Start a new state to change policy.--onceprocesses one finite inventory. Inspect a saved commit against its own source snapshot. Event issuance is the first durable snapshot containing the event. Membership, representative, and rank can change in later snapshots. The timing check used recorded Aria steps. Full-prefix statistics are recomputed. - Connect a producer.
AsyncRolloutProducer.submitaccepts complete, planned groups into a bounded queue. A receipt'sacknowledge()waits for durable storage.make_trl_callbacksupports TRL 1.18.0 GRPO with Transformers 4.56.2, one writer on world rank zero, and a restricted full-generation logging configuration.VerlCompletionLogger.bind(trainer)replaces the verl 0.9.1 training dump writer with one designated publisher.FixedProbeHookneeds a separate run, fixed prompts, and a caller-owned sampler. Seerollout watch --helpfor configuration, rank, and recovery requirements. Playback checks used authored inputs. Live trainer overhead and distributed execution remain unmeasured. - Send a notification.
rollout watch notifysends a bounded summary of a durable snapshot to an explicitly supplied endpoint and records the attempt locally. Delivery has no automatic retry. - Review Aria replay evidence.
rollout replay-aria --helpdescribes replay of one selected completion.rollout investigate-aria --helpcovers controlled interventions against frozen evidence. Replay needs the supported Docker setup, pinned artifacts and explicit authorization. Interventions require single-use approval.
Development
Run the development checks from the source root in an activated Python virtual environment.
python -m pip install -c .github/ci-constraints.txt -e '.[test]' ruff
ruff format --check src bench tests scripts .github/*.py
ruff check src bench tests scripts .github/*.py
python -m pytest -q -m 'not local_data'
Frontend development uses Node 22.23.1. Run npm ci --prefix frontend, then npm run --prefix frontend lint, npm run --prefix frontend typecheck, npm test --prefix frontend, and npm run --prefix frontend build. The build updates the assets in the wheel. Browser tests use npm run --prefix frontend test:e2e with Playwright Chromium installed. Contributor instructions are in CONTRIBUTING.md in the source distribution.
Metadata
Release files for rolloutdiff 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rolloutdiff-0.1.0.tar.gz | 3.2 MB | With provenance | Details for rolloutdiff-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rolloutdiff-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for rolloutdiff-0.1.0-py3-none-any.whl |
Total release size: 4.5 MB
Release files / rolloutdiff-0.1.0.tar.gz
| Download URL | rolloutdiff-0.1.0.tar.gz |
|---|---|
| Size | 3.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a0ab05206e714823995fe594d30e1353031beebff43d59c7cf47efcee604ba0f
|
|
BLAKE2b-256 checksum How to use checksums |
4968836c934c7496f6effcf074fbb678258cfc55d014733279fdc6e8213d9e3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / rolloutdiff-0.1.0-py3-none-any.whl
| Download URL | rolloutdiff-0.1.0-py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90ec414c20331519699999c4c62c3f4604b4d406ee7ab041cd482ce98dcd3242
|
|
BLAKE2b-256 checksum How to use checksums |
8890c867b147b71d95e406647ba367bdbec4197a3418d755bd915fb5a7643bfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for rolloutdiff 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for rolloutdiff-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.