feat/web-buttons-phase-aware-stage-api #149
No reviewers
Labels
No labels
blocked
bug
compat
docs
documentation
duplicate
emry-cli
emry-core
emry-engine
emry-ingest
emry-py
emry-store
emry-tui
emry-web
enhancement
good first issue
gpu-compute
help wanted
hpc
infra
integrations
invalid
needs-design
P0-blocker
P1-core
P2-enhanced
P3-future
performance
pull-request
python
pytorch
question
rust
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
femboy/emry!149
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/web-buttons-phase-aware-stage-api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Brings the web dashboard to parity with the terminal chart for curriculum/multi-phase runs. Previously the web chart plotted the whole window on one y-scale, so phases with very different loss scales looked like the run diverged at each transition (the same problem the TUI fixed in d2d2b4f / EMRY phase-aware work). Changes: - state.rs: checkpoints now carry a derived label (WebCheckpoint{step,label}), not just a bare step. `checkpoint_label` mirrors emry_tui::ui::checkpoint_label (parent dir, phaseN- prefix stripped, else file stem); a paired test asserts the same cases so the two copies can't silently drift. The /ws JSON `checkpoints` field changes from [step] to [{step,label}]. - index.html: drawChart now EMA-smooths the series (adaptive span, ported from the TUI) and, when checkpoints split the visible window, draws one connected polyline per segment each y-scaled to its own range, with dashed dividers and a per-segment label; the title shows the label chain (`math │ polish │ current`). Single-scale mode keeps the dashed baseline overlay; segment mode omits it (can't share per-segment scales) and the title no longer advertises a baseline it isn't drawing. - web_demo.rs: synthetic checkpoints now use curriculum-style paths (phaseN-<stage>/…) so the label chain is exercised. Verified in a real browser against web_demo: three autoscaled segments render with correct labels ("math │ polish │ current"), no console errors, and the delegated metric-card clicks still switch the selected metric.Adds an explicit API to demarcate curriculum stages, the phase-aware-chart follow-up: `run.stage("reasoning")` names the current stage so the dashboards split and label the loss chart at stage boundaries, instead of only inferring labels from checkpoint paths. New core event `Event::StageChange{name,step}` threaded end-to-end: - emry-core: the variant + adjacently-tagged STAGE_CHANGE tag (roundtrip and tag-stability tests extended). - emry-engine: RunHandle::stage_change pushes it to the event ring; emry-py exposes it as PyRunHandle.stage_change (embedded mode). - Python SDK: Run.stage(name, *, step=None) + current_stage property; wired through every backend — JsonlBackend (events.jsonl), SocketBackend (msgpack wire), NativeBackend (native handle). Backend protocol + NullBackend updated. - Reducers: UiState (TUI) and WebState (web) record stage marks; the chart uses stages as segment boundaries, taking precedence over checkpoint-derived labels when both are present. build_segments now takes generic (step,label) marks. Verified: Rust workspace tests + clippy clean; Python suite green (added stage tests for Run, JSONL events log, wire shape, socket frame, and native handle); browser check confirms the web chart segments+labels by stage and falls back to checkpoints when no stages are present.Integrated into
mainvia merge commit45079bf(all 8 CI jobs green on run #35). The branch is already an ancestor of main, so there is nothing left to merge through the PR UI — closing as merged-in-main.Pull request closed