Add shareable URL state, speedup column and family-scoped metric legend

#7
by JonnaMat - opened
Embedl org

Three independent features, developed on separate branches and merged here.

Shareable URL state (urlstate.js)
Mirrors base family, variant, metric and every filter column into
location.hash, so a specific chart can be linked:
#family=Llama-3.2&device=agx_orin&metric=tps
Uses replaceState, so clicking filters does not fill the history stack.
Unknown families/metrics/filter values are ignored rather than applied.
The Embed modal now deep-links back to the exact view it was generated
from. Verified that huggingface.co forwards the hash into the Space
iframe, so links work both on the Space page and on *.hf.space.
Disable with "url_state": false.

Speedup column (speedup.js)
The data is inherently paired: an external baseline model and its
embedl variants measured under identical conditions. The tables now
carry a VS BASE column with the ratio for the active metric, always
oriented so higher is better. Baselines read 1.00x, unpaired rows read
em-dash, and an ambiguous pairing renders nothing rather than an
arbitrary number. Disable with "speedup_column": false.

Family-scoped metric legend (app.js)
The legend was built once at load from every configured metric, so a
CV family still listed TPS/TPOT/TTFT/E2E and an LLM family still
listed IPS/LAT/MEM. It now re-renders with the view and lists only the
metrics that actually have data. The "has data" predicate existed in
two copies (chart metric buttons, table columns); this factors it into
a single metricsWithData() that the legend also uses, so all three
agree. Disable with "legend_filter": false.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

JonnaMat changed pull request status to merged
JonnaMat deleted the refs/pr/7 ref

Sign up or log in to comment