📊 telemetry: restore round-level gauges on journal recovery (schema v3) - #200
Open
george-connito wants to merge 1 commit into
Open
📊 telemetry: restore round-level gauges on journal recovery (schema v3)#200george-connito wants to merge 1 commit into
george-connito wants to merge 1 commit into
Conversation
The per-miner families re-emit via finalize_round_scores (which recovery
replays), but validator_round_miners_{scored,pending,failed},
lifecycle_step and current_round_id are written only by the live eval
workers — so after every restart the dashboard's "Evaluated N of M"
column blanks for a full cycle (~1h45m) until the next Submission freeze.
Journal schema v3 adds two ints: roster_size (= len(foreground_uids) +
len(background_uids), the one input Round.stats() needs that wasn't
persisted) and lifecycle_step (the last live step the round reached).
from_json still accepts v1/v2 (missing fields default to 0). Round now
carries lifecycle_step, set alongside the gauge at the three run.py
sites; the finalize journal-rewrite preserves both via the recovery
stub.
On startup recovery, for each replayed journal we now also set
validator_round_miners_scored/failed/pending{round_id} (pending =
roster_size - scored - failed, clamped ≥0), lifecycle_step, and
current_round_id (journals scan ascending, so it lands on the most
recent recovered round), registering each round_id for normal eviction.
Pre-v3 journals have roster_size=0 so pending clamps to 0 rather than
inventing a denominator — graceful for the first restart after deploy.
Not covered (documented for the backend): validator_miner_val_loss is
set at eval time and not journaled; it repopulates when miners are next
evaluated. Per-miner cohort_group/assignment_role gauges likewise remain
a live-only signal — M is still recoverable from the round_miners_*
counters (scored+pending+failed) without them.
Tests: journal v3 round-trip, v2 back-com
pat (roster_size=0), recovery
stub carries the fields, finalize rewrite preserves them. Full telemetry
+ journal suite (26) green in the stable image.
Co-Authored-By: Claude Fable 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.
The per-miner families re-emit via finalize_round_scores (which recovery replays), but validator_round_miners_{scored,pending,failed}, lifecycle_step and current_round_id are written only by the live eval workers — so after every restart the dashboard's "Evaluated N of M" column blanks for a full cycle (~1h45m) until the next Submission freeze.
Journal schema v3 adds two ints: roster_size (= len(foreground_uids) + len(background_uids), the one input Round.stats() needs that wasn't persisted) and lifecycle_step (the last live step the round reached). from_json still accepts v1/v2 (missing fields default to 0). Round now carries lifecycle_step, set alongside the gauge at the three run.py sites; the finalize journal-rewrite preserves both via the recovery stub.
On startup recovery, for each replayed journal we now also set validator_round_miners_scored/failed/pending{round_id} (pending = roster_size - scored - failed, clamped ≥0), lifecycle_step, and current_round_id (journals scan ascending, so it lands on the most recent recovered round), registering each round_id for normal eviction. Pre-v3 journals have roster_size=0 so pending clamps to 0 rather than inventing a denominator — graceful for the first restart after deploy.
Not covered (documented for the backend): validator_miner_val_loss is set at eval time and not journaled; it repopulates when miners are next evaluated. Per-miner cohort_group/assignment_role gauges likewise remain a live-only signal — M is still recoverable from the round_miners_* counters (scored+pending+failed) without them.
Tests: journal v3 round-trip, v2 back-com
pat (roster_size=0), recovery
stub carries the fields, finalize rewrite preserves them. Full telemetry