Give an at-a-glance MLOps overview of fine-tuning runs and the artifacts they version on Backblaze B2, including the cumulative artifact-storage curve.
- UI:
/page (dashboard home) - API:
GET /runs/stats,GET /runs
apps/web/src/components/dashboard/stats-cards.tsx— 4 stat cards (runs, completed, artifacts on B2, storage on B2), plus the loading noticeapps/web/src/components/dashboard/artifact-growth-chart.tsx— area chart of cumulative artifact bytes over time (the accumulating-artifact curve)apps/web/src/components/dashboard/recent-runs-table.tsx— the 8 most recent runs with status and final lossapps/web/src/lib/queries.ts—useRunStats(),useRuns()(both poll while a run is active)services/api/app/service/runs.py—get_run_stats()aggregationservices/api/app/service/run_view.py—build_stats()(the cumulative curve)
- Pattern exemplar:
apps/web/src/components/dashboard/artifact-growth-chart.tsx
- None (reads scoped listings of the app's own
runs/prefix)
GET /runs/stats→RunStats(totals, status breakdown,cumulative[])GET /runs→RunSummary[]for the recent-runs table (newest first)
- Page loads → stats cards read
GET /runs/stats(aggregated from each run's manifest plus a scopedruns/listing). - The growth chart plots
RunStats.cumulative— one point per run (ordered by completion time) of cumulative artifact bytes, which only grows as runs accumulate on B2. - The recent-runs table reads
GET /runsand links each row to its detail. - All aggregations flow through the
runtime -> service -> repolayering and are exposed via TanStack Query hooks (no bareuseEffect + fetch). Both queries poll on an interval so a training run's numbers update live.
- No runs yet → empty states on every card/chart/table.
- API unreachable → inline
ErrorStatewith Retry (never fabricated zeros). - A run in progress → stats reflect only the checkpoints already written to B2.
- Empty: "No runs yet" / "No artifacts yet".
- Loading: skeletons + a loading notice for the (rare) cold scan.
- Error: inline error state with Retry.
- Loaded: populated cards, growth curve, recent-runs table.
- Test files:
apps/web/src/lib/queries.test.ts,apps/web/src/lib/api-contract.test.ts - Required cases: stats render, empty state, error state
- Focused verify command:
pnpm test:web - Default pre-PR verify command:
pnpm verify - Full local verify command:
pnpm verify:fullwhen the E2E/live prerequisites in Dev Workflows are available - Pass criteria: cards + curve + recent-runs render from live
/runs/statsdata