Repository navigation
evals: gate clip selection on the clips it produces - #1
Open
hrithiksaini99 wants to merge 2 commits into
Open
hrithiksaini99 wants to merge 2 commits into
hrithiksaini99 wants to merge 2 commits into
Conversation
Unit tests assert how the score is computed. They cannot see a weight change that silently drops the strongest hook, or a window that ends mid-sentence. Adds 8 cases over 3 committed transcript fixtures, run through the real load_sentences -> find_clips path: - duration bounds, non-overlap, playback order, sentence-complete endings - the strongest early and late hooks still surface - max_clips / max_seconds plumbing - a 14s episode yields no clips A committed baseline means a selector regression fails CI with the case id rather than a slightly different pass rate. The first run found two things: find_clips has no minimum score, so a hedging 100s episode still yields two clips; and results are ordered by start time, not by score. The former is recorded as an optional case so it stays visible in every report without blocking merges until there is a fix.
Unrelated to the eval suite, but it blocks verifying it: CI started resolving SQLAlchemy 2.1.6, which no longer ships sqlalchemy.ext.mypy.plugin, so 'pytest && ruff' pass and 'mypy src' stops at the plugin import. Pin to the 2.0 line until the mypy plugin situation is handled deliberately (remove the plugin from pyproject, or move the models off it). Last green CI on main was 2026-09-03, before 2.1 was released.
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.
What
Adds an eval gate over the real clip selector (
src/studio/select.py), using agenteval.The unit tests assert how a score is computed. They cannot see a weight change that silently drops the strongest hook, or a window that ends mid-sentence. This runs the real
load_sentences → find_clipspath over three committed transcript fixtures and asserts on the clips that come out.Coverage
hook-heavy-selects-both-hookshook-heavy-scores-above-floorhook-heavy-structure,…-respects-duration-boundshook-heavy-structure,filler-heavy-structuremin_gap_secondscheckhook-heavy-selects-both-hooks…-respects-max-clips,…-respects-duration-boundsmax_clips/max_secondsno longer plumbed throughshort-episode-yields-nothingVerified against a real regression
I disabled hook weighting (
hook * 1.7→hook * 0.0) and reran against the committed baseline:Restored the file; the suite is green again. A selector change that no unit test would flag now fails with a case id instead of a slightly different pass rate.
Findings from the first run
find_clipsreturns the best windows regardless of absolute quality, so a 100-second episode of pure hedging still produces two clips (4.10 and 6.56, against 10.78 and 11.27 for the real episode). Recorded as"optional": trueso it stays visible in every report without blocking merges. Amin_scoreparameter is the fix.clips_orderednow pins it.Files
Reviewer notes
evals/baseline.jsonis the reference run. Bump it only for intentional behaviour changes, and say why in the commit — an unexplained baseline bump turns the gate into decoration.repobut not theworkflowscope, so GitHub rejected.github/workflows/eval-gate.yml. It is ready and will land as a one-file follow-up oncegh auth refresh -s workflowis run. Until then the suite is run manually.agentevalis not on PyPI yet. Local runs needpip install -e ../agent-eval. The follow-up workflow pins to a tag once the harness is published, so a change in the harness cannot silently change this repo's gate.Test plan