Repository navigation
Add an interactive animation of the evaluation process - #320
Merged
Merged
Conversation
scripts/generate_process_animation.py writes build/process_animation.html, which grows each example's calls graph in call order. A side panel shows the response's forms, each call's arguments and return value, and the criteria graph traversal, with toggles and a call depth selector. The recorder in generate_process_graphs.py now keeps an ordered event log with argument and return values, records to a configurable depth, and catches criteria graph evaluations. The static figures are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s clickable The recorder now records the criteria create_criteria_dict parses and the template feedback_procedure_generator chooses for each one. With the criteria graph shown, the animation adds a node for each criterion in the parse_criteria stage, an edge labelled with its parse label to the template it chooses, and edges to its criteria graph from the template that builds it and the stage that runs it. A Criteria panel section follows the chain from the criteria string to whether each graph reached its main criterion. Clicking a node pins its details in the panel: a call's invocations with their arguments and return values, a stage's calls, a criteria graph node's details and whether it was reached, or a criterion's chain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Internal dunder calls are hidden by default, values and parse trees are summarised, and the panel's sections can be collapsed. The criteria graph is drawn beside the generate_feedback stage. The page gains a legend, the parameters the context added, where each feedback tag came from, stage timings, the type of a raised exception, and each call's docstring and source location. Three animation-only examples cover an incorrect response, syntactical comparison and the default template. The layouts are gzipped to keep the page small. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clicking a node, or a tag or criterion link in the panel, makes that node the current node. A criteria graph criterion or output moves to the evaluation that reached it. The call section takes over the source location, the full values and the later calls from the pinned view. Co-Authored-By: Claude Opus 5.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.
Problem
The static process graphs in
app/docs/process_graphs/show which functionsevaluation_functioncalls, but not the order of the calls, the values passed between them, or how each criterion becomes a criteria graph and is evaluated. That makes the evaluation hard to follow for anyone new to the code.Changes
scripts/generate_process_animation.py(new): records the same examples as the static figures and writes a self-contained page tobuild/process_animation.html. Thebuild/folder is git-ignored. Run it withpython -m scripts.generate_process_animation.localStorage.syntactical_comparison(two criteria), and a criterion that falls back to the context's default template.scripts/generate_process_graphs.py:EvaluationResultand large dicts, and parse trees drawn with connectors.sys.monitoringPY_UNWIND, plus each call's docstring and source location.calls_to_dotto hide internal calls.Notes
scripts/generate_process_graphs.py, so the documentation graphs workflow from Regenerate the documentation graphs on pull requests #318 will run on it. It should find no SVG changes.Checklist
process_symbolic_calls.svg;app/docs.md) if user-facing behaviour changed: not applicable, since there is no user-facing change.🤖 Generated with Claude Code