A cached node keeps its curve, and any input can name a run's output
Docs / docs (push) Successful in 22s
Playwright Tests / test-playwright (1, 2) (push) Failing after 2m42s
Playwright Tests / test-playwright (2, 2) (push) Failing after 1m41s
pre-commit / pre-commit (push) Failing after 2m53s
Test Backend / test-backend (push) Successful in 2m21s
Compose Smoke Test / test-compose (push) Successful in 31s
Playwright Tests / merge-reports (push) Failing after 1m6s
Docs / docs (push) Successful in 22s
Playwright Tests / test-playwright (1, 2) (push) Failing after 2m42s
Playwright Tests / test-playwright (2, 2) (push) Failing after 1m41s
pre-commit / pre-commit (push) Failing after 2m53s
Test Backend / test-backend (push) Successful in 2m21s
Compose Smoke Test / test-compose (push) Successful in 31s
Playwright Tests / merge-reports (push) Failing after 1m6s
A cache hit still replays no emissions — those values were the story of an
execution that is not happening — but the run they were recorded in is now
written on the row (`run_node.cached_from`), and the metrics endpoints read the
series back from there. So a reused run answers `run.metrics("train.loss")`
with the same points the run that trained did, rather than looking like a run
that produced no numbers at all. Pointed at rather than copied: a sweep of 500
reusing one frozen node would otherwise duplicate its curve 500 times.
That needed the cross-flow restore fixed first. The cache key has no flow in
it while the stored outputs are named for the flow that produced them, so
`quick.prepare` getting a hit from `train` wrote `train.dataset` into `quick`'s
state and the next node was called without its argument. One rule now covers
both halves: `requalify` reads a name owned by one flow as the same name in
another, applied to the restored outputs, to the node id behind the pointer,
and to the series names on the way out. Reuse across flows is kept.
Also: `@run:<id>.<output>` and a bare `sha256:` digest resolve on every input,
not only artifacts. Chaining a run's json config into the next one from a shell
meant pasting the whole object inline, and the CLI could not even send the
spelling — `_coerce` died in `json.loads` before the engine saw it. Both
spellings are reserved on every input now, `str` included, and `_from_run`
returns whatever the run's result holds rather than only a reference.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dp9L6gakMVro1K2C5zdtBE
This commit is contained in:
@@ -34,20 +34,16 @@ import { ValuePreview } from "./ValuePreview"
|
||||
*/
|
||||
export function parseByDtype(dtype: DType | undefined, raw: string): unknown {
|
||||
if (raw === "") return null
|
||||
// A run's output is named rather than typed out: "@run:<id>.<output>", or a
|
||||
// digest naming bytes. The engine resolves either into the value itself,
|
||||
// whatever its type, so both spellings are kept as text on the way out.
|
||||
if (raw.startsWith("@run:") || raw.startsWith("sha256:")) return raw
|
||||
if (dtype === "int" || dtype === "float") {
|
||||
const parsed = Number(raw)
|
||||
return Number.isNaN(parsed) ? raw : parsed
|
||||
}
|
||||
if (dtype === "bool") return raw === "true"
|
||||
if (dtype === "str") return raw
|
||||
// An artifact is named rather than typed out: "@run:<id>.<output>" or the
|
||||
// digest itself, which the engine resolves into the reference.
|
||||
if (
|
||||
dtype === "artifact" &&
|
||||
(raw.startsWith("@run:") || raw.startsWith("sha256:"))
|
||||
) {
|
||||
return raw
|
||||
}
|
||||
try {
|
||||
return JSON.parse(raw)
|
||||
} catch {
|
||||
|
||||
@@ -101,7 +101,7 @@ export function RunDialog({
|
||||
placeholder={
|
||||
dtype === "artifact"
|
||||
? "@run:<id>.<output> or sha256:…"
|
||||
: (dtype ?? "float")
|
||||
: `${dtype ?? "float"} or @run:<id>.<output>`
|
||||
}
|
||||
className="text-sm"
|
||||
onChange={(event) =>
|
||||
|
||||
@@ -46,8 +46,9 @@ export function RunDetail({ id }: { id: string }) {
|
||||
const nodes = run.nodes ?? []
|
||||
const artifacts = run.artifacts ?? []
|
||||
const reason = statusReason(run)
|
||||
// A run whose nodes were all restored emits nothing, so an empty chart is
|
||||
// the expected outcome rather than a fault. Said once, where it applies.
|
||||
// A restored node's curve comes from the run it was restored from, so an
|
||||
// empty chart here means that run is gone rather than that this one failed.
|
||||
// Said once, where it applies.
|
||||
const cached = nodes.some((node) => node.status === "cached")
|
||||
|
||||
return (
|
||||
|
||||
@@ -136,12 +136,13 @@ export async function downloadArtifact(digest: string, name: string) {
|
||||
/**
|
||||
* 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.
|
||||
* A cache hit replays no emissions, so a restored node's curve is read back
|
||||
* from the run that recorded it. Deleting that run — deleting its flow does —
|
||||
* takes the curve with it, and then a reused run has a result and nothing to
|
||||
* draw. 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."
|
||||
"No curve was recorded. A node restored from the cache is read back from the run that produced it, so this draws nothing once that run has been deleted — 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