Repository navigation
docs(contract): document what a job must write to be rollout-browsable - #12
Merged
Merged
Conversation
Nothing described the on-disk shape the UI's rollout viewer expects, so every team reverse-engineers it from `server.rs`. Adds a "Browsable rollouts" subsection to the recipe contract covering: the `type = "eval_result"` + `marker` requirement (the marker file's parsed JSON *is* `metadata.result`), the browsable predicate (`traj_path` / `gif_path` / non-empty `runs[]`), the multi and single path layouts, the four trajectory fields the viewer reads, and the tab label. Calls out the two hardcoded filenames explicitly, since they are where this goes wrong in practice: the multi shape looks for exactly `trajectory.jsonl`, and frames are addressed as `step_%03d.png` built from the frame index rather than by listing the directory. Also notes that `frame_count` counts every `*.png` under `steps/`, so extra PNGs (the OSWorld eval's `step_NNN_after.png`) inflate it past the fetchable index space. Worked example is the OSWorld CUA eval artifact in the shared registry. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nothing documented what a job has to write for its output to be browsable in the UI's rollout viewer, so every team reverse-engineers it from
server.rs. Adds one### Browsable rolloutssubsection todocs/RECIPE_CONTRACT.md, at the end of "What labctl demands from your recipe". No restructuring of the document.Facts covered, all verified in the code:
type = "eval_result"+ amarkeris the entry ticket.runner.rs::register_outputsparses the marker file as JSON and stores it verbatim as the artifact'smetadata.result; that blob is everything the viewer sees. Without a marker there is noresultkey at all.server.rs, eval-series builder):resultcontainstraj_path, orgif_path, or a non-emptyrunsarray.resolve_rollout_paths): multi (result.runs[].subdir→<artifact_path>/<subdir>/trajectory.jsonl+.../steps/) and single (absoluteresult.traj_path,steps/beside it).trajectory.jsonl— nothing else;step_%03d.png.get_artifact_framebuildssteps_dir.join(format!("step_{n:03}.png"))from the requested index; it never lists or sorts the directory, so any other name is unreachable and a numbering gap is a hole the viewer can't skip.frame_counttrap:get_artifact_rolloutcounts every*.pngundersteps/, so the count and the fetchable index space agree only when there is exactly one PNG per step. The production OSWorld eval also writesstep_NNN_after.png, so it reports ~2x its real step count and the back half of the scrubber 404s. Documented as the trap, not as the pattern.step_num,action,response(literal"<reset>"renders as a dash),reward. Lines must be in frame order —RolloutViewer.svelteindexessteps[frame]positionally for the frame caption and usesstep_numfor the click-to-jump target.runs[].instruction, falling back toslug.Worked example is the real artifact
eval_logs/alfred.nguyen/osworld_cua_micro_ckpt_35k_run_01a01316fcde7a609d00ff87ac353ac9(markercompleted.json, 11runs[]entries,task_000_.../trajectory.jsonlwith 65 lines andsteps/holding 129 PNGs).Two smaller things found while verifying, both written into the doc as one-clause caveats rather than as separate issues:
gif_pathalone makes a point look browsable in the eval series, butresolve_rollout_pathshandles onlyrunsandtraj_path, so opening it 404s. The doc says to pairgif_pathwithtraj_path.?task=<runs[].index>while the server resolvesrunsby array position, so anindexthat doesn't match its position selects the wrong episode. The doc says to keep them equal.Docs-only change;
cargo test --all-featuresunaffected (36 unit + 9 smoke pass).🤖 Generated with Claude Code