Let a dashboard be read against runs instead of the live engine
This commit is contained in:
@@ -9,17 +9,12 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select"
|
||||
import { compareQueryOptions, runMetricsQueryOptions, shortId } from "./queries"
|
||||
|
||||
/**
|
||||
* Why a finished run can have nothing to draw.
|
||||
*
|
||||
* A cache hit restores what a node returned, not the values it emitted along
|
||||
* the way, so a run whose training node was reused has a result and no curve.
|
||||
* Said here rather than left as an empty chart, which reads as a fault.
|
||||
*/
|
||||
export const NO_CURVE =
|
||||
"No curve was recorded. A node restored from the cache replays no emissions, so a run that reused an earlier one draws nothing here — its outputs are still on the result."
|
||||
import {
|
||||
compareQueryOptions,
|
||||
NO_CURVE,
|
||||
runMetricsQueryOptions,
|
||||
shortId,
|
||||
} from "./queries"
|
||||
|
||||
/** The metrics one run recorded, in the order they are worth offering. */
|
||||
export function useMetricNames(runId: string | undefined) {
|
||||
|
||||
@@ -17,17 +17,13 @@ import {
|
||||
} from "@/components/ui/table"
|
||||
import useCustomToast from "@/hooks/useCustomToast"
|
||||
import { cn, dur, si } from "@/lib/utils"
|
||||
import {
|
||||
MetricPicker,
|
||||
NO_CURVE,
|
||||
RunMetricChart,
|
||||
useMetricNames,
|
||||
} from "./MetricChart"
|
||||
import { MetricPicker, RunMetricChart, useMetricNames } from "./MetricChart"
|
||||
import { OpenInDashboard } from "./OpenInDashboard"
|
||||
import {
|
||||
CARD,
|
||||
downloadArtifact,
|
||||
isLive,
|
||||
NO_CURVE,
|
||||
paramText,
|
||||
runQueryOptions,
|
||||
shortCommit,
|
||||
|
||||
@@ -125,6 +125,16 @@ export async function downloadArtifact(digest: string, name: string) {
|
||||
URL.revokeObjectURL(url)
|
||||
}
|
||||
|
||||
/**
|
||||
* Why a finished run can have nothing to draw.
|
||||
*
|
||||
* A cache hit restores what a node returned, not the values it emitted along
|
||||
* the way, so a run whose training node was reused has a result and no curve.
|
||||
* Said out loud rather than left as an empty chart, which reads as a fault.
|
||||
*/
|
||||
export const NO_CURVE =
|
||||
"No curve was recorded. A node restored from the cache replays no emissions, so a run that reused an earlier one draws nothing here — its outputs are still on the result."
|
||||
|
||||
/** A run id, short enough for a table cell. The tail is the random half. */
|
||||
export const shortId = (id: string) => id.slice(-8)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user