router.push("/")} />}
-
- {showProgress && !pending && }
+ {showProgress && }
{latest?.state === "failed" && latest.errorMessage && (
diff --git a/src/app/(app)/[org]/[repo]/page.tsx b/src/app/(app)/[org]/[repo]/page.tsx
index f725da3..43a4edc 100644
--- a/src/app/(app)/[org]/[repo]/page.tsx
+++ b/src/app/(app)/[org]/[repo]/page.tsx
@@ -9,8 +9,7 @@ import {
LanguagesIcon,
ListChecksIcon,
MessagesSquareIcon,
- PlusIcon,
- RocketIcon,
+ GaugeIcon,
ScaleIcon,
SparklesIcon,
TriangleAlertIcon,
@@ -19,15 +18,15 @@ import type { Metadata } from "next";
import Link from "next/link";
import { notFound, redirect } from "next/navigation";
import { CopyButton } from "@/components/copy-button";
-import { DeploymentStateBadge } from "@/components/deployment-state";
+import { BenchmarkStateBadge } from "@/components/benchmark-state";
import { HubStateBadge } from "@/components/hub-state-badge";
import { LocalTime } from "@/components/local-time";
import { ModelStatusBadge } from "@/components/model-status-badge";
-import { RequestedByBadge } from "@/components/requested-by-badge";
import { buttonVariants } from "@/components/ui/button";
import { cn } from "@/lib/utils";
import { formatBytes, shortSha } from "@/lib/format";
-import { deploymentsByModel, listDeployableModels } from "@/lib/deployments";
+import { listBenchmarks } from "@/lib/benchmarks";
+import { headline, targetName } from "@/lib/benchmark-view";
import { fetchModelCard } from "@/lib/hub/client";
import { modelFamilies } from "@/lib/hub/metadata";
import { listModelJobs } from "@/lib/jobs";
@@ -102,17 +101,14 @@ export default async function ModelPage({ params, searchParams }: PageProps<"/[o
const hubTags = model.hubTags ?? [];
const hubMissing = model.hubState === "repo_missing" || model.hubState === "commit_missing";
- const [tags, related, card, worker, recentJobs, byModel, deployable] = await Promise.all([
+ const [tags, related, card, worker, recentJobs, runs] = await Promise.all([
modelTagList(model.id),
relatedModels(model.id, baseModels),
tab === "card" ? fetchModelCard(model.repoId, model.pinnedSha).catch(() => undefined) : Promise.resolve(undefined),
getWorkerStatus(),
listModelJobs(model.id, 1),
- deploymentsByModel(),
- listDeployableModels(),
+ listBenchmarks({ modelId: model.id }),
]);
- const modelDeployments = byModel.get(model.id) ?? [];
- const canDeploy = deployable.some((m) => m.id === model.id);
const update =
!hubMissing && model.updateDiff && model.updateDiff.sha === model.remoteSha && model.remoteSha !== model.pinnedSha
? model.updateDiff
@@ -146,22 +142,12 @@ export default async function ModelPage({ params, searchParams }: PageProps<"/[o
-
{update && (
update available
)}
- {canDeploy && (
-
-
- Deploy
-
- )}
- {(modelDeployments.length > 0 || canDeploy) && (
-
-
- {modelDeployments.length === 0 ? (
-
Not deployed yet.
- ) : (
- modelDeployments.map((d) => (
-
+ {runs.length > 0 && (
+
+
+ {runs.slice(0, 5).map((r) => {
+ const h = headline(r.summary);
+ return (
+
- {d.name}
- {d.runtimeName}
+ {r.label ?? targetName(r.snapshot)}
+
+ {r.kind === "eval" ? (r.quality?.score != null ? `quality ${r.quality.score}%` : "quality eval") : h.decode != null ? `${h.decode.toFixed(1)} t/s decode` : r.kind === "ab" ? "A/B" : "run"}
+
-
+
- ))
- )}
- {canDeploy && (
-
-
- New deployment
-
- )}
+ );
+ })}
+
+ All runs of this model →
+
)}
diff --git a/src/app/(app)/benchmarks/[id]/ab-report.tsx b/src/app/(app)/benchmarks/[id]/ab-report.tsx
index 81c8e97..b633451 100644
--- a/src/app/(app)/benchmarks/[id]/ab-report.tsx
+++ b/src/app/(app)/benchmarks/[id]/ab-report.tsx
@@ -1,7 +1,6 @@
import { TriangleAlertIcon } from "lucide-react";
-import { BenchmarkResources } from "@/components/benchmark-resources";
import { abCaveats, abHeadline, abMethod, abSummaryText, halfWidth } from "@/lib/ab-report";
-import { CONFIG_ROWS } from "@/lib/benchmark-view";
+import { CONFIG_ROWS, targetName } from "@/lib/benchmark-view";
import type { PairedResult } from "@/lib/db/schema";
import { cn } from "@/lib/utils";
import type { ListRow } from "../benchmark-list";
@@ -75,8 +74,8 @@ export function AbReport({ run }: { run: ListRow }) {
BetterBench {ab.betterbenchVersion} · paired A/B · {ab.pairs} pairs
-
{run.label ?? `${a.deploymentName} vs ${b.deploymentName}`}
-
{abSummaryText(ab, a.deploymentName, b.deploymentName)}
+
{run.label ?? `${targetName(a)} vs ${targetName(b)}`}
+
{abSummaryText(ab, targetName(a), targetName(b))}
@@ -99,8 +98,8 @@ export function AbReport({ run }: { run: ListRow }) {
-
-
+
+
Pairs
{ab.pairs}
@@ -136,8 +135,8 @@ export function AbReport({ run }: { run: ListRow }) {
|
- A · {a.deploymentName} |
- B · {b.deploymentName} |
+ A · {targetName(a)} |
+ B · {targetName(b)} |
@@ -161,13 +160,6 @@ export function AbReport({ run }: { run: ListRow }) {
{same.length > 0 && Same on both: {same.map((x) => `${x.row.label.toLowerCase()} ${x.va}`).join(" · ")}.
}
- {run.resources && (
-
- )}
-
Method
diff --git a/src/app/(app)/benchmarks/[id]/benchmark-detail.tsx b/src/app/(app)/benchmarks/[id]/benchmark-detail.tsx
index d144407..c073f51 100644
--- a/src/app/(app)/benchmarks/[id]/benchmark-detail.tsx
+++ b/src/app/(app)/benchmarks/[id]/benchmark-detail.tsx
@@ -31,10 +31,8 @@ import { Button, buttonVariants } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { reportSummary, weightsLabel } from "@/lib/benchmark-report";
-import { CONFIG_ROWS, describeSettings } from "@/lib/benchmark-view";
+import { CONFIG_ROWS, describeSettings, engineName, isEndpointSnapshot, modelName, targetName } from "@/lib/benchmark-view";
import type { ListRow } from "../benchmark-list";
-import { AgentApprovalBar } from "@/components/approval-bar";
-import { RequestedByBadge } from "@/components/requested-by-badge";
import { RunMetaCard } from "@/components/run-meta";
import { cancelBenchmark, deleteBenchmark, describeBenchmark, renameBenchmark } from "../actions";
import { AbReport } from "./ab-report";
@@ -63,7 +61,7 @@ export function BenchmarkDetail({ initial }: { initial: ListRow }) {
const [now, setNow] = useState(() => Date.now());
const [label, setLabel] = useState(initial.label ?? "");
const [description, setDescription] = useState(initial.description ?? "");
- const active = r.state === "pending_approval" || r.state === "queued" || r.state === "running";
+ const active = r.state === "queued" || r.state === "running";
useEffect(() => {
if (!active) return;
@@ -78,13 +76,14 @@ export function BenchmarkDetail({ initial }: { initial: ListRow }) {
}, [active, r.id]);
async function again() {
- if (!r.deploymentId) return;
+ if (!r.endpointId) return;
const res = await fetch("/api/benchmarks", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
- deploymentId: r.deploymentId,
- deploymentBId: r.kind === "ab" ? r.deploymentBId : null,
+ endpointId: r.endpointId,
+ endpointBId: r.kind === "ab" ? r.endpointBId : null,
+ model: modelName(r.snapshot),
kind: r.kind,
label: r.label,
description: r.description,
@@ -100,7 +99,18 @@ export function BenchmarkDetail({ initial }: { initial: ListRow }) {
}
const s = r.snapshot;
+ const sB = r.snapshotB;
const sum = r.summary;
+ // Runs from before 0.15 measured a deployment (gone now); newer ones an endpoint.
+ const legacy = !isEndpointSnapshot(s);
+ const endpointLink = (id: string | null, name: string) =>
+ legacy ? name : id ? (
+
+ {name}
+
+ ) : (
+ `${name} (deleted)`
+ );
const took = duration(r.startedAt, r.finishedAt, now);
return (
@@ -110,10 +120,7 @@ export function BenchmarkDetail({ initial }: { initial: ListRow }) {
- {r.label ??
- (r.kind === "ab"
- ? `${s.deploymentName} vs ${r.snapshotB?.deploymentName}`
- : s.deploymentName)}
+ {r.label ?? (r.kind === "ab" && sB ? `${targetName(s)} vs ${targetName(sB)}` : targetName(s))}
{r.kind === "ab" && (
@@ -124,54 +131,21 @@ export function BenchmarkDetail({ initial }: { initial: ListRow }) {
state={r.state}
cancelling={!!r.cancelRequestedAt}
/>
-
- {r.deploymentId ? (
-
- {s.deploymentName}
-
- ) : (
- `${s.deploymentName} (deleted)`
- )}{" "}
- ·{" "}
+ {endpointLink(r.endpointId, targetName(s))} ·{" "}
{r.modelId ? (
-
- {s.repoId}
+
+ {modelName(s)}
) : (
- s.repoId
+ modelName(s)
)}{" "}
- · {s.runtimeName}
- {r.kind === "ab" && r.snapshotB && (
+ · {engineName(s)}
+ {r.kind === "ab" && sB && (
<>
{" "}
- · B:{" "}
- {r.deploymentBId ? (
-
- {r.snapshotB.deploymentName}
-
- ) : (
- r.snapshotB.deploymentName
- )}
- >
- )}
- {r.sweepId && (
- <>
- {" "}
- ·{" "}
-
- part of a sweep
-
+ · B: {endpointLink(r.endpointBId, targetName(sB))} ({engineName(sB)})
>
)}
@@ -218,12 +192,12 @@ export function BenchmarkDetail({ initial }: { initial: ListRow }) {
Cancel
) : (
- r.deploymentId &&
- !r.sweepId && (
+ r.endpointId &&
+ (r.kind !== "ab" || r.endpointBId) && (