Skip the Elo pairwise build for composite brackets so the snapshot rebuilds#582
Merged
Conversation
…builds The player x skill composite brackets (solo:wr50, ...) built the full reward pairwise + Codex Elo (a 200-iteration Bradley-Terry fit) for all 16 of them, on top of the 10 base brackets, over ~740k runs. That made the snapshot walk too heavy to finish, so prod was stuck serving snapshot version 10 (never advancing to 12) with every composite bracket empty — the tier-list "players + skill" combine and the metrics composite view returned nothing. Composites now skip the pairwise/Elo machinery (the heaviest part of the walk). They keep their picks/wins, so Score and Win% still work; they just carry no Codex Elo, which those views don't display anyway (reward-preference Elo sliced this finely is meaningless). Non-composite brackets keep full Elo. Bump the snapshot version to 13 to force the now-cheap rebuild. Verified locally: the build completes, composite brackets carry picks/wins with elo=None, and non-composite brackets still carry Elo.
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.
Why the tier-list "players + skill" combine (and metrics composite) show nothing
Diagnosed from prod: the backend is running the composite code (v12), but the stats snapshot is stuck at version 10 —
/api/runs/snapshot-statusreportsversion: 10, want_version: 12, and the logs showserving entity-stats snapshot version 10 while 12 rebuilds. No crash, no OOM, single stable container — the rebuild walk simply never finishes.Cause: the 16 player×skill composite brackets (
solo:wr50, ...) each built the full reward pairwise matrix + Codex Elo (a 200-iteration Bradley-Terry fit), on top of the 10 base brackets, over ~740k runs. That's ~2.6× the per-run bracket work of the last snapshot that successfully built (v10, 10 brackets), and it pushed the walk past the point where it completes — so the snapshot never advanced and every composite bracket stayed empty.Fix
Composites skip the pairwise/Elo machinery (the heaviest part of the walk). They keep their picks/wins, so Score and Win% still work on the tier list and metrics; they just carry no Codex Elo — which those composite views don't display anyway (reward-preference Elo sliced by player×skill is too thin to mean anything). Non-composite brackets keep full Elo, untouched.
SNAPSHOT_VERSION→ 13 to force the now-cheap rebuild.Verified locally
Ran the actual cache build: it completes, composite brackets carry picks/wins with
elo=None(e.g.solo:a10on ACROBATICS → picks=38, wins=16), and non-composite brackets (a10/wr50) still carry Elo. ruff + compile clean.Once deployed, the walk finishes, the snapshot advances to 13, and the composite combinations populate (the earlier tier-list UI work #575 was fine — it just had no data).