Skip to content

📊 telemetry: restore round-level gauges on journal recovery (schema v3) - #200

Open
george-connito wants to merge 1 commit into
masterfrom
feat/restore-round-telemetry-on-recovery
Open

📊 telemetry: restore round-level gauges on journal recovery (schema v3)#200
george-connito wants to merge 1 commit into
masterfrom
feat/restore-round-telemetry-on-recovery

Conversation

@george-connito

Copy link
Copy Markdown
Collaborator

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.

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant