[PR] feat(tui): phase-aware chart (per-phase autoscale at checkpoints) + events.jsonl in file mode #141

Closed
opened 2026-07-30 22:30:23 +00:00 by vxfemboy · 1 comment
Owner

Mirrored from GitHub — originally by @vxfemboy. https://github.com/femboyisp/emry/pull/123

Curriculum training cycles through phases with different loss scales (reasoning ~1.0, personality ~2.5, …), so one shared y-axis makes a healthy run look like it diverges at every phase transition. This makes the chart phase-aware.

Two parts

  1. events.jsonl in file mode (EventLogTailer). emry watch --run-dir only tailed metrics.jsonl, so checkpoints/phase-changes/alerts/metric-names never showed in file mode. Now polled alongside metrics — checkpoint markers finally appear in file mode, and they're the source of phase boundaries.
  2. Per-segment autoscale chart. Split the x-axis at checkpoint steps, scale each segment to its own range, connected sub-curves with a labeled title (labels from the checkpoint path: reasoning │ knowledge │ current). chart::render_braille_segments + Segment; ui::Checkpoint{step,label} + build_segments. Baseline overlay omitted in segmented mode (can't share per-segment scales).

Verified against the real kitby-v2 run at 150×40 — each phase renders as its own readable curve instead of one mangled cumulative mess.

Notes

  • Builds on #122 (connected-line renderer); merge #122 first, then this rebases cleanly.
  • This is PR 1 of 3 for phase-aware charts. Next: (2) explicit run.stage() stage API, (3) stage-driven boundaries + web parity.

Gate green (fmt, clippy, tests, ≥90% coverage).

<!-- gitbitch --> > _Mirrored from GitHub — originally by `@vxfemboy`._ [https://github.com/femboyisp/emry/pull/123](https://github.com/femboyisp/emry/pull/123) Curriculum training cycles through phases with different loss scales (reasoning ~1.0, personality ~2.5, …), so one shared y-axis makes a **healthy** run look like it diverges at every phase transition. This makes the chart phase-aware. ## Two parts 1. **`events.jsonl` in file mode** (`EventLogTailer`). `emry watch --run-dir` only tailed `metrics.jsonl`, so checkpoints/phase-changes/alerts/metric-names never showed in file mode. Now polled alongside metrics — **checkpoint markers finally appear in file mode**, and they're the source of phase boundaries. 2. **Per-segment autoscale chart.** Split the x-axis at checkpoint steps, scale each segment to its **own** range, connected sub-curves with a labeled title (labels from the checkpoint path: `reasoning │ knowledge │ current`). `chart::render_braille_segments` + `Segment`; `ui::Checkpoint{step,label}` + `build_segments`. Baseline overlay omitted in segmented mode (can't share per-segment scales). Verified against the real kitby-v2 run at 150×40 — each phase renders as its own readable curve instead of one mangled cumulative mess. ## Notes - Builds on #122 (connected-line renderer); merge #122 first, then this rebases cleanly. - This is **PR 1 of 3** for phase-aware charts. Next: (2) explicit `run.stage()` stage API, (3) stage-driven boundaries + web parity. Gate green (fmt, clippy, tests, ≥90% coverage).
vxfemboy 2026-07-30 22:30:23 +00:00
Author
Owner

Mirrored from GitHub — originally by @vxfemboy. https://github.com/femboyisp/emry/pull/123#issuecomment-5136854639

Landed on main via v0.2.2 (rebased onto canonical vxug main as commits d2c49f2 / c7fafb2 / 84e0756 / a77c5a3 / 62980b4). Closing this GitHub-side PR; the work is shipped.

<!-- gitbitch --> > _Mirrored from GitHub — originally by `@vxfemboy`._ [https://github.com/femboyisp/emry/pull/123#issuecomment-5136854639](https://github.com/femboyisp/emry/pull/123#issuecomment-5136854639) Landed on main via v0.2.2 (rebased onto canonical vxug main as commits d2c49f2 / c7fafb2 / 84e0756 / a77c5a3 / 62980b4). Closing this GitHub-side PR; the work is shipped.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
femboy/emry#141
No description provided.