|
10 | 10 |
|
11 | 11 | Renders the ranked input-vs-output token breakdown shown in the README's |
12 | 12 | "Top models (YTD)" section, styled to match the Data Designer devnote charts |
13 | | -(near-black canvas, NVIDIA-green duotone). The same PNG is written to both |
14 | | -tracked copies so the README and Fern docs site stay in sync: |
| 13 | +(near-black canvas, NVIDIA-green duotone). The PNG is written to the Fern image |
| 14 | +path rendered by the README and docs site: |
15 | 15 |
|
16 | | - docs/images/top-models.png (rendered by the README) |
17 | | - fern/images/top-models.png (Fern's /images/* mirror) |
| 16 | + fern/images/top-models.png |
18 | 17 |
|
19 | 18 | The source telemetry export lives at docs/scripts/top-model-usage.csv with |
20 | 19 | columns: model name, input (context) tokens, output (generated) tokens, plus a |
|
35 | 34 |
|
36 | 35 | import argparse |
37 | 36 | import csv |
38 | | -import shutil |
39 | 37 | from pathlib import Path |
40 | 38 |
|
41 | 39 | import matplotlib.pyplot as plt |
|
45 | 43 | # Repo root is two levels up from docs/scripts/. |
46 | 44 | REPO_ROOT = Path(__file__).resolve().parents[2] |
47 | 45 | DEFAULT_CSV = REPO_ROOT / "docs" / "scripts" / "top-model-usage.csv" |
48 | | -# Tracked copies of the figure; first entry is the canonical render target. |
49 | | -# docs/images/ is what the README renders; fern/images/ is Fern's mirror for |
50 | | -# /images/* references. |
51 | | -TARGETS = ( |
52 | | - REPO_ROOT / "docs" / "images" / "top-models.png", |
53 | | - REPO_ROOT / "fern" / "images" / "top-models.png", |
54 | | -) |
| 46 | +# Tracked figure path rendered by the README and Fern docs site. |
| 47 | +TARGETS = (REPO_ROOT / "fern" / "images" / "top-models.png",) |
55 | 48 |
|
56 | 49 | # ---------------------------------------------------------------- palette ---- |
57 | 50 | BG = "#0E0E0E" # near-black canvas (matches DD devnote charts) |
@@ -270,11 +263,8 @@ def main() -> None: |
270 | 263 | configure_matplotlib() |
271 | 264 | rows = load_rows(args.csv) |
272 | 265 |
|
273 | | - primary, *mirrors = TARGETS |
| 266 | + (primary,) = TARGETS |
274 | 267 | render(rows, primary) |
275 | | - for mirror in mirrors: |
276 | | - mirror.parent.mkdir(parents=True, exist_ok=True) |
277 | | - shutil.copyfile(primary, mirror) |
278 | 268 |
|
279 | 269 | for target in TARGETS: |
280 | 270 | print(f"wrote {target.relative_to(REPO_ROOT)}") |
|
0 commit comments